CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 2013
    Posts
    5

    Question Suppress section based on condition

    I have a CR with a footer containing the encumbered summary. I want to suppress the section based on that encumbered summary; ie, when the encumbered summary value is zero or a positive value, the whole section should be suppressed.
    The section suppression has this condition: Sum ({@Encumbered}, {@2DigitCat})>=0. Most, but not all, sections that are equal to 0 are getting suppressed. I've attached a file with a screenshot. I’m using CR 2011. Many thanks for your time.
    Attached Images Attached Images

  2. #2
    Join Date
    Aug 2007
    Posts
    179

    Re: Suppress section based on condition

    I think your problem is that you are attempting to suppress a footer sections based on the results of a formula within the footer section. If you examine your report output, and the underlying data closely, I think you will find you are suppressing one footer based on the output of the pervious footer. You need a means to evaluate your suppression condition before the section you want to suppress is printed. I suggest you write a stored procedure that returns the results set your report uses and also includes the encumbered summary. Then you can suppress output based on the pre-aggregated summary. https://msdn.microsoft.com/en-us/lib...(v=vs.80).aspx

  3. #3
    Join Date
    May 2013
    Posts
    5

    Re: Suppress section based on condition

    Thank you. I found that the zero values that I tried to suppress are being treated as negative values. I see no reason for that.
    For example, 1572.33-1572.33=0, which should suppress the section. The data is stored as 2 decimal places. I've carried the zero result out to 10 decimal places, there are only zeros. If I use the round function on the conditional suppression formula, the sections with zeros are suppressed. I don't understand why zero is considered negative in only a dozen records out of thousands.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured