Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Hide field in the report Post Reply Post New Topic
Page  of 2 Next >>
Author Message
ccouto
Newbie
Newbie


Joined: 20 Jun 2012
Location: Brazil
Online Status: Offline
Posts: 23
Quote ccouto Replybullet Topic: Hide field in the report
    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.!
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet 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:
 
 
(This assumes that {@Balance} is the formula to give you the balance.)
 
-Dell
IP IP Logged
CaptnTony
Newbie
Newbie
Avatar

Joined: 15 Jun 2012
Location: United States
Online Status: Offline
Posts: 11
Quote CaptnTony Replybullet 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.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet 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
IP IP Logged
CaptnTony
Newbie
Newbie
Avatar

Joined: 15 Jun 2012
Location: United States
Online Status: Offline
Posts: 11
Quote CaptnTony Replybullet 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.
IP IP Logged
ccouto
Newbie
Newbie


Joined: 20 Jun 2012
Location: Brazil
Online Status: Offline
Posts: 23
Quote ccouto Replybullet 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.
IP IP Logged
ccouto
Newbie
Newbie


Joined: 20 Jun 2012
Location: Brazil
Online Status: Offline
Posts: 23
Quote ccouto Replybullet 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.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet 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
IP IP Logged
ccouto
Newbie
Newbie


Joined: 20 Jun 2012
Location: Brazil
Online Status: Offline
Posts: 23
Quote ccouto Replybullet 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"
IP IP Logged
ccouto
Newbie
Newbie


Joined: 20 Jun 2012
Location: Brazil
Online Status: Offline
Posts: 23
Quote ccouto Replybullet 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"
IP IP Logged
Page  of 2 Next >>
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.047 seconds.