all groups > sql server reporting services > november 2006 >
You're in the

sql server reporting services

group:

Using One Report Parameter for two vaules


Using One Report Parameter for two vaules Colin
11/21/2006 2:31:10 PM
sql server reporting services:
I've got a query where I pass in the start and end date for the parameters.
These dates correlate to start and end dates of a quarter. I'd like the
user to be able to choose Q1 2006 and a date is returned for @start and
@end. Is there a way I can pass two values but only display one report
parameter on the front end?

below is my query to return the start and end date of a period plus the name
of the period:
SELECT [PRD_NAME]
,[PRD_START_DATE]
,[PRD_FINISH_DATE]
FROM [EPK_PERIODS]


RE: Using One Report Parameter for two vaules Amarnath
11/22/2006 1:00:02 AM
There is no direct solution available. You can do it in different way

on the report paramter option tab

on the display you can have Q1 2006 and the value should be (1/1/2006 and
31/3/2006) you can hard code since it is going to be obvious for q1,q2 etc..

In your query you can use

select ..... from .... where ddate between (@parameter)

I havn't tried but you can use this logic.

Amarnath


[quoted text, click to view]
RE: Using One Report Parameter for two vaules Carmine
11/22/2006 6:33:02 AM
You could also create a function in your Report. You pass the "Q1 2006" to
the Function along with another function parameter (to tell it if you want to
evaluate the Start or End date). The function then figures out what the date
should be. Then when you are passing parameters in your dataset, you would
pass a function call, something like code.functionname(Parameters!Quarter,
"Start") .

We have to do something similar where a use selects a Date Range (like Month
To Date) in the Report, but it passes a start and end date to the stored
AddThis Social Bookmark Button