Avatar of MKItani
MKItani
 asked on

suppress subrepot+crystal bundled vs 2008+window application

Hi All,
I have a report call another subreport s follows:

Page Header

Group Header
Detail
Group Footer
Subreport

in case the subreport doesn't have a records i want to suppress the subreport or the group footer that involves the subreport how i can do it?

Regards,
Crystal Reports

Avatar of undefined
Last Comment
Mike McCracken

8/22/2022 - Mon
PANkaj Kumar

Dear,

simply put your sub report by default size( don't re-size sub report) and remove all unwanted space.
Mike McCracken

If there are no records you need to make sure the subreport doesn't display anything like header text.

You can conditionally suppress all sections of the subreport with

Count({SomeField}) = 0

You can then format the subreport
On the last tab there is an option to SUPPRESS BLANK SUBREPORT

You can then suppress the section it is in with
SUPPRESS BLANK SECTION in the Section Expert.

mlmcc
MKItani

ASKER
t U mlmcc i did what you wrote above but i still have a problem because in the section group footer i have the option "new page Before" so i still show a blank page.
what is your suggestion?
what i think about is to add a condition formula to the "new page Before" so in case is suppress so we don't add a new page.
but how i can write this formula?

Regards,
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Mike McCracken

I don't think there is a formula to control that because the NEW PAGE BEFORE is done before the section is built.  Is there another section with a NEW PAGE BEFORE?

mlmcc
MKItani

ASKER
T U mlmcc,
look group footer is devised in two sections footer a and footer b and the sub-report is inserted in the second b, and i don't have any problem if you want to set the "NEW PAGE BEFORE" in any section you want but i want to get the desired result.

regards.
Mike McCracken

I was asking is there another section that haas NEW PAGE BEFORE set because if you have 2 of them you might get the blank page

GH1 - New Page Bfore
Details
GF1 - New Page Before with subreport

If no records in the subreport you are still at the top of the page and when the next group is done you get a New Page again thus a blank page.

Try this
Put the New Page Before on the Subreport report header or detail section

mlmcc
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
MKItani

ASKER
t U a lot mlmcc,

the hierarchy of the report is as follow:

Page Header

Group Header
Detail
Group Footer a
Group Footer b
Subreport

no i don't have a new page before in another section and in case i suppress the group footer section at design time i don't get a blank page so the problem is he execute the "new page before" in the section footer before to suppress the sub-report so for this reason i ask you how i can set a formula to "new page before" in case the section isn't suppressed?

In case i put the "new page before "in page header of the subreport instead of the group footer of the main report, it doesn't work.

regards
MKItani

ASKER
also i have removed "new page before" from the group footer section of the main report and also in case the main report involved records and the sub-reports doesn't involved records i show a blank page so maybe the option "suppress blank section" doesn't work in case there is a sub-report because in the format object of the sub report i set "suppress blank section".

regards,
Mike McCracken

Can you upload the report?

mlmcc
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
MKItani

ASKER
T U mlmcc,

Please find the attachment file.

regards,
VendorStatementAccountsReport.rpt
Mike McCracken

I don't particularly see anything wrong.  The subreport GF1 wasn't suppressed so I suppressed it.

I changed the NEW PAGE BEFORE to check for > 0 records

mlmcc
VendorStatementAccountsReportRev.rpt
MKItani

ASKER
T U mlmcc,
where i can found the change:
I changed the NEW PAGE BEFORE to check for > 0 records

regards,
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
Mike McCracken

In the subreport GH3

mlmcc
MKItani

ASKER
i am still wainting for an accurate answer for my question:
"in case the subreport doesn't have a records i want to suppress the subreport or the group footer that involves the subreport how i can do it?"
ASKER CERTIFIED SOLUTION
Mike McCracken

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
MKItani

ASKER
yes i will try it TU.
Your help has saved me hundreds of hours of internet surfing.
fblack61
Mike McCracken

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.