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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Boolean Parameter passed to subreport

Status
Not open for further replies.

bsibengal

Technical User
May 21, 2004
10
US
Version 10

I have a report that displays the Directors and Officers and other important people in a company by Generic Title. Each person then has information displayed about him.

To do this, we have created a subreport that shows all Directors. Each Director then lists his address, phone number, etc. A separate subreport shows all Officers with addresses, etc. There are approx 15 subreports all told.

I have created a Main Report Boolean parameter (HideAddress) that asks whether the user wants to display the address for each person. Another Boolean parameter (HidePhone)asks whether the phone number should be displayed.

If this were just a main report, I would update the Suppression formula for the Address field to be "HideAddress = True". Same idea for the phone number. However, I cannot get the Main Report parameter to show up in the SubReport parameter list. We 'changed the SubReport link' to push the paramter through, but it won't 'stick' in the subreport list.

I don't want to create parameters individually at the subreport level, as the user would soon be presented with thirty or so checkboxes.

How do I get a Boolean Main Report parameter to show up in the SubReport parameter list?

Any ideas would be greatly appreciated.
Thanks!
 
Create the parameters in each subreport and use them in your conditional suppression formulas in the subreports. Then go to edit->subreport links->link each subreport parameter to the main report by selecting the main report parameter and then using the dropdown to select
{?HideAddress}, NOT the default {?Pm-?HideAddress}. Repeat the linking for the other parameter. This will result in prompts just for the two main report parameters.

-LB
 
Thanks! We realized that we were trying this correctly, but the dropdown to select {?HideAddress} actually has a scrollbox within the dropdown. Once we figured out how to scroll down, we found the {?HideAddress} just fine.
 
Not relevant to your question, but I'm wondering why you use subreports rather than grouping by Generic Title.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
To answer Madawc's question - the data for each person comes from different tables. For instance, the address information is in a separate table from the phone number, etc.

I do have another question, in that the subreport boolean parameter selection still shows when running the main report. I see the main parameters correctly, but also see all of the subreport parameters. The report works correctly if I ignore the subreport parameters. Is there any way to not show the subreport parameters.

Thanks!
Chris
 
Check in the subreport links section and see whether you still have links based on {?pm-?yourparm} in addition to the ones using the dropdown {?yourparm} and then delete the old ones.

-LB
 
Perfect. All of the above worked fantastically!

thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top