sub-report visible-not visible question/problem

GaryPanic

Smoke me a Kipper,Skipper
Local time
Today, 03:22
Joined
Nov 8, 2005
Messages
3,309
Guys - i am just about to get into a report ....

anyway the main report is fine and dandy, but(ther's always a but...)
occasionaly I need a sunreport to be actived - -
now I have a control on my form (table) that when tick i want a subreport to be used, now I may be having a blonde moment -

contol is called muiltievent
and the report is called muiltEQ
main report

quote - I think it will be on the properties of the report if mulitevent = -1 then do report ??? else etc

do this sound like the right route , what I don't want is a plain piece of paper to appear , i could do some awkard coding - but have i missed the plot

recap
if ticked do subreport, if not no subreport (nothing - no plain paper etc)

your thoughts

g:rolleyes:
 
Easiest way i know (and im sure you have thought of this) is make 2 reports . if ticked print one if not print the other... course that gets to be a pain in the ass when you want to change the look of em
 
Thats excatly what i don't want to do ..
its a bugger


how about page breaks

what i kinda have in mind is

i have the control for when i what it (so we ok with that lets call it Xcontol)
on the report propeties
have pages break but if false they aren't there and the same with the report ? does this sound do-able - reason why i want this i am going down a pdf/email/file storage route - and a blank page will be a bitch

or are page breaks a fixed item ?
if page breaks are off and on-able -this would solve the prob ??
(thanks for the response, even though thats exactly what i don't want)
 
For the subreport, I would try this air-code in the format event of the section containing the subreport control:

Code:
If Me.muiltievent = True Then
  Me.SubReportControl.Visible = True
Else
  Me.SubReportControl.Visible = False
End If
 
Last edited:
i believe they are fixed.
Reason is that when you have a page break on your report and you have an expandable detail section, it doesn't care and will break it right in the middle if it can ( at least in my experience)

what if u set the print range to 1 when u go to pdf it? would that work? im not sure how to edit print range, but i think that could get rid of your blank page
 
Pbaldy..

Yeah thats the logical way..but this subreport must come in a set potion- so i need a page break insert subreport, page break- but i will try your method - its the blank page I don't want - cos I am trying to be a little clever with my paper usage - firstpagefront quote, first page back defination,2ndpage will be this subreport if required and if not then become clauses-endorsemnts etc,then front3 page back 3rd page - ther are ways round it but its the logic thats thrown me _ I ll try your suggestion- I haven't even tried this yet -so your answer might work - i was more brain storming over a brandy -getting my head together b4 i start this..

but your response is welcomed .

and Ray - its a bugger about page breaks that really would of solved this problem nice and quick -
 
Bugger - tried Pbaldy solution - and (big thanks for this anyway ) did not work

now it does what you expect - if true show sub report, if not don't - but it still puts in a blank page - its the blank page i am trying to get rid of..

now its either me puting this report in too low on the page(I donlt think so) or it just does it -

any one esle got views on this
 
ok hers the code so far
mulitevents is the control
mulitexpendQ is the subreport


If Me!multievents = True Then
Me!mulitexpendQ.Visible = True

Else
If Me!multievents = False Then
Me!mulitexpendQ.Visible = False
End If


or am I barking up the wrong tree -i can redesign where this goes in my report buit ideally it should be page 3 (the subreport is a list - could be short - could be a couple of pages long- )- I could make it the last page , but .. does not look right
 
If you're getting a blank page it's probably the margins that are wrong
 
wish it was that easy - cos when i want the sub report-its all hunky dorie
and as i want it - (no extra page)
 
if you weren't so far away - I'd kiss you -- been having a hissy fit over this .

works a charm ( it's always simple after you know it -)
tidies up my report exactly as i want it - not that helps further along the line - big big thanks

:D
Ta -
 
Set the can shrink to yes

I am having exactly the same issue. Well mine is that my sub reports have queries built into them to determine whather a record exists in order to display the sub report or not. If there is no record to display it does not display the form, but it does leave a blank page.

Can anyone help with this? If it is as simple as setting the Can Shrink setting, where do I set that? I have tried setting it in the subreport propeties, the section properties of the form?!!!!

I don't know what else to try to stop this blank pages apearing!
 
It's OK I set the can shrink to both the sub report and the relevant sections of the main report and it works like a treat!!!!

Thanks you guys for this thread, it has helped me out, no end. And no need for any VB code!
 

Users who are viewing this thread

Back
Top Bottom