Solved Sub Report data dissapears when trying to publish pdf or print (1 Viewer)

tvman5683

Registered User.
Local time
Today, 00:20
Joined
Oct 2, 2008
Messages
38
I created a Report with a sub report using queries with parameters (one is a combo box for a name the other is a date range).
The reports appear together when run and look great. When I try to export as a pdf or print locally the parameter boxes reappear and request input.
Re-entering the parameters doesn't seem to do anything then after cancelling the pop ups the subreport data disappears from the report.
I've been searching the web for a few days looking/learning but have not come accross anything yet to point me in the right direction.
Appreciate any advice on how to troubleshoot.
I've been away from access for about 5 years and trying to recapture some of the knowledge I had.

Thanks IMG_2596.jpg IMG_2597.jpg
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 13:20
Joined
May 7, 2009
Messages
16,875
is the report parameter based on the form controls?
what is the SQL string of your query?
 
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 13:20
Joined
May 7, 2009
Messages
16,875
are you in Report View?
open the Report in Print Preview.
from the Ribbon, you can either Print it on PDF printer Or Export it as PDF/XPS.
 

tvman5683

Registered User.
Local time
Today, 00:20
Joined
Oct 2, 2008
Messages
38
are you in Report View?
open the Report in Print Preview.
from the Ribbon, you can either Print it on PDF printer Or Export it as PDF/XPS.
Thanks for the reply.
When I open the report in the Print Preview the sub report is missing. One of the parameters does come from a combo box on the data entry form I use to add info to the main table of the database


Drivers Daily Payroll Info Drivers Daily Payroll Info

Drivers NameWork DateHoursRateLoads QtyLoads RateTotalAdjustment
Jose Galeno
5/26/2022​
0​
$30.00​
2​
$60.00​
$120.00​

The main report is a YTD summary of the drivers info. The subreport is the previous weeks data. I've even tried reversing the two but the result is always the same

Maybe I can create a sample data base with just the tables, query and reports so I can post it
 

tvman5683

Registered User.
Local time
Today, 00:20
Joined
Oct 2, 2008
Messages
38
Thanks for the reply.
When I open the report in the Print Preview the sub report is missing. One of the parameters does come from a combo box on the data entry form I use to add info to the main table of the database


Drivers Daily Payroll Info Drivers Daily Payroll Info

Drivers NameWork DateHoursRateLoads QtyLoads RateTotalAdjustment
Jose Galeno
5/26/2022​
0​
$30.00​
2​
$60.00​
$120.00​

The main report is a YTD summary of the drivers info. The subreport is the previous weeks data. I've even tried reversing the two but the result is always the same

Maybe I can create a sample data base with just the tables, query and reports so I can post it

Here is the database. From the main form select the driver John then click the YTD totals by Driver button to generate the report.
then when trying to export the PDF you'll see the parameter window pop up.

John
 

Attachments

  • Sample Access Database.accdb
    1.3 MB · Views: 95

tvman5683

Registered User.
Local time
Today, 00:20
Joined
Oct 2, 2008
Messages
38
I found your sample data base named Sub Report headers and imported all my sample database items. I replaced my reports into your Main report to see if placement in the form section was the problem. It didn't work so I'm thinking it's something to do with the parameters in one of the queries?
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 13:20
Joined
May 7, 2009
Messages
16,875
here is a modifed version.
your "subreport" is not in the correct place so i move it to the Detail section.
 

Attachments

  • Sample Access Database.accdb
    1.3 MB · Views: 83
Last edited:

tvman5683

Registered User.
Local time
Today, 00:20
Joined
Oct 2, 2008
Messages
38
Looks fantastic! can't tell you how many times I tried to place it correctly. I'll study your changes so I can replicate. I did notice the date parameter in the subreport query no longer opens. I need it so the subreport reflects only one weeks data as the YTD is a summary of all the data in the main table.
thanks again, I'll keep working on it.

John(y)
 

tvman5683

Registered User.
Local time
Today, 00:20
Joined
Oct 2, 2008
Messages
38
So I restored the date parameter back and it's the same problem. I think I'll need to make a table of the current week data as part of the button process then use that result as the subreport using your changes. I'll let you know how it works out.

Thanks
John
 

tvman5683

Registered User.
Local time
Today, 00:20
Joined
Oct 2, 2008
Messages
38
Oh I see now you have a different way of selecting the date parameter. It works great for the first two reports but not the third(the YTD report).
I'll study it more and see if I can adjust.
 

tvman5683

Registered User.
Local time
Today, 00:20
Joined
Oct 2, 2008
Messages
38
I got it! Swapped out the "total" weekly subreport with 7 day version. That's exactly what I needed. Thanks again. Your improvements to the database are awesome and I have learned alot.

John
 

Users who are viewing this thread

Top Bottom