Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8623

Re: Crystal Crashing when many users

$
0
0

Hey Ludek,

 

Thank you for your response!

 

As far as:

2) You are launching too many Print Jobs (see below)

All my reports DO NOT have any Subreports.  They just have Groups & Detail(s).

Output as PDF or Excel.  So I do not think that it is issue, right?

 

1) You are not using .Close and .Dispose on the report objects once you are done with them.

I AM NOT using .Close and .Dispose so this sounds like the issue.

Please see my simple code below.


So do I just add 2 more lines at end?


            crystalReport.Close();

            crystalReport.Dispose();

 

Is that it or there something else I should be doing?

 

Thanks,

Yury


CODE

-----------------------------------------------------------------------------------------

            ReportDocument crystalReport;

            string rptFilePath = System.Web.HttpContext.Current.Server.MapPath("~/Crystal/" + rptFileName);

            MemoryStream mStream;

 

            crystalReport = new ReportDocument();

            crystalReport.Load(rptFilePath);

            crystalReport.SetDataSource(DS.Tables[0]);

            mStream = (MemoryStream)crystalReport.ExportToStream(ExportFormatType.PortableDocFormat);


-----------------------------------------------------------------------------------------



Viewing all articles
Browse latest Browse all 8623

Trending Articles



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