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!

Display various parameters based on an entry to the first parameter

Status
Not open for further replies.

piovesan

Technical User
Jan 23, 2002
159
CA
Another question related to Parameters....
Is there a way to have one parameter at the start up of a report, and then based on the selection to that parameter, bring up another parameter?? I am not using a subreport... but maybe that is the only way to do this?? Here is a bit of what I have:
if {?Select Report Query Type} = "Building ID"
then true
and{BLD_BUILDING.BL_ID} = {?BUILDINGID}

else if
{?Select Report Query Type} = "Building Name or Use Name"
then ***** then I want another parameter to "pop up" or display or whatever that asks for the {?BuildingName) parameter..............

Is this possible?
 

Is this instead of your wildcard approach? It's a better way to handle it, both from a user perspective and database efficiency.

You'll need a command object to dynamically generate the values, or a database table. Either way, don't join it to any other tables in the report. The data should look like this:

Building ID 100
Building ID 200
Building ID 300
Building Name Oak Building
Building Name Aspen Building
Building Name Pine Building


Create a dynamic string parameter based on the command/table. Within the dialog, you'll need to actually create parameters for both values (click "Click to create parameter). Depending on the number of values you have, you may want to include another level in between, such as:

Buidling ID East Campus 100

If so, you don't need to create the parameter for the middle level (assuming all building names/ID's are unique).

Then your selection becomes:

if [?First Parameter} = "Building ID" then table.buildingID = {?Second Parameter}
else
table.buildingname = {?Second Parameter}



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top