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

    [RESOLVED] Suppressing Data

    Hi,

    I'm having trouble with running totals.

    I would like to only have the top 10 results in each group (added to the average sum), although the suppressing only shows 10 lines, it's adding all cells in the background to the sums as shown in the attachment.

    Is there away to solve this?

    Any help would be must appreciated

    Name:  report.jpg
Views: 724
Size:  87.7 KB

  2. #2
    Join Date
    Jul 2005
    Posts
    1,083

    Re: Suppressing Data

    Then change to formula fields instead of running totals fields
    ...and in the formula start with :
    Code:
    WhilePrintingRecords
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

  3. #3
    Join Date
    Sep 2013
    Posts
    4

    Re: Suppressing Data

    Thanks for that!

    When using whileprintingrecords, do you have it so that it < 10 or against the boolean column when it = true?

    Little bit new to crystal reports.

    Thanks

  4. #4
    Join Date
    Jul 2005
    Posts
    1,083

    Re: Suppressing Data

    When we use WhilePrintingRecords, it mean that the formula it's going to be calculated exactly when the records are printed
    So if you already have suppressed some records, these suppressed records are not going to be considered in the sum, only the printed ones
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

  5. #5
    Join Date
    Sep 2013
    Posts
    4

    Re: Suppressing Data

    If I'm not mistaken...WhilePrinitingRecords I'm unable to then calculate sums based on sums that have already used WhilePrintingRecords?

    If this is the case then it won't work for me as the sums in red are based on the sums already calculated?

    Thanks

  6. #6
    Join Date
    Jul 2005
    Posts
    1,083

    Re: Suppressing Data

    You could do it if you change from RunningTotal fields to Formula fields as I posted in post #2
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

  7. #7
    Join Date
    Sep 2013
    Posts
    4

    Re: Suppressing Data

    Sorted!!! Used two shared variables, first being a counter and the second plusing the table field all the time it was less than 10.

    Happy days...Thanks again

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