cancel
Showing results for 
Search instead for 
Did you mean: 

Create new detail section and suppress old based on a condition

Former Member
0 Kudos
88

Hi All,

I am having trouble figuring out how to suppress a detail section when condition is true. I have a detail section (Detail Section A) on the report which displays all the details by default based on the linecodes {Invoice_Details_Prn.sLineCode}.

I want to create to new detail section (Detail Section B) similar to what I have right now. When the {Invoice_Details_Prn.sLineCode}=["CL"] then I want to the old detail section (Detail Section A)  to be suppressed. I don't want to use suppress section. The reason, I am trying to create the new detail section is ; I have other  {Invoice_Details_Prn.sLineCode}=["FR","PO"] to display when {Invoice_Details_Prn.sLineCode}=["CL"]. Can someone give a hand on this? Thanks.

Amol

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Can anybody help me out to deal with this issue? Thanks.

Amol

Former Member
0 Kudos

Hi Abhilash/Dell,

I tried using both the conditions you guys mentioned above. Do not seem to work.

Thanks,

Amol

abhilash_kumar
Active Contributor
0 Kudos

Hi Amol,

Both the Details Section a and b essentially 'look' at the same database value.

Meaning, if the value of the database field {Invoice_Details_Prn.sLineCode} on particular row is equal to 'CL', the both Details Section a and b will show the same value.


Also, how do you plan to do this without a suppress condition anyway?


-Abhilash

Former Member
0 Kudos

Hi Abilash/Ido,

Can you guys help me with the suppress condition for Detail A and Detail B section on my report?

Thanks,

Amol

abhilash_kumar
Active Contributor
0 Kudos

Please provide more examples of when you wish to suppress and unsuppress the Details A and B sections.

-Abhilash

DellSC
Active Contributor
0 Kudos

Go to the Section Expert for DetailsA and click on the formula button to the right of "Suppress" (DO NOT check the checkbox!.  Enter the following:  {Invoice_Details_Prn.sLineCode}=["CL"]

Do the same for DetailsB and enter the formula:  {Invoice_Details_Prn.sLineCode}<>["CL"]

-Dell

Former Member
0 Kudos

I want to suppress Detail Section A when {Invoice_Details_Prn.sLineCode}="CL" and {Invoice_Details_Prn.sLineCode}="FR" and show Detail Section B.

Second condition- If {Invoice_Details_Prn.sLineCode} in ["1","2","6","7","Q","Q1"] then suppress Detail Section B and show Detail Section A.

Thanks,

Amol

abhilash_kumar
Active Contributor
0 Kudos

Hi Amol,

Go to the suppress formula for Details A and use this code:

{Invoice_Details_Prn.sLineCode} IN ["CL","FR"]

Go to the suppress formula for Details A and use this code:

{Invoice_Details_Prn.sLineCode} in ["1","2","6","7","Q","Q1"]

-Abhilash

Former Member
0 Kudos

Abhilash,

The first condition works fine - {Invoice_Details_Prn.sLineCode} IN ["CL","FR"]

In second condition detail lines having - {Invoice_Details_Prn.sLineCode} in ["1","2","6","7","Q","Q1"] does not suppress.

Thanks,

Amol

DellSC
Active Contributor
0 Kudos

Is the Suppress checkbox checked?  If so, uncheck it.

-Dell

abhilash_kumar
Active Contributor
0 Kudos

I don't think the checkbox matters, Dell.

The formula 'overrides' the checkbox anyway!

-Abhilash

Former Member
0 Kudos

Yes, the checkbox is unchecked.

DellSC
Active Contributor
0 Kudos

Actually, I've seen different results with suppression formulas with checked vs. unchecked.  This may have been in earlier versions of Crystal though (considering how many versions I've actually used.....) and it may not be true now.

-Dell

Former Member
0 Kudos

Hi Dell,

I tried using the above formula as you suggested. The detail section shows all the detail lines including linecode CL. Is there a way detail section B will show only the detail lines when {Invoice_Details_Prn.sLineCode} = ["CL"] ? I am stuck with issue for too long. Please help. Thanks.

Amol

ido_millet
Active Contributor
0 Kudos

Use expressions to control the suppress attribute of Detail a and Detail b sections.