Click here to Skip to main content
15,311,944 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Can anyone tell me what is the best option to show report in web application.I have developed a web application using crystal report but it requires web sql server connection when it loads every time.So it takes long time to show report.I want a method which will show a report in minimum time.

1 solution

This depends of the report complexity and data amount, but as I know Crystal Reports is one of the best solution for reporting, so maybe you have problem in your database structures (tables, relationships and indexes) that could be improved.
Sandip Paul 491984 20-Mar-14 10:42am
ReportDocument cryRpt = new ReportDocument();
TableLogOnInfos crtableLogoninfos = new TableLogOnInfos();
TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();
ConnectionInfo crConnectionInfo = new ConnectionInfo();
Tables CrTables;
var path = Server.MapPath("reportfiles\\PTaxLoc.rpt");
crConnectionInfo.ServerName = "";
crConnectionInfo.DatabaseName = "Apex";
crConnectionInfo.UserID = "DB_admin";
crConnectionInfo.Password = "dbAdmin1";
CrTables = cryRpt.Database.Tables;
foreach (CrystalDecisions.CrystalReports.Engine.Table CrTable in CrTables)
crtableLogoninfo = CrTable.LogOnInfo;
crtableLogoninfo.ConnectionInfo = crConnectionInfo;

CrystalReportViewer1.ReportSource = cryRpt;

This is my code .can you tell me is this anything wrong?
Raul Iloc 21-Mar-14 3:16am
The code seems to be OK, so your performance of your report depends on the design of your database, the amount of data used in your report, and the SQL server speed and loading.
Sandip Paul 491984 22-Mar-14 1:30am
instead of using dataset i am using a temp table in which i inserting the values from a gridview and then connecting the table with my the way is correct? please suggest me...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900