cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal Reports Hangs when using SelectPDF at the same time

12-04-2022 8:49 AM
853 views 5 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hello,

I have two jobs running on different threads. One job is using SelectPdf to create pdfs.

The other job is using crystal reports (v 13.0.3500.0) to export to PDF. When they run at the same time crystal reports hangs and will no longer do anything.

Job #1:

SelectPdf.HtmlToPdf Renderer = new SelectPdf.HtmlToPdf();

SelectPdf.PdfDocument doc = Renderer.ConvertHtmlString(htmlDocument);

documentOutput = doc.Save();

doc.Close();

vs.

Job #2:

stream = CrystalReportDocument.ExportToStream(exportOptions.ExportFormatType);

Exporting to stream or file makes no difference.

Any suggestions?

Thanks,

Jon

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

0 Likes

Ah, All I can suggest is try SP 32 and see what happens.

Only other thing is as I noted CR must use STA threading model, could be Adobe is not thread safe, CR uses the Adobe engine also to export, Adobe Reader must be installed for CR to work.

I suspect Adobe API's you are using isn't thread safe.

Answers (1)

Answers (1)

0 Likes

Not sure what #1 has to do with CR.

I've never seen this: SelectPdf.HtmlToPdf();

Are exporting to HTML and then streaming to PDF?

The version noted is the Framework version, need to know what SP you are using?

You can get SP 32 from here:

https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads

We only support the latest version because we don't patch this product, full builds only.

Also, CR only supports the STA threading Model so be sure to be using that one in your app.

Possibly you are mixing objects somewhere or there is missing info and a pop-up is prompting for more info....

You'll need to run in debug mode and watch the Report ID's

former_member859132
Discoverer
0 Likes

Hi Don,

SP 25

SelectPDF is a pdf converter, in this case I am taking an html document and converting it to pdf.

so job #1 has nothing to do with CR but it is using adobe at the same time as job #2 where CR is exporting to pdf.

When these jobs run one at a time, no problem, but when they run at the same time CR hangs.

Thanks