Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: View/Print taking time Post Reply Post New Topic
Author Message
Srinivasan
Newbie
Newbie


Joined: 25 May 2009
Location: India
Online Status: Offline
Posts: 7
Quote Srinivasan Replybullet Topic: View/Print taking time
    Posted: 25 May 2009 at 12:41am
Dear Sir ,

I have an issue i.e, I am using crystal report(version 11 release 2) in my windows applications developed in vb.net (2005)and sql server(2005) as backend . In one of the forms i placed one reportviewer control,

crystal report taking long time for preview & print(nearly 2 minute) .
please any one help me to getout of this

Dim rpt As New CrystalReport1() 'The report you created.
        Dim myConnection As SqlConnection
        Dim MyCommand As New SqlCommand()
        Dim myDA As New SqlDataAdapter()
        Dim myDS As New Dataset1() 'The DataSet you created.

        Try

            myConnection = New SqlConnection("Data Source=localhost;Integrated Security=SSPI;" & _
                                             "Initial Catalog=northwind;")
            MyCommand.Connection = myConnection
            MyCommand.CommandText = "SELECT * FROM Customers"
            MyCommand.CommandType = CommandType.Text
            myDA.SelectCommand = MyCommand

            myDA.Fill(myDS, "Customers")
            rpt.SetDataSource(myDS)
            CrystalReportViewer1.ReportSource = rpt

        Catch Excep As Exception
            MessageBox.Show(Excep.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try

Advance thnx.
srini
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 26 May 2009 at 6:28am
several thoughts.
 
1) debug how long it takes to return the dataset...step though that section with f10.  Just how long does the data fetching take.
2) how long does it take in SQL Server
3) how many records are returned.
4) what is the report doing?  anything fancy?  any subreports or is it a straight data dump.
 
Yes 2 minutes seems too long, but the question is, is it Crystal's issue or VB's or a combination.
IP IP Logged
Srinivasan
Newbie
Newbie


Joined: 25 May 2009
Location: India
Online Status: Offline
Posts: 7
Quote Srinivasan Replybullet Posted: 28 May 2009 at 3:54am
Thank You For ur Replay Sir
several thoughts.

//1) debug how long it takes to return the dataset...step though that section with f10. Just how long does the data fetching take.//
It is taking nearly 2 seconds.
2) how long does it take in SQL Server
this 1 seconds
3) how many records are returned.
only one
4) what is the report doing? anything fancy? any sub
reports or is it a straight data dump.
No fancy ,No sup report.
What is my big doubt is second time that report preview is coming too fast may be 1 to 2 seconds only.
but the first time it tokes 2 minutes.
Just i'm printing customer list thats all for that it is taking too match time please help me out of this problem

srini
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 28 May 2009 at 6:18am
Sorry, I don't know.  For only 1 record that takes, let's be generous, 3 seconds to retrieve, I can't see why it would take 2 minutes to display the first time, but only 2 seconds on the second.  Unless the creation of the viewer is having issues and it is bogging down there, but that seems unlikely.
 
 
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.047 seconds.