• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1223
  • Last Modified:

Crystal report sum of n rows

Hi,
1, I want to generate a report for 100 records.
Now a page max should show 30 row and page report it should show sum of the amount colum of 30 row
In next page it should next 30 rows in footer it should show first row as forwared total page and then total(forwarded amount + this page toal) and the last page should show grand total.
How to achieve this.
2. how is printDocument different crystal report viewer
3. in crystal report how to supress linking of sub report, in sense currently if I click on the sub-report it goes to sub report rpt, i want to suppress this.
0
Maverick_Cool
Asked:
Maverick_Cool
  • 2
1 Solution
 
mlmccCommented:
Will you always show 30 rows if there are more than 30 records or might you show fewer records?

Try this idea
In the report header add a formula
WhilePrintingRecords;
Global NumberVar myRecordCount;
Global NumberVar myTotal;
myTotal := 0;
''

In the page header
WhilePrintingRecords;
Global NumberVar myRecordCount;
Global NumberVar myTotal;
myRecordCount := 0;
myTotal

In the detail section
WhilePrintingRecords;
Global NumberVar myRecordCount;
Global NumberVar myTotal;
myRecordCount := myRecordCount  + 1;
myTotal := myTotal  + {FieldtoTotal};
''

In the page footer
WhilePrintingRecords;
Global NumberVar myTotal;
myTotal

In the section expert
Click the detail section
Click the formula button to the right of NEW PAGE AFTER
WhilePrintingRecords;
Global NumberVar myRecordCount;
myRecordCount = 30

mlmcc
0
 
mlmccCommented:
PrintDocument is a method to print the report

To prevent drill into a subreport, the only real way is to put a transparent box over the subreport.  Thus the click will be in the box not the subreport

mlmcc
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now