|
-
Oct 22nd, 2004, 03:12 AM
#1
Thread Starter
Fanatic Member
Total qty per page in CR
hello..want to ask something
i want to count how may qty that display per page (the report have more than 1 page)..how can i do this?
thanks
-
Oct 22nd, 2004, 10:04 AM
#2
PowerPoster
Do you mean you want to restrict the number of detail lines on a page... or just count how many detail lines printed on the page?
-
Oct 22nd, 2004, 08:57 PM
#3
Thread Starter
Fanatic Member
i want to restrict it..say 20 record per page..
and i want to count total qty per page (which qty for 20 record that displayed)..and display it at page footer?
ex:
id qty
1 2
. .
. .
. .
20 4
Total per page: 100
can i do this?
thanks
Last edited by erickwidya; Oct 22nd, 2004 at 09:02 PM.
-
Oct 25th, 2004, 04:31 PM
#4
If you have not resolved these issues already, here is what I use.
Restrict number of detail lines
In the Format Section -> Details -> New Page Before - add this formula : RecordNumber Mod 20 = 0
Page by Page totals
You need to use a global variable and 3 formulas. One formula resets the global variable to 0, another sums the amount and still another is used to display the variable. Each Formula must have the exact same declaration for the Global variable. Obviously change CurrencyVar to your data type.
Create the following formula, I call it PageTotalReset, and place it in the Page Header section.
Global currencyVar PageTotalValue;
WhilePrintingRecords;
PageTotalValue := 0;
Create the following formula, I call it PageTotalAmount, and place it in the Details section.
Global currencyVar PageTotalValue;
WhilePrintingRecords;
PageTotalValue := PageTotalValue + {TableName.FieldName};
Create the following formula, I call it PageTotalDisplay, and place it in the Page Footer section.
Global currencyVar PageTotalValue;
WhilePrintingRecords;
PageTotalValue;
-
Oct 25th, 2004, 08:54 PM
#5
Thread Starter
Fanatic Member
thanks alot brucevde..i'm not familiar with coding in CR so i can't found out how to reset pageTotal for each Page (now i know it can be done :0)
i used this before RecordNumber Mod 20 = 0 .. this the right one to restrict 20 record per number but if i had a 2 group or more..then it show not the right one i need..coz it keep mod when the group change..how can i prevent this? do i have to use like the one u mention?
thanks for the reply
-
Mar 7th, 2005, 08:11 AM
#6
Fanatic Member
Re: Total qty per page in CR
insert Formula in Page header:
- Name: @ResetCounter
- Formula Body:
whileprintingrecords;
numbervar RecordCounter:= 0;
**********************************************
insert Formula in Body (Detail)
- Name: @RecordCounter
- Formula Body:
whileprintingrecords;
numbervar RecordCounter:= RecordCounter + 1;
***********************************************
Section expert - Detail - new page after
- Formula Body:
{@RecordCounter} = 20
***********************************************
To set the formula's invisible on the report:
right click on formula-field
-> Format Field...
-> tab: common
-> check Suppress
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|