469,946 Members | 1,896 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,946 developers. It's quick & easy.

Slow Crystal Report Loading C# VS.Net 2005

Coldfire
289 100+
I am having problem with slow crystal report loading plus slow dataadapter.fill method
here is my code

[HTML]
string SelectCmd = "SELECT * FROM EnterInstituteInformation WHERE EnterInstituteInformation.InstituteID=" + ID;

this.oleDbSelectCommand1.CommandText = SelectCmd;

oleDbSelectCommand1.Connection = oleDbConnection1;
oleDbDataAdapter1.SelectCommand = oleDbSelectCommand1;

oleDbDataAdapter1.Fill(dsEnterInstituteInformation FullReport1);

//--Initializing CrystalReport
InstituteReport rpt;
rpt = new InstituteReport();
rpt.Load("InstituteReport.rpt");
rpt.SetDataSource(this.dsEnterInstituteInformation FullReport1);
this.crystalReportViewer1.ReportSource = rpt;

this.Show(); //form at which crystalreportViewer lies
this.oleDbConnection1.Close();[/HTML]
give me some hints to improve the speed of loading crystalreports
Mar 24 '07 #1
5 3474
Coldfire
289 100+
just to mention...
i am using MS Access Database with only few records may be 5 and the table contains 14 columns.
Mar 24 '07 #2
kenobewan
4,871 Expert 4TB
Are you still running debug mode? Please provide more information. Thanks.
Mar 24 '07 #3
Coldfire
289 100+
Are you still running debug mode? Please provide more information. Thanks.
Yes, but I also have checked it in Release mode, the delay is almost same.

[HTML]
oleDbDataAdapter1.Fill(dt); //taking 30 secs almost
.....
.....
.....
this.Show(); //this fucntion loads crystalreport and is taking 15-20 secs
[/HTML]


One more thing,
can I pull data in crystalreport without dataadapter/dataset
Mar 24 '07 #4
Coldfire
289 100+
if this is the reason ....
[HTML]In previous versions of ADO.NET, if you used a DataSet (Who haven't), you most likely are familiar with slow performance of the DataSet when loading and serializing a large amount of data. Now ADO.NET team has done a fantastic job by taking care of these problems in ADO.NET 2.0 by extending the DataSet and the DataTable classes.

In previous versions of ADO.NET (1.0 and 1.1), it was all about the DataSet and the DataTable was a slave of the DataSet. In ADO.NET 2.0, the DataTable object celeberates independence from the DataSet and brings much more to the table for developers. [/HTML]
@
http://www.c-sharpcorner.com/UploadFile/mahesh/DataTable2011172005235038PM/DataTable20.aspx

But i am using .NetFramwork 2.0 and building my application in VS.Net 2005. From where can I see that my ADO.Net version is 1.1 or 2.0.(obviously it should be 2.0).
Do I need to upgrade ado.net 2.0 further. If yes, than how?
Mar 30 '07 #5
It can help u


Private rpt As RptAdress 'this is a crystal report class genrated by .net
Private DSrpt As DS_ADDRESS ' this is Dataset XSD class

Public Function LoadRptData(ByVal SelectQuery As String) As Boolean
Dim mycon As OleDbConnection
Dim da As OleDbDataAdapter
Try
mycon = New OleDbConnection
mycon.ConnectionString = gconnString
'Dim sqlstmt As String = "Select NriName, ADDRESS from ADDRESS_BOOK"
da = New OleDbDataAdapter(SelectQuery, mycon)
' Remember to change data source as applicable.
DSrpt = New DS_ADDRESS
da.Fill(DSrpt, "ADDRESS_BOOK")

rpt = New RptAdress
rpt.Database.Tables(0).SetDataSource(DSrpt)
RptAddressViewer.ReportSource = rpt

Return True
Catch ex As Exception
Throw ex
End Try
End Function
Mar 31 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

13 posts views Thread by kristoff plasun | last post: by
1 post views Thread by Tim_Mac | last post: by
reply views Thread by lrobo01 | last post: by
2 posts views Thread by Charlie Brown | last post: by
reply views Thread by Mark Stevens | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.