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

create dataset for an existing SQL statement

Status
Not open for further replies.

duanecwilson

Programmer
Jul 15, 2005
26
US
I have some complicated SQL Statements with Case statements, grouping, etc in the SQL. I want to know how to create a dataset for this SQL.

Then, I would like to know the best way to use that query in Reporting Services to create a report. Do I leave the grouping, having, order by in the query itself or do I do that in the report design itself?

Even if you can't answer all of this, any input would be appreciated. Thank you.

Duane Wilson
 
encase your complicated sql statements in a stored procedure, and then in SSRS, just call the stored procedure.

You can use a view or udf if they are more suitable...

Generally, leave the ordering off the source if you're going to be ordering on the report as well. As for grouping, well, that very much depends on your report since grouping can affect the actual data you get.


--------------------
Procrastinate Now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top