Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Congratulations for your great site. This site helped me more than university..."

Geography

Where in the world do Tek-Tips members come from?
MEDL2002 (Programmer)
16 Jul 12 12:43
Hello there,

I’ve got the following requirement and I’m not sure if/how this can be accomplished in Crystal.

I have 3 versions of one report – the same .rpt file is used and its parts are suppressed based on the value in one of the data fields (report_type field). So let’s say the report has three pages: 1st page shows customer’s address, letter body, etc., 2nd page shows a detailed purchase transactions and 3rd page shows some “additional” information. Report’s pages are numbered 1 through 3.

When a user select an option to print the 2nd page only (report_type field has value 2) – the 1st and 3rd pages get suppressed and only 2nd page gets printed. The user wants to see “Page 2 of 3” printed in the page footer, and not “Page 1 of 1” (the way it is right now). Similarity, when they want to print 3rd page only, they want to see “Page 3 of 3” printed in the page footer.

The PageNofM function is used to determine the page number as compared to the total number of pages, at print time. Because certain pages are suppressed at print time, the PageNofM function is not able to determine what would have been the total number of pages if the report hadn’t been suppressed.

Please note that users do not want to run the “complete” report, go to print options and select pages they need to print so that the pages are numbered the way described above.

Any help would be greatly appreciated.
MEDL
IanWaterman (Programmer)
17 Jul 12 6:19
If there are always 3 pages you can replace the Page NofM with text formula

Assuming you are using a parameter

If Parameter = ReportType1 then 'Page 1 of 3' else
If Parameter = ReportType2 then 'Page 2 of 3' else
If Parameter = ReportType3 then 'Page 3 of 3' else
'Page '&totext(pagenumber, 0)&' of '&totext(totalpagecount, 0)

If page count can vary then what you want to do will be impossible.

Ian

MEDL2002 (Programmer)
17 Jul 12 8:37
Hi Ian,
Thank you for your input. Unfortunately, the page count can vary, I just gave the 3 page example to make it simple.
As you said, I don't think what the users expect is possible. I just wanted to confirm it.
I was also thinking that they could pass starting page and total number of pages as paramters but I don't think they would like that idea either. That would mean that they would have to know the page count from the complete report, so they may as well run the complete and go to print options.
Again, thank you for taking the time to respond to my post.
Milena

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close