metropia
asked on
Report Exporter for Crystal Report.
I have a Crystal Report that when is displayed as PDF on IE, does not retrieve any of the database data. Two parameters are passed via the query-string.
The report pulls data when opened directly on crystal.
I am not sure what exactly is happening, but what I know is that we are querying some SQL Server 2008 databases and I don’t think that the report exporter that I am using written using Visual Studio 2005 can handle that kind of database connection.
I would like to ask if there is anyone that have a report exporter written on Visual Studio 2010 that I can use?
I am uploading a copy of mine, hopefully a newer version is not too different and easy to implement to what I have.
PrintGTCInspectionReport.aspx.cs.txt
The report pulls data when opened directly on crystal.
I am not sure what exactly is happening, but what I know is that we are querying some SQL Server 2008 databases and I don’t think that the report exporter that I am using written using Visual Studio 2005 can handle that kind of database connection.
I would like to ask if there is anyone that have a report exporter written on Visual Studio 2010 that I can use?
I am uploading a copy of mine, hopefully a newer version is not too different and easy to implement to what I have.
PrintGTCInspectionReport.aspx.cs.txt
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Sorry, do you mean it was checked and now unchecked?
What I mean to say, did this solve the problem or do you still need help?
Lin
What I mean to say, did this solve the problem or do you still need help?
Lin
ASKER
No problem. The option was unchecked. I still have my problem.
Oh Darn!
Well hopefully another EE will ping in.
Well hopefully another EE will ping in.
ASKER
thank you anyways!
ASKER
I hope that happens too :)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I can see it inside the CR viewer when I run it in VS2010.
I get the CR prompt to enter the user log on credentials, then to supply the required parameters.
That is without using the export to PDF code on my page.
When I add the export to PDF code, then I get the PDF version of the report, supply the parameters on the query-string, but the report is empty then.
I am including a copy of my report.
GTCInspectionReport.rpt
I get the CR prompt to enter the user log on credentials, then to supply the required parameters.
That is without using the export to PDF code on my page.
When I add the export to PDF code, then I get the PDF version of the report, supply the parameters on the query-string, but the report is empty then.
I am including a copy of my report.
GTCInspectionReport.rpt
Does the web-user have database permissions?
mlmcc
mlmcc
ASKER
I am passing the log on credentials on Page_Load
now I don't get the prompt.
The same for the 2 required parameters.
I enter the url, providing the 2 query-string values, the report opens on the CR viewer.
How can I within Page_Load, do the export to PDF so it does not open on the CR viewer?
Thank you.
now I don't get the prompt.
The same for the 2 required parameters.
I enter the url, providing the 2 query-string values, the report opens on the CR viewer.
How can I within Page_Load, do the export to PDF so it does not open on the CR viewer?
Thank you.
protected void Page_Load(object sender, EventArgs e)
{
ReportDocument crystalReport = new ReportDocument();
string baseId = "";
string lotId = "";
baseId = Request.QueryString["baseID"].ToString();
lotId = Request.QueryString["lotID"].ToString();
crystalReport.Load(Server.MapPath("GTCInspectionReport.rpt"));
crystalReport.SetDatabaseLogon("xxxxxx", "xxxxxx");
crystalReport.SetParameterValue("baseID", baseId);
crystalReport.SetParameterValue("lotID", lotId);
CrystalReportViewer1.ReportSource = crystalReport;
}
You should be able to replace the viewer line with the export line
CrystalReportViewer1.Repor tSource = crystalReport;
mlmcc
CrystalReportViewer1.Repor
mlmcc
ASKER
Thank you all for your help!
ASKER
Thank you!