|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Yesterday @ 9:40 AM
Points: 8,
Visits: 438
|
|
Hi,
I have a problem where I want to use unnamed parameters in a DB2 odbc connection. I have the same parameter that I want to use in multiple where clauses, but I don't want to have to enter the same value multiple times. Is there a way to have reporting services only request the value one time?
Thanks in advance,
Jimmy
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Wednesday, December 22, 2010 4:36 AM
Points: 4,
Visits: 65
|
|
Hi,
Not sure if this is related but I had an issue using DB2 and unnamed parameters with SSRS. With trial and error I found out the following: Put a ? in place of every usually named parameter e.g. Select * from SCRATCH.PROD_KPI_REPORT_DATA KPI WHERE (KPI.PRODUCT =? or ? = 'ALL') and (KPI.CHANNEL = ? or ? = 'ALL') for read only with ur;
Then set up the parameters in REPORT PARAMETERS and throwing away the default entries created that you don't want, i.e. I had 4 Parameter1, Parameter2 etc. Then back in the dataset, select ... and move to the PARAMETERS tab. Every ? used appears, I had 4 for example. Now simply use the drop down to assign your named parameters created in REPORT PARAMETERS. In my example the first 2 ? were assigned to my first named parameter and the second 2 ? to my second named parameter. Just have to make sure your named parameters are matched to the correct ? order.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Friday, February 03, 2012 3:30 AM
Points: 153,
Visits: 180
|
|
Hello,
The previous answer is correct for as far as i understand the answer.
The unnamed paramaters will be added to the report parameters in the sequence of first come in the query. Then you go to the report paramaters and you give the parameters a usable name and when needed the default value etc.
When you have done that you go back to your dataset and go the the tab for paramaters and map the ? with the parameter names you just adjusted. When you want to use the same parameter for the ? just use the same Parameter@ThisOn.value again.
If you have any more questions just let me know.
Niels Naglé Info Support
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, May 16, 2011 7:27 AM
Points: 1,
Visits: 23
|
|
Can you please elborate Parameter@ThisOn.value with example. I would greatly appreciate....
Thanks Andy
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Saturday, October 13, 2012 8:30 AM
Points: 4,
Visits: 14
|
|
I am not sure.. need to try this..
I think you can hide the extra parameters displaying. and assing the values to to the hidden parameters as the one which is unhidden.
Let me know if it works.. I cannot try this now as my machine has got crashed.
Regards, Mahendra Jain
|
|
|
|