Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Unnamed Parameters Expand / Collapse
Author
Message
Posted Tuesday, February 12, 2008 8:05 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Yesterday @ 4:30 PM
Points: 8, Visits: 662
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
Post #454447
Posted Thursday, March 6, 2008 11:09 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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.
Post #465389
Posted Friday, March 7, 2008 1:32 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, February 3, 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



Post #465663
Posted Friday, October 8, 2010 7:28 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum 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
Post #1001291
Posted Thursday, October 11, 2012 10:00 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Saturday, July 12, 2014 4:22 AM
Points: 4, Visits: 15
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
Post #1371631
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse