Report is blank when opened. Print preview ok. Print ok

fabiobarreto10

Registered User.
Local time
Yesterday, 20:08
Joined
Dec 28, 2011
Messages
45
Friends, I have a report with eight subs. I was trying not to show empty sub, and in subreport also part white.

Resolved, but to place it can shrink and can expand,
for all sections of all subreports also placed time zero for all subreports.
In the event when loading the subreport I repeat this code for each sub:
Then if Me.Filho0.Report.HasData
Me.Filho0.Visible = True
else
Me.Filho0.Visible = False
end If
In the event if you are not given for each sub I put:
cancel = True
As I open the report it is all empty, but when I print, it prints perfectly, if the sub is no data, shows
and also the sub fully expand.
Only when I open'm not seeing anything.
Thank you.
 
I don't quite follow your question. What event did you put the code? And what really is the problem? If you can explain differently that would be great.
 
Okay, I'll prepare better.

I created eight reports using the wizard through eight different queries.
Then I created a report with 8 subs using reports created earlier.
I'm trying to hide subs when empty, and also not to be blanks.
I managed to do this using the following procedures:


In the event of the report to load, I repeat this code for each sub:

if Me.Filho0.Report.HasData Then
Me.Filho0.Visible = True
else
Me.Filho0.Visible = False
end If
...

In the properties of all sections of each sub:

You can enlarge = Yes
Can Reduce = Yes

In all the subs I put zero height:

In no event since the sub:

cancel = True

Only when I open the report it is blank, showing only the header.
Picture1 = Before opening the report. I'll double-click the selected report with the name of AndirleiGeral
Picture2 = See, you can only view the header of the report, the detail is blank.
Picture3 = Print Preview mode.
 

Attachments

vbaInet, thank you for your help, Sorry for being slow to respond, I was without internet.

I was able to partially resolve.I put a button on the form to open the report.

Thus, it opens directly in Print Preview, subreports showing correctly and also printing correctly.


Again, thank you.
 
I don't have much time to open your database now but what's the idea behind the 8 different queries? Do they not all have the same fields?
 

Users who are viewing this thread

Back
Top Bottom