cancel
Showing results for 
Search instead for 
Did you mean: 

VB6 Win app using CR XI R2 crashes while generating many PDFs

Former Member
0 Kudos

Hi,

We use a Windows application built using VB6,CR XI R2. It creates a report that generates PDF docs from CR files.This is working for less number of files.But when used for more number of files,following errors are generated

1.In user machines(Win 7, XP),app crashes while generating the report without throwing the error.

2.In DEV machine(XP),process stops saying there is no free resources available to perform the operation.

My code is like the below-

1.A loop that generates the ID

2.For the first item,CR generates a report with data for that ID

3.Report data is exported into a PDF document and saved to a File path

4.Move to the Next ID and this loop goes on.

I tried updating the CR version from CR XI R2 without SPs by updating SP4 and SP6,but none of this works.

Please help in resolving this issue.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hello,

When you are done with the report be sure to close it, if you don't you will run into resources issues and the number of open jobs.

If that does not work then you need to build in some delays to allow the engine and more important the number of open jobs and licenses used. The RDC does have a limit that you cnanot get around.

Don

Former Member
0 Kudos

Hi Don,

Thank you for the reply.

We are getting such issues only when generating PDF for large number of IDs.If the ID count is less than 80,PDFs are generating successfully.

Please let us know the limit of the RDC,even if its a rough count.

0 Kudos

Correct. RDC only allowed so many connections.

Clean your code up and then manage the jobs, don't let more then 50 go at once or something like that.

Don

Former Member
0 Kudos

Hi Don,

I got another glitch in the above thread.Please find 2 scenarios -

  • VB6 app generating large number of reports exported to PDF programmatically
  • VB6 app generating large number of reports viewed by user and then exporting it to PDF in UI


For many PDFs,first one is failing,but not the second one.

Please let me know whether both are using same export function of CRAXDRT.dll or different.

0 Kudos

When exporting the first thing CR does is try to write a file to the temp or destination folder to check if it has full read/write abilities. If it fails it means no R/W access or the system is not capable of keeping up.

The RDC was NEVER built to do report bursting and never will be. Only option is to add more delays.

Check your ProcessMonitor logs to see what is happening when they first try to export.

Don

Former Member
0 Kudos

While looking into logs,it tries to load/unload mxdwdui.dll while crashing

0 Kudos

That is Microsoft's XPS print driver.

Change your default printer to a real printer other than that one. It has lots of problems that we know of and possibly some we don't know about.

Don

Former Member
0 Kudos

Hi Don,

Good morning!!

Can you please let me know how to set Printer Setup to 'no printer' at run-time?

I have a report (.dsr) in my project,it is causing the crashing by referring to Microsoft's XPS printer driver as you said.I tried checking 'No Printer' in Designer settings which completed report creation successfully without issues.

But the issue is I want to change this setting in run time,because that dsr file is used in different parts of the project.Only in this report generation,it should not choose printer.

Please help me on this.

0 Kudos

As far as I know there is no way to set it at runtime.

You could try setting the printer name to "Display", that's how CR sets it. But no i dea if the RDC would allow you to. Someone here kind of remembers to set the name to nothing and the port and a 3rd property which we can't rmember what it was now though...

Copy the DSR to a new report and use it is all I can think of as a work around.

Also, when and if you ever decide to use supported SDK you should save your DSR's as real Reports with an RPT extension.

Don

Former Member
0 Kudos

Hi Don,

I tried the options that you have advised too,but still no luck.

I tried to impose some delays between pdf generation steps,but still the dll was held by the app and now its saying 'System out of  Memory'

Now I am thinking of another option-Merging all the individual reports to different pages in a single file that shows up in the screen as print preview and then it can be saved as PDFusing the Export screen.

Here there is a catch-this print preview with multiple pages need to be exported to multiple PDFs.

When I searched thru the web for this option,I cudnt get any such functionality .

Can you please help me on this option to resolve this issue?

0 Kudos

You have to remember, you are using products that are old and no longer supported nor tested on current OS's and export formats.

If it says you are out of menory you are, remember also that Excel had a 64k file size limit back then.

No options for merging and extracting separately other than to set a page range but that would be tough to calculate.

Small sets of exports is all I can suggest.

Updating to VS .NET and CR for VS will give you more options.

Don

Former Member
0 Kudos

Hi Don,

Sorry to bug you.I accept that these have become legacy now.But when it comes to users,they don't understand that and clients,they want what they think of .

I just have 1 more question.Is this limit pertains to PDF export alone or all type of exports,ie.,.crr  too?

Answers (0)