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

Report Net - Populating multiple parameters

Status
Not open for further replies.

Vivarto

Programmer
Nov 27, 2005
43
AU
As far as I know the only way to populate a parameter is via a prompt. The interface only allows a single parameter to be specified and populated. I want to populate a number of parameters in one hit, i.e. user select a single value from drop-down, number of parameters populated. The equivalent SQL would be something like:

Select col1, col2, col3
INTO ?param1?, ?param2?, ?param3?
From tab1
Where id_col = ....

Any ideas?
 
It will better practice to have the parameter defined on one clmn, else we need to make it resemble a single column. The best solution could be to have a PK defined, that satisfies the condition.

Let
Query2 - populate the Prompt
"select <clm name> from <tb1 name>"
Have this clm to be a primary key
(say a running number for possible combinations
of clm1, clm2, clm3)
Assign this prompt a parameter param0
The display value can be made business oriented
Usage value will be the primary key
Query1 child Tmod
- retrieve filter conditions
"select clm1, clm2, clm3 from <tb1 name>
into dataitem1, dataitem2, dataitem3
where (Filter -> clmn4(PK) = ?param0?)"
Query1 master(main) query - populate your layout
Use the Tmod dataitems in Query1 as Filter.

Try if it works...
 
cogvatsan

Thanks for your feedback

If I understand you correctly there are two parts to your proposed solution. The first is the construction of a synthetic two-column data list that is used to populate the prompt. The first column is the PK the second a display value for the drop down. The item in the first column is an index or key into a list of possible combinations of parameter values (potentially a very large list) that is held in a second table. The selected row from the second table would have a number of fields, one for each parameter to be populated.

So far so good. The issue however is in the second part, your statement:

retrieve filter conditions

"select clm1, clm2, clm3 from <tb1 name>
into dataitem1, dataitem2, dataitem3
where (Filter -> clmn4(PK) = ?param0?)"

This is the crux of my question, the rest I can work out. How exactly is this done? Are you simply talking about a query with a filter or is this a piece of code you write somewhere? If this is a query then it doesn't achieve the objective, namely the population of report parameters. None of these parameters will appear in the report they are to be used in conditional formatting logic. For example the objects that appear in statements such as ParamDisplayValue("param1").

I want to execute some fairly complex logic and need a number of parameters to be populated in order to do this (I appreciate there are always alternative ways of achieving this but it's the technique I'm more interested in at this point)

So, how do I run the SQL statement shown above to populate dataitem1, dataitem2, dataitem3?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top