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

get report parameters to work Expand / Collapse
Author
Message
Posted Thursday, April 1, 2010 6:37 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, July 22, 2014 8:17 AM
Points: 362, Visits: 422
I want to add report parameters to a sql server report service 2008 that has been generated by the report wizard and have the parameters work.
I can get the report parametes to look like they work by doing the following:
1. select view then report data then right click parameters in the report data window.
2. I then select add parameters then enter a 'name' then enter a prompt name and then select data type.
3. I then right click on the dataset and then click dataset properties and then click on parameteres in the dataset properties window and add

the parameters I want.

The above looks ok, but the parameters do not work.

What do I need to do get the report parameters to work either after a new report has been setup using the report wizard and/or adding the

report parameters to work at a later time.
Post #894682
Posted Tuesday, April 20, 2010 1:39 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, June 18, 2014 3:28 AM
Points: 1,044, Visits: 1,839
Creating parameters in SSRS is step one...done

have you referenced those variables in your underlying dataset SQL query


Regards/Raunak
Now a member of Linkedin

Please visit the all new Performance Point Forum
Please visit the all new Data Mining and Business Analytics Forum
Post #906591
Posted Tuesday, April 20, 2010 1:39 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, June 18, 2014 3:28 AM
Points: 1,044, Visits: 1,839
Creating parameters in SSRS is step one...done

have you referenced those variables in your underlying dataset SQL query


Regards/Raunak
Now a member of Linkedin

Please visit the all new Performance Point Forum
Please visit the all new Data Mining and Business Analytics Forum
Post #906592
Posted Tuesday, April 20, 2010 4:30 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Today @ 2:21 AM
Points: 566, Visits: 375
There are two approaches in order to actually get report parameters to work.

Approach one: when you create your underlying dataset, you explicitly define the parameters in a where clause of the statement by putting a @ symbol in front of the identifier (name) of the parameter. For example:
select employee_name from Employees where employee_id = @emp_id

Here @emp_id states it is a parameter and when you create such dataset SSRS actually performs two actions - first it creates a parameter (you can find in Parameters Tab in BIDS) and second - it binds the newly created parameter with the parameter defined on a dataset level (when you define a dataset, there is a Parameter tab, where such definitions are created

Approach two - you first create a parameter and then reference it in the dataset - if you did this, you must open your dataset properties, go to Parameters and explicitly define binding between parameters in the report and the parameters in the dataset (again, parameters in the dataset must be starting with @symbol)

My reccomendation is to use always approach one as at most of the times it does most of the work for you and all you need to do is customize the automaticalyy created parameters.

/ivan
Post #906693
Posted Tuesday, April 20, 2010 4:34 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, June 18, 2014 3:28 AM
Points: 1,044, Visits: 1,839
Thought you required answer...turned the other way round...cheerz!!!

Regards/Raunak
Now a member of Linkedin

Please visit the all new Performance Point Forum
Please visit the all new Data Mining and Business Analytics Forum
Post #906695
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse