Quantcast
Channel: SCN : Discussion List - SAP Crystal Reports, version for Visual Studio
Viewing all articles
Browse latest Browse all 3636

Crystal reports displaying a blank page.

$
0
0

Hello,

 

I have a VS2010 MVC project. Created Crystal Reports and programatically used the code as below..

This works fine when running on my local machine..

 

ReportClass rptH = new ReportClass();
TableLogOnInfos crtableLogoninfos = new TableLogOnInfos();
TableLogOnInfo crtableLogoninfo = new TableLogOnInfo();
ConnectionInfo crConnectionInfo = new ConnectionInfo();
Tables CrTables;


fileName = Path.Combine(crystalReportPath, "Test.rpt");
rptH.FileName = fileName;
rptH.Load();
rptH.Refresh();




crConnectionInfo = ReportServ.GetCrystalReportConnection();




CrTables = rptH.Database.Tables;
foreach (CrystalDecisions.CrystalReports.Engine.Table crTable in CrTables)
{
    crtableLogoninfo = crTable.LogOnInfo;    crtableLogoninfo.ConnectionInfo = crConnectionInfo;    crTable.ApplyLogOnInfo(crtableLogoninfo);
}


rptH.SetParameterValue("@p_year", pYear);


Stream stream = rptH.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);

return File(stream, "application/pdf");

 

Set the Test.rpt file Build Action to "Content", created a SetUp project and deployed the MSI package onto the server.

The server is a Win2003 server, where "CRRuntime_32bit_13_0_6.msi" package has been installed.

All the stored procedures and database tables are set up correctly.

 

On the click of the button the above code runs and displays a blank page..

 

Have been scouring through the forums but not able to find a solution.

 

Any help is very much appreciated..

 

Thanks

 

Please


Viewing all articles
Browse latest Browse all 3636

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>