Print Page | Close Window

Hide field in the report

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=16807
Printed Date: 04 May 2024 at 8:35am


Topic: Hide field in the report
Posted By: ccouto
Subject: Hide field in the report
Date Posted: 20 Jun 2012 at 4:03am
Good morning!

People I'm learning to use the tool of Crystal and I m facing with some doubts.

Come on ..

I have a report as well

Cod. Drive -------consumer product --- ----- --- Balance

Grade 1
Type: 9
Class: 65
Sub-Class: 23

9999 - Olive ----- 1 --- 10 ---   23
9456-Maçã  ----- 1 --- 23 --- 0


I was wondering how do I not aparec the line containing the product with the balance equal to ZERO.


I hope you understand.

Thank you.!



Replies:
Posted By: hilfy
Date Posted: 20 Jun 2012 at 7:14am
Is balance a field coming from your data or is it something you're calculating?  If it's a field in your data, go to the Select Expert, select the field then "Is Greater Than" and type in 0. 
If it's calculated, go to the Section Expert for the details section where this data appears.  Click on the formula button to the right of "Suppress" (do NOT check the Suppress checkbox!) and enter something like the following:
 
mailto:%7b@Balance - {@Balance } = 0
 
(This assumes that mailto:%7b@Balance - {@Balance } is the formula to give you the balance.)
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: CaptnTony
Date Posted: 20 Jun 2012 at 10:16am
Does this suppress using a formula work just for the textbox containing the data or can it be applied to the label that is also associated with it so the line that the label and data item would just be 'skipped' when there is no value or that value is zero?

I've got a standard (boiler plate) report header that I want to create, but there are some pieces of data (right now usually on their own line of the report) that I not only want suppressed, but I also want that line ignored and the next line of the report to print where this line would have been.  Sort of like the address1 and address2 then city,state, zip lines on a label - you don't want to see a blank line if address2 is 'empty', you'd like to have the city, state zip info print right below the address1 information.

Thanks in advance.

Todd


-------------
Just because you can doesn't mean you should.


Posted By: hilfy
Date Posted: 20 Jun 2012 at 10:28am
If you suppress the section, it will suppress everything that's contained in the section and the next section will appear where the suppressed section would have been if it weren't suppressed.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: CaptnTony
Date Posted: 20 Jun 2012 at 11:50am
Thanks, I'll look at that.  Appreciate the quick reply!

Todd



-------------
Just because you can doesn't mean you should.


Posted By: ccouto
Date Posted: 21 Jun 2012 at 2:57am
I performed the procedure you went, but not working.
I noticed that there already exists within that parameter q is a formula that's why it does not work?
Formula that there is: -
Goup header [] Supreess: if Sum ({@} ConsumoMedio, AGR_DEM_MOV_ITENS_V.ID_PRODUTO {}) = 0 then
true

this put more balance if {@} = 0 then true

a complete formula that this suppression is the formula:

if Sum ({@} ConsumoMedio, AGR_DEM_MOV_ITENS_V.ID_PRODUTO {}) = 0 then true

and
  balance if {@} = 0 then true

But who are the products keep coming up with a negative balance.


Posted By: ccouto
Date Posted: 21 Jun 2012 at 2:59am
correction formula is as follows:
if Sum ({@ConsumoMedio}, {AGR_DEM_MOV_ITENS_V.ID_PRODUTO}) = 0 then true

and
  balance if {@Saldo} = 0 then true

But who are the products keep coming up with a negative balance.


Posted By: hilfy
Date Posted: 21 Jun 2012 at 3:25am
Do you want to suppress just those with a 0 balance or those with negative balances as well?  Also, you don't need the if...then construct here because the comparison to 0 gives you a true or false already.
If you want to suppress everything that's less than 0, I would do the following:
 
Sum ({@ConsumoMedio}, {AGR_DEM_MOV_ITENS_V.ID_PRODUTO}) and {@Saldo} <= 0
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: ccouto
Date Posted: 21 Jun 2012 at 4:10am
I like putting the formula is showing the following message:

Sum ({@ConsumoMedio}, {AGR_DEM_MOV_ITENS_V.ID_PRODUTO}) and {@Saldo} <= 0  then true

"Remaining the text does not Appear to be part of the formula"

And so the formula:

Sum ({@ConsumoMedio}, {AGR_DEM_MOV_ITENS_V.ID_PRODUTO}) and {@Saldo} <= 0  then true
 
  the message that appears is:
  "a boolean is required here"


Posted By: ccouto
Date Posted: 21 Jun 2012 at 4:12am

And
so the formula:

Sum ({@ConsumoMedio}, {AGR_DEM_MOV_ITENS_V.ID_PRODUTO}) and {@Saldo} <= 0 
 
  the message that appears is:
  "a boolean is required here"


Posted By: ccouto
Date Posted: 21 Jun 2012 at 4:20am
thanks for giving me strength,
is trying to help me


Posted By: hilfy
Date Posted: 21 Jun 2012 at 4:22am
Look again at what I posted - you forgot the first "<= 0".
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: ccouto
Date Posted: 21 Jun 2012 at 4:30am
He would look like?
Sum ({@ConsumoMedio}, {AGR_DEM_MOV_ITENS_V.ID_PRODUTO}) and {@Saldo} <= 0
correct?
If yes, was so placed.
:(



Posted By: hilfy
Date Posted: 21 Jun 2012 at 4:46am
No.
 
Sum ({@ConsumoMedio}, {AGR_DEM_MOV_ITENS_V.ID_PRODUTO}) <= 0 and {@Saldo} <= 0
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: ccouto
Date Posted: 21 Jun 2012 at 4:56am
Continued from products that have zero balance.

Come on, I'm doing steps:
I have 6 groups (company, type, grade, class, subclass and product)
In the group header # 6 I put all the data to be printed.
 
I was there in the section expert, selected the group header # 6 clicked the formula button next to SUPPRES (the drill down) and typed the formula that you directed me, had not missed test and the compilation of the formula.

Sum ({@ConsumoMedio}, {AGR_DEM_MOV_ITENS_V.ID_PRODUTO}) <= 0 and {@Saldo} <= 0


However when I print the balance = 0 keeps coming.

I did something wrong? : (


Posted By: hilfy
Date Posted: 21 Jun 2012 at 5:04am
If you're doing this in a group header section, you might want to try using this formula in the Group Selection formula.
To do this, click on the down-arrow just to the right of the Select Expert button and select "Group" or go to the Report Menu, Select Expert, Group.  Then select any field that's on your report - this is just so that the Select Expert will come up and you can get to the formula to edit it manually.  If you don't see the formula, click on the "Show Formula" button.  Paste in the formula that we've been working on and click on "OK".
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: ccouto
Date Posted: 21 Jun 2012 at 6:50am
Could you send me this screen for my email?
I cant find.

carine.couttto@gmail.com

Sorry, I'm now learning to use the crystal.




Posted By: ccouto
Date Posted: 21 Jun 2012 at 7:07am
Friend, I tested here and it worked!! = D
Thank you very much.!! hehehe


I was in expert selection
I selected the option goup and typed the following formula

  SaldoFinal @ {} <> 0

  And apparently it worked.


Posted By: ccouto
Date Posted: 21 Jun 2012 at 7:07am
Friend, I tested here and it worked!! = D
Thank you very much.!! hehehe


I was in expert selection
I selected the option goup and typed the following formula

 {@SaldoFinal} <> 0

  And apparently it worked.



Print Page | Close Window