Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Hiding lines in Balance Sheet when sum is zero Post Reply Post New Topic
Author Message
topcatt89
Newbie
Newbie


Joined: 28 May 2009
Online Status: Offline
Posts: 4
Quote topcatt89 Replybullet Topic: Hiding lines in Balance Sheet when sum is zero
     Posted: 29 May 2009 at 8:22am

Despite the title, its when the sum is between 1 and negative 1, but that didn't fit.

Here is the scenario, and I can provide more information if I have left anything important out.
 
We are pulling summary account names and their totals from our accounting software to create a dynamic balance sheet.
 
We have 6 different entities, so not all summary accounts are applicable to each entity but we'd like to use the same Crystal report.
 
The report is set up to pull the Balance sheet section and then the summary accounts (about 50)  in subsections with subtotals by subsection (Current Assets, Current Liabilties, Other Assets, etc) and then a total for section (Assets and Liability & Net Assets).
 
The balance sheet shows data for three periods, last year's end, current month and prior month in three columns, with a data point for each summary account.
 
What I am trying to accomplish and struggling with is being able to hide the summary account title and corresponding data points, when all three columns prior year, current month and prior month, total between 1 and -1, essentially zero.
 
I have tried using formatting but this just hides the text and numbers but leaves a big blank space in its stead. What I want is to only show the lines when there is a large amount so it looks like each entity's report was created specifically for that entity and only includes the pertinant accounts.
 
The formula I am using on the section expert  corresponding header's suppress is:
 
Sum ({@Current Month}, {@Summary Account Classification})<1 and Sum ({@Current Month}, {@Summary Account Classification})>-1
and Sum ({@Prior Month}, {@Summary Account Classification})<1 and Sum ({@Prior Month}, {@Summary Account Classification})>-1
and Sum ({@Prior Year End}, {@Summary Account Classification})<1 and Sum ({@Prior Year End}, {@Summary Account Classification})>-1
 
But no luck. It seems like a simple concept but I can't figure out how to make it happen.
 
 


Edited by topcatt89 - 29 May 2009 at 8:23am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 29 May 2009 at 8:56am
Originally posted by topcatt89

I have tried using formatting but this just hides the text and numbers but leaves a big blank space in its stead. 
 
If you got this to function correctly you could just use the Suppress "Blank section" option in the Section expert. If all the fields are suppressed and that is checked as True it also suppresses the section itself.
 
Not sure about why the other is not functioning but you could try altering it to:
(Sum ({@Current Month}, {@Summary Account Classification}) in -1 to 1)
and
(Sum ({@Prior Month}, {@Summary Account Classification}) in -1 to 1)
and
( Sum ({@Prior Year End}, {@Summary Account Classification}) in -1 to 1)
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 01 Jun 2009 at 6:27am
How I tend to debug things like this is to make a formula of the suppression criteria and then display the formula.  The first one would just look and see see if it returns true or false (since that is what a suppression formula does), then I when I found an incorrect response, I would start listing the various parts out in different formulas or as a concatenated string and checking if the values match with other parts of the report.  I usually find where I went wrong doing this.
 
HTH
IP IP Logged
topcatt89
Newbie
Newbie


Joined: 28 May 2009
Online Status: Offline
Posts: 4
Quote topcatt89 Replybullet Posted: 01 Jun 2009 at 8:34am
Originally posted by DBlank

Originally posted by topcatt89

I have tried using formatting but this just hides the text and numbers but leaves a big blank space in its stead. 
 
If you got this to function correctly you could just use the Suppress "Blank section" option in the Section expert. If all the fields are suppressed and that is checked as True it also suppresses the section itself.
 
Not sure about why the other is not functioning but you could try altering it to:
(Sum ({@Current Month}, {@Summary Account Classification}) in -1 to 1)
and
(Sum ({@Prior Month}, {@Summary Account Classification}) in -1 to 1)
and
( Sum ({@Prior Year End}, {@Summary Account Classification}) in -1 to 1)
 
I wish, something must not be right, because even with that suppressed (box checked) it still leaves the gap.
 
I guess Crystal is not considering these lines as an entire section, which they really aren't just parts within one.


Edited by topcatt89 - 01 Jun 2009 at 8:38am
IP IP Logged
topcatt89
Newbie
Newbie


Joined: 28 May 2009
Online Status: Offline
Posts: 4
Quote topcatt89 Replybullet Posted: 01 Jun 2009 at 8:36am
Originally posted by lockwelle

How I tend to debug things like this is to make a formula of the suppression criteria and then display the formula.  The first one would just look and see see if it returns true or false (since that is what a suppression formula does), then I when I found an incorrect response, I would start listing the various parts out in different formulas or as a concatenated string and checking if the values match with other parts of the report.  I usually find where I went wrong doing this.
 
HTH
 
Thanks for the idea, Ill play around with that. Have month end close today so won't be able to spend anytime on it until tomorrow.
IP IP Logged
topcatt89
Newbie
Newbie


Joined: 28 May 2009
Online Status: Offline
Posts: 4
Quote topcatt89 Replybullet Posted: 18 Jun 2009 at 5:26am
Resolved! It may be a convoluted way of doing it, but it worked.
 
I made a formula field (CombinedTotal) that added up the three columns (current, prior month and prior year) as I showed above.
 
I made another formula field (SupressZero) that referenced my Combined total. Specifically: If (CombinedTotal) >-1 and (CombinedTotal) <1 then "Y", Else "N".
 
I put both of these formula fields (suppressed/hidden) on the Group header and Group footer for my data section in the Report design view.
 
Then on the Select Expert Suppress for those header and footers, I put the line: (SuppressZero) = "Y"
 
Thanks again for the suggestions.


Edited by topcatt89 - 18 Jun 2009 at 5:27am
IP IP Logged
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