Quantcast
Channel: SCN: Message List - Software Support and Maintenance
Viewing all articles
Browse latest Browse all 2823

SAP crystal ReportDocument with threading issue...

$
0
0

Hi All,

 

I am having some issues related with the SAP crystal ReportDocument Class while working with threading.

 

I am using VS 2010 ,SAP.CrystalReports.13.0.2000.0.

 

Issue:Using ReportDocument i can do 4 possible tasks.

 

1.print the report

2.email the report

3.export the report and

4.preview the report

 

I am having a singleton ReportDocument object in a class and using the same object in all the above tasks with threading is as follows

 

Task.Factory.StartNew(() => ExportToFile(myReport.ReportFileName, myReportDestination, reportParameters));

Task.Factory.StartNew(() => PrintReport(myReport.ReportFileName, myReportDestination, reportParameters));

Task.Factory.StartNew(() => SendEmail(myReport.ReportFileName, myReportDestination, reportParameters));

Task.Factory.StartNew(() => Preview(myReport.ReportFileName, myReportDestination, reportParameters));

 

for Export,print and email are working fine but if i preview the report in the viewer i couldn't .

 

i am having the below error.

 

Value cannot be null. Parameter name:

 

Please help to solve the issue.

 

FYI: If i create 4 different reportdocument object and it's working fine but i need to do with the singleton object.

 

Thanks in Advance,


P.Sathish Kumar


Viewing all articles
Browse latest Browse all 2823

Trending Articles



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