Search code examples
vb.netvisual-studiocrystal-reportscrystal-reports-2010

Increment parameter field after 10 pages Crystal Reports


I am new to Crystal Reports. I have created a parameter field name countParam and added it in my report header. The countParam is initialized from my vb.net code For Example I initialized it to 50.

Now when I display the report, the countParam shows 50 value in the report header and repeats this value in all pages.

I want to know how can I increment it to 51 after 10 pages. For Example from Page 1 to 10 the countParam displays 50 and from page 11 to 20 it displays 51 and then from 21 to 30 it displays 52 and so on...

I have figured out that If I add PageNumber to it, it will successfully increment by one after each page, that is 51,51,52. However I don't want this. I want it to inrement after 10 pages. Anyone can guide me how can I achieve my task. I will be thankful.

PS : I am using Crystal Reports 2010


Solution

  • You can use the following formula:

    {?countParam} + Int ((PageNumber / 10))