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

SSRS parameters / SQL confusion

Status
Not open for further replies.

taudette

Technical User
Jan 4, 2004
17
0
0
CA
Hello everyone.

I am using Sql 2000 with SSRS 2005. I have a table, SO.MAIN which is an order listing containing many columns of data. Including:

ENTRY.DT (entry date)
SO.ID (sales order number)
DIST.ID (distributor number)
ORD.NET (order value).

I need to create an SSRS report that counts the unique orders, unique distributors, and the sum of the order value; and displays this information for a period that is selected by the user. The requirement is also to show the Last Month to date, Year to Date, and Last year to date based on whatever timeframe they chose originally.

The caveat is that it cannot be a specific month, the user has to be able to enter a start and end date that varies in format. One manager users calendar dates, another fiscal dates, and another catalogue live dates.

I can do the simple queries, but I cant figure out the parameters, or how to get this all in one query. I tried doing a query in management studio, using set parameters and union all, and this worked. When I copy the query to SSRS it tells me there's invalid syntax at union, and it fails.

I am new, and I realize this is alot to ask for in a newbie post. But I believe that if I can get this one report created, plus, understand the mechanics and logic of it; that it will set me in full motion to complete a series of other reports utilizing the same time logic.

Any help is appreciated. I am desperate!

Thank-you

Tammy

Webmaster Resources & Internet Marketing Tools
 
Hi Tammy,

Can you give an example of the data in the tables and what SQL you have already written?#

/Nice
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top