subreport

icemonster

Registered User.
Local time
Today, 03:53
Joined
Jan 30, 2010
Messages
502
hi..

i have a question, this may had been asked already, i have a report that has a subreport, on the print preview, it shows up fine, but when i convert it to pdf or try to print it, it wont show up.

what could be causing this?
 
That is a coincidence. I have a very similar problem. See my thread:
http://www.access-programmers.co.uk/forums/showthread.php?p=962896#post962896

I don't have an answer yet, but a workaround for you might be to go into the Design view of your report, and go into the query that is the Record Source behind the report. Then filter that query so it produces fewer records. Save the query and then try it. Does it work now?

Take a look at my thread. You can try PNGBill's solutions also. See if that helps.

Thanks,
 
i just solved my problem by removing "FormatCurrency" from a query that was behind my chart in my subreport.

Check out my thread. (see link in post above)

Maybe it will work for you too.
 
Greetings IceMonster,

You posted this quite awhile ago, but Id thought I'd check if you or anyone has a solution as I'm having the same problem.

Like you I have a sub report within a report that shows up as expected in print view. However when I try to print, or export to a pdf, only the contents of the report (main) display and the sub report is ignored. Really odd.

I experimented and reduced my sub report to simply a single text box... no data what-so-ever is pulled from the database, and same results. Theres no header, nor no footer, just a detail section with one text box. A real head scratcher.

Can anyone offer a solution?

Thanks

Pags
 
I was able to find a fix for this issue.

In debugging this I learned that even though the complete report is displayed on screen in print-view, it actually gets regenerated when you either export it to a PDF or actually print it. The bug was due the query failing in the sub-report during the report regeneration. The puzzle was why did the initially report get generated correctly when displayed to the screen but failed during the regeneration of either a PDF or an actual printout?

I found that the query was failing in the regeneration because the sub-report (summary section) can't access a variable it uses for the query, which remains a mystery to me. I have this variable, defined in a public module as a public global variable, which means that all code should be able to access it. But for some reason, that I don't understand, the sub-report code cannot see it when the report is regenerated for a PDF or actual printout.... seems to me to be a MS Access issue and not a programming error.

I fixed it by changing the sub-report query to refer to a field in the main report which gets populated from the public global variable instead of the public global variable defined in a public module. This works, but why can the main report access this global public variable when the sub-report cannot?
 
This is an obvious bug... has anyone reported it to MS? Has anyone found a solution as none posted so far seem permanent.
 
I have the same problem no matter what format I export in. i.e. .pdf, .html, or .xps
 

Users who are viewing this thread

Back
Top Bottom