cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Running total on first 300 Record

Former Member
0 Kudos

Hi Everyone,

i suppress rows greater than 300. serial formula in Crystal report. but when i am total sum of amount  this will give me wrong result it give me result of all. but i want just 300 top crystal formula . i am not  using any  grouping in crystal report. thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member205840
Active Contributor
0 Kudos

Hi Safeer,

You can write a formula like :

If rownumber > 300 then 0 else Amount 

Now insert your summary based on the above formula.

Note : The condition which you are using to suppress rows, use the same condition in above formula.  Also please replace formula fields with appropriate report fields.

Thanks,

Sastry

Former Member
0 Kudos

Thanks,

but we cant' import the serial no report formula in running total. but we can in suppress formula

abhilash_kumar
Active Contributor
0 Kudos

Hi Safeer,

Could you post the formula you've used to suppress rows greater than 300?

-Abhilash

abhilash_kumar
Active Contributor
0 Kudos

If you're using the rownumber function, here's what you can do:

1) Create a new formula field using this code:

If  rownumber <= 300 then

Shared numbervar amnt := amnt + {Amount field};

'':

2) Drag and drop this formula field to the details section.

3) Create another formula field to display the Total and place this field on the report footer:

Shared numbervar amnt;

-Abhilash

Former Member
0 Kudos

if {@serial}>300

then true

Former Member
0 Kudos

WhilePrintingRecords;

numbervar inc;

numbervar top_n;

inc := inc + 1;

if inc <= 300 then //where 5 means top 5

top_n := top_n + {@Amount}

i done with this thanks..

Answers (0)