sherazkhan
August 18th, 2005, 01:58 AM
Hello there... anybody please help...........
plz tell me how to use crystal reports in c#.
the current procedure which i am using to open crystal reports is like this.
1-first of all i used to make the stored procedure in sql server 2000.
2-then i design the crystal report explicitly by opening the crystal report 9.
3-then i call it in c# like this...
i have taken a control of crystalreportviewer on a form named as frpt_ReportCaller.
frpt_ReportCaller rptCaller = new frpt_ReportCaller();
rptCaller.ReportPath = "D:\\MyProject\\Reports\\Generic\\rpt_MaterialLedger.rpt";
rptCaller.crystalReportViewer1.Zoom(2);
rptCaller.Show();
the way i am openinig the report is very slow,
if i pass the parameters to the report which have been used in stored procedure to filter data, then the report demands these parameters before opening it, when i used to pass the parameters to the report it gives me the query engine error.
to resolve this problem i used to insert the parameters in a seperate table from which the stored procedure takes it while executing the query.
if i open the query analyzer and run the stored procedure the stored procedure gives me result in 6 to 10 seconds to fetch 10 to 15000 records.
but when i call the report from my application it takes a lot of time to open it, in my view the crystal report is taking time to populate itself from database.
the time which crystal report is taking to be open ranges from 2 to 4 minutes.
i dont know what the problem is, why is it taking so much time while the stored procedure is taking only 6 seconds to fetch all the records.
plz tell me whether i am using the appropriate way to open the report, or there is something missing that i should be doing.
plz help me in this regard so that i can optimize the time to open the report from my application.
my email is msherazkhan@hotmail.com
sheraz
plz tell me how to use crystal reports in c#.
the current procedure which i am using to open crystal reports is like this.
1-first of all i used to make the stored procedure in sql server 2000.
2-then i design the crystal report explicitly by opening the crystal report 9.
3-then i call it in c# like this...
i have taken a control of crystalreportviewer on a form named as frpt_ReportCaller.
frpt_ReportCaller rptCaller = new frpt_ReportCaller();
rptCaller.ReportPath = "D:\\MyProject\\Reports\\Generic\\rpt_MaterialLedger.rpt";
rptCaller.crystalReportViewer1.Zoom(2);
rptCaller.Show();
the way i am openinig the report is very slow,
if i pass the parameters to the report which have been used in stored procedure to filter data, then the report demands these parameters before opening it, when i used to pass the parameters to the report it gives me the query engine error.
to resolve this problem i used to insert the parameters in a seperate table from which the stored procedure takes it while executing the query.
if i open the query analyzer and run the stored procedure the stored procedure gives me result in 6 to 10 seconds to fetch 10 to 15000 records.
but when i call the report from my application it takes a lot of time to open it, in my view the crystal report is taking time to populate itself from database.
the time which crystal report is taking to be open ranges from 2 to 4 minutes.
i dont know what the problem is, why is it taking so much time while the stored procedure is taking only 6 seconds to fetch all the records.
plz tell me whether i am using the appropriate way to open the report, or there is something missing that i should be doing.
plz help me in this regard so that i can optimize the time to open the report from my application.
my email is msherazkhan@hotmail.com
sheraz