Hi there,
is anyone know how to conditionally suppress on demand
subreport.I don't want to show the subreport with no records.
I know how to conditionally suppress a subreport but not
on demand. I am using crystal 7
Nat
thanks in advance.
in a section that is always printed, suppress all the sections of the first subreport so it is invisible and return a Shared variable flag which will be True if there is a non-zero count of records and False if the record count is zero
then use this flag in the conditional suppress of the section containing the real on-demand supreport.
The first subreport can be a stripped down version of the real one for speed....tell me if this works...it has been an idea for a while.
I did!!!!!!!!!!!! Jim
but it didnot work for me.
I ve inserted another section b of the group footer.
Drop it into the b section orig subr.
In a section i ve created a duplicate subr.
then created a formula in duplicate subr:
@CheckForNull
whileprintingrecords;
Shared BooleanVar Suppress;if isnull(count(job_no)) or
count(job_no) = 0 then suppress:= true else suppress:= false
placed @CheckForNull in the report header of the duplicate subr
in the 'section expert' where a original subr(a section) is
i created formula
whileprintinrecords;
Shared BooleanVar Suppress = true
but i still can see two reprots
Nat
well first of all you should not "see" two reports....only the second one (the real one) should ever be visible.
If I have this correct you have split the Footer into 2 sections - (A), (B)
If this is true then the "test" subreport would go into Section (A)....this section should be displaying something all the time...other fields...The "Test" subreport is just lurking in the background...invisible since all sections of the subreport are suppressed.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.