Export to PDF will result with blank sub reports :( (1 Viewer)

smig

Registered User.
Local time
Today, 19:19
Joined
Nov 25, 2009
Messages
2,156
I'm exporting reports to pdf using
DoCmd.OutputTo acOutputReport, strReportName, acFormatPDF, strPDFfile

After exporting the report is sent by email
sometimes the end user get the report with blank sub reports
The report looked OK before exporting and sending :(

Any idea ?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:19
Joined
Oct 29, 2018
Messages
13,332
Hi. Sounds like maybe a case of slow network traffic. Just as a test, if you create the PDF file from a local copy of the BE, does it still create empty subreports?
 

Isaac

Lifelong Learner
Local time
Today, 09:19
Joined
Mar 14, 2017
Messages
2,862
Are you manipulating anything about the Report's recordsource (etc) prior to outputting? If so, and even if not, it may help to Open the report (acViewPreview) just before the line that Outputs it. Something to try. I have sometimes had better luck with opening an object just before the OutputTo.
 

smig

Registered User.
Local time
Today, 19:19
Joined
Nov 25, 2009
Messages
2,156
Hi. Sounds like maybe a case of slow network traffic. Just as a test, if you create the PDF file from a local copy of the BE, does it still create empty subreports?
I create the PDF on a local machine
 

smig

Registered User.
Local time
Today, 19:19
Joined
Nov 25, 2009
Messages
2,156
Are you manipulating anything about the Report's recordsource (etc) prior to outputting? If so, and even if not, it may help to Open the report (acViewPreview) just before the line that Outputs it. Something to try. I have sometimes had better luck with opening an object just before the OutputTo.
I show the report first
Next the user can click a ribbon to export to PDF and send by email
 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:19
Joined
Oct 29, 2018
Messages
13,332
I create the PDF on a local machine
I imagine that's the case; but, where is the data coming from? Are they also on your local machine?
 

smig

Registered User.
Local time
Today, 19:19
Joined
Nov 25, 2009
Messages
2,156
I imagine that's the case; but, where is the data coming from? Are they also on your local machine?
Yes,
All db is local too
As I said the report is visible before I export it to PDF
 

smig

Registered User.
Local time
Today, 19:19
Joined
Nov 25, 2009
Messages
2,156
As for now I decided to set the acPreview to true so the user can see the PDF file just before it attached to email
 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:19
Joined
Oct 29, 2018
Messages
13,332
As for now I decided to set the acPreview to true so the user can see the PDF file just before it attached to email
Hopefully, that fixes it. Good luck!
 

smig

Registered User.
Local time
Today, 19:19
Joined
Nov 25, 2009
Messages
2,156
Hopefully, that fixes it. Good luck!
Even if it won't fix the problem the user will see the PDF just a sec before he send it.
Hopefully he won't send bad PDFs
 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:19
Joined
Oct 29, 2018
Messages
13,332
Even if it won't fix the problem the user will see the PDF just a sec before he send it.
Hopefully he won't send bad PDFs
My only concern is, I think a report will run twice: one for preview and another for printing or exporting. If so, what you see may not be exactly as what you get in the email, still. Guess we'll see...
 

Users who are viewing this thread

Top Bottom