Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Large Report - Access to PDF

Status
Not open for further replies.

timb94

Programmer
Apr 20, 2004
58
US
I have been tasked with creating a very large report of historical data(10,000+ pages) into a pdf format from Access.

It runs through approx. 7,000 pages and throws an error "Run-time error '2501': The OpenReport action was canceled."

The line of code it blows out on is "DoCmd.OpenReport "ResPR", acViewNormal" which located on a button event on a form.

I know the data is ok because I can start it just prior to the last good account it output and it runs through it ok.

Also, there a number of subreports associated with the main rpt. Would this have anything to do with it?

I am running Access 2000 with the Adobe distiller.

My question is has anyone else had any experience in creating large reports in Access and pdf formats? Is there any type of limitations as to the number of pages that the distiller can handle? Any other suggestions would be helpful.

Is it possible that Access is outputting data faster than the distiller can handle it? I tried to put a counter in the Report_Page module of the report but that didn't seem to help.

Any assistance would be grateful.
 
What happens if you preview the report and move to the last page. (No need to rush!)
 
Thank you lupins-46 for your response.

The last page is only partially built.

I have noticed that when I cancel the routine it take a while for the distiller to start outputing the file to disk. If the distiller is building this file in memory, could that be a problem?

Any comments?

I failed to mention in my original email that each account is on a page by itself. Think of this as kind of a historic invoice application. I can output each account to its own individual pdf file with no problem but management wants them all in one document.

Thanks again for any suggestions.
 
This is a pretty hopeless position to be in isn't it. Any possible idea is going to take forever to investigate.
I'm inclined to say is there a problem with the data at the point that the preview stops - maybe it is the same issue that causes the pdf to fail- but obviously this is just guesswork and I appreciate that whiling away your life testing guesses is a bit tiresome in these circumstances.

If it is possibly a data issue can you introduce a selection into the recordsource to ignore the data up to the point that the problem emerges? AT least that would be quick to test.
 
Hi lupins-46

I know its not a data problem because I have restarted the program at a point just prior to where its blowing up and it gets past it and continues on to the end of the file (have a sample of 10,000 records).

I'm also looking to see if there are any memory issues or issues with the distiller. I've upped my page cache but that didn't help any.

I'm inclined to believe its a distiller problem at this point but no proof. Need to do some more investigation but I'm still open to any suggestions or help.

Thanks again.

 
I think it is indeed a problem of available memory. To the very best of my knowledge, PDF conversion is made in memory, then written to disk. If you can split the report to make let's say batches of 1000 pages, you can later merge them in a single document with Acrobat Professional. I do so when outputting long documents or just large ones, like pages containing ultra hi-res pics. Sometimes the PDF creation crashes with a single page if the object quantity or the image size is huge, like in a map (i do maps) where every polygon describing a feature is made up of tons of nodes.

To boldly code, where no programmer has compiled before!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top