Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Suppress Group Section From Detail Section 2

Status
Not open for further replies.

KARMENDRA

Programmer
Jan 22, 2004
9
US
Hi!I want to creat report which need to suppress detail section as well as header section depend upon some status in Detail Section.Like
UNIT ID (Group by Unit ID)
235 DATE STATUS
8/12/2003 A
9/8/2003 E
236 11/3/2003 C
11/5/2003 D
11/17/2003 E

If Status is E then it needs to suppress detail section as well as header section(235).
I create subreport & place in header section & was able to suppress detail section but as I place subreport at header section my header section did not suppress.It still showing me a blank section.Any Idea or other method to suppress detail & header section depend upon condition from Detail Records?Early help will be higly appreciated.
Thanks
 
Which Crystal? I have Crystal 8.5, but I understand that Crystal 9 has a print-suppression option that covers it.

In Crystal 8.5, the problem is that the decision to print or suppress is made before a subreport in the section is evaluated. There is a work-round, see thread782-477236

Madawc Williams
East Anglia, Great Britain
 
Cant you just change your record selection so that this way you only get the desired records and then you can format them?

Kchaudhry
 
I'm using Crystal 9.0 with DATAFLEX .dat file.I cannot write store procs or sql statment.How can I use a print suppression? or Record Selection
 
Well, I am using CR 8.5 here and this is what I do for record selection.

Report > Edit Selection Formula > Record

then enter the formula

{table.fieldname} <> &quot;E&quot;

or you can also use

{table.fieldname} in [&quot;A&quot;, &quot;C&quot; , &quot;D&quot;]

Hope this helps.

Kchaudhry
 
Thanks for your suggestion But I want to Suppress whole group Section for status= E.It should supress all record in detail section for Unit ID = 235.

What I did:
Create Sub Report,Link with Unit Id.Shared Variable status with Main Report.Add Sub Report in Group Header Section(Unit ID).Supress Detail Section of Main Report Depend upon
Shared Variable.It works but creat Empty Space for status E in main Report.I want to Supress Group Section as well as detail section.
 
Your example is a little confusing. Do you mean to suppress records only if the most recent status = &quot;E&quot; or if any of the records within the group have status = &quot;E&quot;?

What are the possible values in the status range? And are statuses sequential so that an &quot;E&quot; record is always more recent than an &quot;A&quot; record?

If the range is from &quot;A&quot; to &quot;E&quot; and &quot;E&quot; is always the most recent record then you only need to detect the presence of &quot;E&quot;. You could use a suppression formula for the group header and details section of:

maximum({table.status},{table.unitID}) = &quot;E&quot;

If &quot;E&quot; could be something other than the most recent record, or if the range of statuses include later letters in the alphabet, but you want to suppress if there are any &quot;E's&quot; in the group, then you could create a formula {@E} for the details section:

if {table.status} = &quot;E&quot; then 1 else 0

Then use a suppression formula for the group header/details sections of:

sum({@E},{table.unitID}) > 0

More information would help.

-LB
 
Thanks lbass.Sorry for late response.Yes I mean all records with group need to suppress if any record have status = &quot;E&quot;.
Yes There might be more status to look at.I will try your suggestion this week end & will get back to you.

Thanks Again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top