Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Crystal Report 11 page number formula

Posted on 2009-05-13
11
Medium Priority
?
1,369 Views
Last Modified: 2013-11-15
hello experts,

i am using CR to export data into PDF, its working fine but I have a small problem in showing the page numbers on the file.

each record is coming upto 6 pages and i am showing 500 records on the file.

all i wanted to do is to set the page number for reach record between 1 and 6.

so i would say the formula would be

If (PageNumber = 6) Then
   PageNumber = 1

this however did not worked...

please can someone advise?

thanks
s

0
Comment
Question by:newbie27
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
11 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 24376168
Try this idea

Group on a unique field
In the section expert
  Reset the page number after the group footer

mlmcc
0
 
LVL 8

Author Comment

by:newbie27
ID: 24384960
hi mlmcc

i have tried but didnt seems to make it work, please can you help me with this here?

i have attached the .rpt file, please can you make the change and attached it back?

many thanks
s
GiftCodes-MasterTheArtOf.txt
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 24387151
I think this will work

mlmcc
GiftCodes-MasterTheArtOfrev2.txt
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 35

Assisted Solution

by:James0628
James0628 earned 800 total points
ID: 24391866
FYI, there are two problems with the formula that you tried to use:

 1) You can't set PageNumber to a value like that.  PageNumber just gives you the current page number.  It's read-only, so to speak.

 2) You used =, which in a Crystal syntax formula like this, compares values.  So, you're just testing to see if PageNumber is equal to 1, which it won't be, because you only do that test when PageNumber is 6.  IOW, your formula says "If PageNumber is equal to 6, is it equal to 1?".  So, that formula will always produce a False result.
 To set a value, you use :=, so you'd have PageNumber := 1, but that will give you an error, because you can't set PageNumber like that.


 > all i wanted to do is to set the page number for reach record between 1 and 6.

 Are you sure that you want the page numbers to be between 1 and 6?  I see 4 detail sections in your report, so I would think that the pages would be between 1 and 4.  Also, your formula, if it worked, would have reset the page number to 1 _on_ page number 6, so it would have actually given you page numbers 1 - 5 (on page 6, it would have reset and shown 1 instead).

 If what you're really trying to do is reset the page number for each set of detail records, then mlmcc's suggestion may do the trick for you.

 James
0
 
LVL 8

Author Comment

by:newbie27
ID: 24393568
hi mlmcc

that has worked thank you so much, only problem was that its now ending on 7 and then staring from 1 ..7
instead of desired of 1...6 range.

please can you amend and send me again?

thank you so much for your help.

James0628

thanks for your valuable information as well. much appreciated.

0
 
LVL 8

Author Comment

by:newbie27
ID: 24393987
hi mlmcc

please can you use this file

thanks
s
GiftCodes-MasterTheArtOv2f.txt
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 24394998
I think this is it

mlmcc
GiftCodes-MasterTheArtOv2frev.txt
0
 
LVL 8

Author Comment

by:newbie27
ID: 24395160
hi mlmcc

its still doing the same, please rename the attached file to .pdf

to see what i am gettting

thanks
s
GIFT-CODES-MasterTheArtOf-2009-0.txt
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 1200 total points
ID: 24396043
I modified the report to see where the group footer is.

mlmcc
GiftCodes-MasterTheArtOv2frev.txt
0
 
LVL 8

Author Comment

by:newbie27
ID: 24431835
Thanks mlmcc

I have noticed the change you made on the report however for some reason I am unable to reset it when it reaches to 6. Instead its resetting back to 1 only after it reaches to page number 7.

Desired is 1 - 6
However its doing 1 - 7

Please advise
thanks
s
0
 
LVL 35

Expert Comment

by:James0628
ID: 24456237
Since you've now accepted a solution, did you figure out that last problem, or are you still getting pages 1 - 7 instead of 1 - 6?  Just checking.

 James
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
I recently went through setting up a JasperReports Server using the AWS EC2 instance, and this article will cover some basic administration tasks I had to perform.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question