Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameter to prompt which particular "page" (group header) to print?

Status
Not open for further replies.

TJIT

MIS
Jan 29, 2009
19
US
My report has multiple group headers with distinct static text at the top of each page. One section says "Startup"; another one "Shutdown"; another one "Restart"; etc. Currently, when they print all 3 pages print out. However, I'd like to offer them a prompt to only print the one or two pages that they need instead of the whole report each time.

Can this be done? My alternative would be to make multiple rpt files published individually in the report menu, each with their own combination of scenarios...what a mess that would be to look at.
 
Set up a parameter and give it values like:
A Print description a Header
B Print description b Header
etc.

Then, just to make life easier, create formula @PtHead which will be something like left({?yourparameter},1)

Set up each group header as needed. then go to the Section Expert.
For each header set up a suppression formula based on the appropriate choice, such as {@PtHead} <> 'A'
 
Suppression formula did the trick. I created a parameter called "Label Type" (I'm working with labels so that's simply what I called them...could have called them anything) with "Allow multiple values" set to 'true' in the Value Options section of the "Edit Parameter:" window. I set the Type: to "string" and the List of Values: to "static". I then typed out all names I gave each page. Doing this prompts the user to select each page they want printed in any combination.

Then I went into the Section Expert for each group header and, did not check the "Suppress (No Drill-Down) checkbox, but clicked on the button to the right of it and added NOT({?Label Type}="New Bucket") as the formula. The "New Bucket" text is one example of how I named the pages, I could have used something simpler like "A". The trick was to match the text in that formula with corresponding page value in the Parameter settings; each section has its own name. (Seems way more complicated to type out than it was to do it).

When the report is run, it prompts the user to select each page they want printed in any combination, suppresses the pages that were not selected in the parameter and voila.

Thank you very much, Charliy!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top