July 28, 2005 at 12:39 am
There is a problem in my report that i have two parameters year and month and i have to show data from
e.g, year parameter= 2003
month parameter= june
result:
data shown in matrixs from june 2003 to april 2004
either their is any function through which i will do this job.
thanks.
July 29, 2005 at 7:01 am
Hi, I think you could use two select with a union, like this:
SELECT Year, Month, OrderAmount FROM Orders
WHERE (YEAR(OrderDate) = @paramYear AND MONTH(OrderDate) >= @paramMonth)
UNION
SELECT Year, Month, OrderAmount FROM Orders
WHERE (YEAR(OrderDate) = @paramYear+1 AND MONTH(OrderDate) <= @paramMonth-2)
The result would be something as:
YearMonthOrderAmount
1996722
1996825
1996923
19961026
19961125
19961231
1997133
1997229
1997330
1997431
--------------
Jerônimo Vogt
July 31, 2005 at 7:18 pm
whats the SQL you are using for the parameters? maybe there is a small logic problem
July 31, 2005 at 11:50 pm
thankyou for the trying to solve my Report Problem .
I have use
{LastPeriods(-12, [TimeDimension].["& Parameters!FromYearParameter.Value &"].["& Parameters!MonthParameter.Value &"])} on ROWs
to get the data of the months which i want to retrive
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply