Link to home
Start Free TrialLog in
Avatar of ITsolutionWizard
ITsolutionWizardFlag for United States of America

asked on

MS SQL SSRS select statement

I got the screenshot from my SSRS builder for MS SQL Server.
Inside of the textbox. Can I run sql statement like the following?
all I need is to get the value from =Fields!newleadfirstname.Value and try to run another select statement.

= select lead.firstname from leads where lead.firstname=Fields!newleadfirstname.ValueUser generated image
ASKER CERTIFIED SOLUTION
Avatar of Raja Jegan R
Raja Jegan R
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ITsolutionWizard

ASKER

I can create another dataset but how to call second dataset n provide parameters?
Okay, here you go for the detailed steps..
1. Create a New Datasource(if not available)
2. Create a New Dataset and use the query to select a single value..
3. Create a New Parameter -> Click on Default Values -> Choose "Get values from the query" and provide your Dataset name and column name to be used.
4. We can then use the Parameter in the expressions like "=Parameters!param1.Value"