Ouput report to pdf displaying incorrect data

teel73

Registered User.
Local time
Today, 07:41
Joined
Jun 26, 2007
Messages
205
Hello,

I've been wrecking my brain on this issue:

I have a report that includes 4 sub-reports. Each individual report is based on a crosstab query that includes totals.

The report previews correctly when I open it.
If I choose to export the report manually to a .pdf, the pdf gets created successfully and displays the data correctly.

My problem comes when I try to export the report thru VBA.

I use the following statement to export the report to a pdf.:
Code:
Docmd.OutputTo acOutputReport, "rptname", acFormatPDF, "rptfilename", False

That statement exports the report to a pdf. successfully however the data gets messed up. The report displays the incorrect totals.

Does anyone have a clue what could be going on? Please help me.

Thanks.
 
So the report: rptName opens in printPreview correctly.
yet when Output, has the wrong data?
Are you opening the correct 'rptfilename'? Because the fact that it has no path on it could be saving to another spot .
Change the target file to a full pathname":
"c:\folder\myfile.pdf"
 

Users who are viewing this thread

Back
Top Bottom