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

How to use parameters as variables? 1

Status
Not open for further replies.

jjmew

Programmer
Aug 20, 2002
34
0
0
US
I am building a report inside one report the inner report SQL depends on what the outter report SQL is returning. I read that the only way to use variables in the SQL is declaring the variables as parameters. The problem with it is that I need to modify those paramenters in the report. How I can do that? or How i can link the Inner SQL with the outer SQL? Confucius once said, "I hear and I forget. I see and I remember. I do and I understand."
 
First of all not true, you can define variables in many ways, including in an included basic file. In the fetch of the first query set the return that you are interested in to a variable. Use this variable in the second.

good luck.
K
 
Hi I am in the same boat as jjmew with out the need to modify the parameters.
My question is: 1. how do i use a parameter I created in my sql.
or
How do i reffrence in my sql the parameter I created?

An example would be useful, actuate does not provide much help in its manual.
Thanks
 
In a few situations, we had to create multiple parameters that contained the same value. Maybe you can extrapolate a solution for your own situation.

We made a parameter called :First in SqlQuerySource1, and one called :Second in SqlQuerySource2. These two parameters need to be hidden, because they will get their value from the same central source.

We also created a variable in the top-level component called MainVar, which we made a parameter.

In the Start method of the top-level component, we added:
SqlQuerySource1::First = MainVar
SqlQuerySource2::Second = MainVar
before the call to Super::Start()

I hope this points you down the right path.
-Michael
 
Sorry if I may not be able to the question either, but my situation seems very similar except I want to use a parameter in my SQL statement to be presented as a prompt to the user. The users are using the Business Web client and they cannot access the SQL to change the parameter.

Therefore how do I prompt the user for parameter information if the report has been build using the standard SQL?

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top