|
Hi all,
I have a problem concerning Crystal Report's performance on Win2000.
I use datasets to push data into my report, but the assignment of the datasource to the report and the the creation of the report take way too much time on some Win2000 systems.
Here are the two code snippets that take so much time:
report.SetDataSource(dataSet);
ReportForm reportForm = new ReportForm(report, m_ResourceManager);
reportForm.Show()
Some examples of the performance of this code:
On my Windows XP:
SetDataSource: 3 seconds
show report: 2 seconds
A colleague's Win 2000:
SetDataSource: 2 seconds
show report: 2 seconds
Another colleague's Win 2000:
SetDataSource: 105 seconds
show report: 391 seconds
My application runs fine on every Windows XP that I tested and it also runs fine on some Win2000 systems.
But unfortunately there are some Win2000 systems that have very bad performance running my app.
I have no clue what could be the reason for this.
For example:
The Win2000 system's load is at about zero percent, when it is waiting for the SetDataSource method to return.
How can this be?
Any help appreciated.
Best regards
Bernd R.
-------------------------------------------
The light at the end of the tunnel has been switched off temporarily due to budget problems...
|
|
|
|
|
While Crystal Reports is not the most stable product in the computing world, I doubt this is the cause of your problem. I'd check first the database connections and/or the ammount of data that is being trasnferred on the slow machines.
Yes, even I am blogging now!
|
|
|
|
|
Database connection shouldn't be the problem, because there is no database. I use datasets!
And the amount of data transferred is not very high.
I also don't think that the hardware is the problem, because we use computers with Pentium4 2,8GHz and 512 MB of RAM.
I guess this must be some weird configuration issue
-------------------------------------------
The light at the end of the tunnel has been switched off temporarily due to budget problems...
|
|
|
|
|
Hi,
I am using a Stored Procedure to validate Login Process:
Stored Procedure is defined as follows :
----------------------------------------------------------
CREATE PROCEDURE spCheckLogin
@LoginID char(20), @Pwd char(8), @Response int OUTPUT
AS
IF EXISTS (SELECT * FROM tEmployees WHERE LoginID=@LoginID AND Pwd=@Pwd)
Return 1
ELSE
Return 0
GO
----------------------------------------------------------
In C#, I am accessing this Stored Procedure as follows:
try
{
string temp="";
//open the connection
gvDatabase.scInventoryControl.Open();
//create the sql
sql = "spCheckLogin";
//create command
cmdLogin = new SqlCommand(sql,gvDatabase.scInventoryControl);
cmdLogin.CommandType=CommandType.StoredProcedure;
cmdLogin.Parameters.Add("@LoginID", SqlDbType.Char,20);
cmdLogin.Parameters["@LoginID"].Value=log;
cmdLogin.Parameters.Add("@Pwd", SqlDbType.Char,8);
cmdLogin.Parameters["@Pwd"].Value=p;
cmdLogin.Parameters.Add("@Response",SqlDbType.Int,4);
cmdLogin.Parameters["@Response"].Direction=ParameterDirection.Output;
Console.WriteLine("Data Access started");
cmdLogin.ExecuteNonQuery();
temp = cmdLogin.Parameters["@Response"].Value.ToString();
Console.WriteLine(temp);
//clean up code
cmdLogin.Dispose();
gvDatabase.scInventoryControl.Close();
Console.WriteLine("Data Access Closed");
}
catch(Exception ex) { Console.WriteLine(ex.ToString() ); }
------------------------------------------------------------
However It doesn't print any values, although I values do exists in the table
What am i doing wrong?
ThANX in ADvance
|
|
|
|
|
looks to me you got two thing mixed up.
you should eighter change youre sql code to
=======================
CREATE PROCEDURE spCheckLogin
@LoginID char(20), @Pwd char(8), @Response int OUTPUT
AS
IF EXISTS (SELECT * FROM tEmployees WHERE LoginID=@LoginID AND Pwd=@Pwd)
SET @Response=1
ELSE
SET @Response=0
GO
========================
OR you should use something like this in youre code:
========================
string temp="";
//create the sql
string sql = "spCheckLogin";
//create command
cmdLogin = new SqlCommand(sql,gvDatabase.scInventoryControl);
cmdLogin.CommandType=CommandType.StoredProcedure;
cmdLogin.Parameters.Add("@LoginID", SqlDbType.Char,20);
cmdLogin.Parameters["@LoginID"].Value=log;
cmdLogin.Parameters.Add("@Pwd", SqlDbType.Char,8);
cmdLogin.Parameters["@Pwd"].Value=p;
cmdLogin.Parameters.Add("@Response",SqlDbType.Int,4);
cmdLogin.Parameters["@Response"].Direction=ParameterDirection.Output;
Console.WriteLine("Data Access started");
try
{
//open the connection
gvDatabase.scInventoryControl.Open();
//use the connection
temp=(string)cmdLogin.ExecuteScaler();
Console.WriteLine(temp);
}
catch(Exception ex)
{
Console.WriteLine(ex.ToString() );
}
finally
{
//clean up code
gvDatabase.scInventoryControl.Close();
Console.WriteLine("Data Access Closed");
}
cmdLogin.Dispose();
========================
i hope this helps.
(p.s. i did not test above code)
cookies are for eating, not for websites.
|
|
|
|
|
Try...
// Add the return value parameter
SqlParameter param = m_oCommand.Parameters.Add( "RETURN_VALUE", SqlDbType.Int );
param.Direction = ParameterDirection.ReturnValue;
D!shan
|
|
|
|
|
In namespace WindowsApplication1 I declare the richTextBox1 which I want to CALL FROM OTHER NAMESPACES MANY TIMES MAKING CHANGES that I want TO STAY. How I could make it for maximum performance ?
The first time I declared it as public static removing the keyword this in front of it.
But every time I was going to the Form1.cs[Design]* and I was making just a little change to the richTextBox1 the static was leaving and the this was appearing again.(Can I stop it happens?)
The second time I was passing the richTextBox1 as reference variable for many functions. But I think it is slow.(Is it realy slow?)
|
|
|
|
|
Your 'static' change is happening because the Windows Forms designer requires the controls on the form you're designing to be instance variables.
If you want, yes you can pass the rich text box into the functions you want to use it in. No, this is not slow, you're not copying the rich text box, just a small pointer to the rich text box.
A better solution is NOT to use static, and instead pass the rich text box once to the other class, then store that variable in the other class. For instance
class Form1
{
...
MyOtherClass theOtherOne = new MyOtherClass(this.richTextBox1);
}
class MyOtherClass
{
private RichTextBox theRichTextBox = null;
public MyOtherClass(RichTextBox rtb)
{
theRichTextBox = rtb;
}
void DoSomething()
{
theRichTextBox.Text = "hey I've modified it from another class";
}
}
#include "witty_sig.h"
|
|
|
|
|
Thank you very much Judah Himango !!!
|
|
|
|
|
Hi all
i need to programming a menu like Windows Start menu please can any one help me with example.
|
|
|
|
|
The simplest way is to add a Button to your container (like a Form or UserControl ) and a ContextMenu that is either defined with the MenuItem s you want, or adds them dynamically in the ContextMenu.Popup event handler. In the handler for the Button.Click event (inheritted from Control ), call ContextMenu.Show , passing the Button that was clicked and some Point , like the X and Y coordinates of the mouse position (remembering to transform the coordinates into client coordinates using Control.PointToClient ) or some corner of the Button (like new Point(0, 0) for the upper-left corner, since the coordinates are relative to the control you pass in the first parameter).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Thanks for your Reply
do you know menu in Visual Studio dot net in the left i named Docking Menu or striping menu .i need to do one like this . . .please help with example or ready made component
Thanks for your Time and help
Regards
Haytham
|
|
|
|
|
Try searching this web site. There are plenty of examples. That's what this site is for.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
i Searched in the site put i cant find any example met me need can you find a one for me
Thanks
best regards
|
|
|
|
|
Hi,
I just starting to play around with managed Direct X. What I want to do is create an application which has a windows form with a PictureBox containing Direct3D graphics but I'm having trouble getting started. I tried setting passing the PictureBox control to the constructor for Device and then simply blanking it to a uniform blue (borrowing code from tutorial 1 in the SDK documentation). I was calling the Render() method to do the rendering on the OnPaint event but nothing seems to be happening - the picture box remains defiantly grey!. What am I missing here?
What I'd ideally like to do is create a custom Direct3DPictureBox control inheriting from PictureBox so I can drop it into my apps without worrying about them too much.
Thanks
"Where do we go to get our good name back?...we go where we always go when a dramatic change is needed. We go to the ballot box" - Al Gore 5/26/04
|
|
|
|
|
Please i need helping in TAPI application ?
i am student ,and i want to work on some telephony application
i know that the perfect subject is TAPI ,but there are some questions :-
1- can i use the TAPI in c# language ?
2- should i install some files or dll files that help to execute TAPI functionallity ?
3-couild i have an example in c# that shows me how exactly work with TAPI in c#?
finally ,forgive me for my bad english?
|
|
|
|
|
What was wrong with the responses that Michael and I gave you the other day? No one is going to do this work for you.
- Nick Parker My Blog | My Articles
|
|
|
|
|
I need to put toolbar item to my windows application to make the selected text subscript or when it pressed , typed letters or numbers will be subscript.
I searched more about this topic on the net but I can only find some this:
myRichTextBox.ToolbarLayout = "bold,superscript,subscript";
but doesnt work there is no option in the Richtextbox class like "ToolbarLayout"...
any help..I would be glad...thanks
|
|
|
|
|
Unfortunately, MS didn't expose all the functions of the RichText control for .NET.
You can do something like richTextBox1.SelectionBold = true but there's no such thing as richTextBox1.SelectionSubScript = true
But since the .NET RichTextBox in fact just wraps the Win32 RichEdit control you can use the structs and messages for this control to achieve subscript, superscript, various underline styles and so on.
Take a look at this article here, I've added something similar to the RichTextBoxEx class already (look towards the end of the article).
This can be easily modified to add subscript/superscript formatting for a selected range od text.
Regards,
mav
|
|
|
|
|
first of all , thanks mav , this is the second time you saved my life
I've read the article...I know I ll take a look at this article in the future a lot...it will help me the modify RTB's class properties...
I found something like that after I've read the article you prefered.
richTextBox1.SelectedText = "10";
// Set the CharOffset to display superscript text.
richTextBox1.SelectionCharOffset = 10;
// Set the superscripted text.
richTextBox1.SelectedText = "2";
// Reset the CharOffset to display text at the baseline.
richTextBox1.SelectionCharOffset = 0;
This is the article
And another article I've found , it's here
I'll check them and try , if they doesnt work...I 'll try modifying the class.
Thanks for your help again...
Regards,
Brown Jacket
|
|
|
|
|
I've downloaded an ActiveX component and attempted to create an object of a type contained in the component. However, in using the following line of code
/cm11a.controlcmClass x10 = new cm11a.controlcmClass();
I receive the error:
'cm11a.controlcmClass.controlcmClass()' is inaccessible due to its protection level
The class is declared as public and no alternative constructors are available.
I've also tried:
<br />
Type type=Type.GetType("cm11a.controlcmClass",false,true);<br />
object x10= Activator.CreateInstance(type);<br />
((cm11a.controlcmClass)(x10)).Init();<br />
but get an exception on the 2nd line as type is null (ie the "GetType" call failed).
Any ideas or suggestions on getting either method to work would be greatly appreciated.
Thanks
Ashley
PS If anyone knows of a library which can be used to control a CM12 interface I'd love to hear of it
|
|
|
|
|
please tell me how to do dictionary in C# (in Console Application and Windows Application.
thank you.
|
|
|
|
|
ala`a ali wrote:
please tell me how to do dictionary
What does this mean?
Do you mean to ask how to use one of the following classes: System.Collections.DictionaryBase , System.Collections.Specialized.ListDictionary , System.Collections.SpecializedHybridDictionary or System.Collections.Specialized.StringDictionary .
Or do you mean to ask how to implement a natural language dictionary, like the Oxford English Dictionary?
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
The Second EuroCPian Event will be in Brussels on the 4th of September
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
|
|
|
|
|
i wanna to use the following code to get
hte system imagelist ,but it doesn't works well,the iconCount always equal 5,and so
i can't get the correct imagelist;
[DllImport("comctl32.dll")]
private static extern int ImageList_GetImageCount( IntPtr himl );
public static ImageList GetSystemImagelist(bool isSmall , bool isSelected )
{
SHFILEINFO info = new SHFILEINFO(true);
int cbInfo = Marshal.SizeOf(info);
SHGFI flags = SHGFI.SHGFI_SYSICONINDEX;
SHIL size ;
if(isSmall == true)
flags |= SHGFI.SHGFI_SMALLICON;
else
flags |= SHGFI.SHGFI_ICON;
if(isSelected == true)
flags |= SHGFI.SHGFI_OPENICON;
ImageList imageList = new ImageList();
IntPtr imageHandle = SHGetFileInfo("C:\\",0,out info, (uint)cbInfo,flags);
IntPtr iconHandle = IntPtr.Zero;
int iconCount = ImageList_GetImageCount(imageHandle);
for (int i = 0; i < iconCount; i++)
{
iconHandle = ImageList_GetIcon(imageHandle, i, 0);
imageList.Images.Add (Icon.FromHandle(iconHandle));
}
return imageList;
}
|
|
|
|
|
in visual c++ ,we can do it by the following
code:
void GetSystemImageList(CImageList * pSmallList, CImageList * pLargeList)
{
SHFILEINFO ssfi, lsfi;
HIMAGELIST hSystemSmallImageList = (HIMAGELIST)
::SHGetFileInfo((LPCTSTR)_T("C:\\"), 0, &ssfi,sizeof(SHFILEINFO), SHGFI_SYSICONINDEX | SHGFI_SMALLICON);
pSmallList->Attach(hSystemSmallImageList);
HIMAGELIST hSystemLargeImageList = (HIMAGELIST)::SHGetFileInfo((LPCTSTR)_T("C:\\"), 0,&lsfi,sizeof(SHFILEINFO), SHGFI_SYSICONINDEX | SHGFI_ICON);
pLargeList->Attach(hSystemLargeImageList);
}
but i dont'know how to get it in c#.
|
|
|
|