Link to home
Start Free TrialLog in
Avatar of rss2
rss2

asked on

Question about date parameter and calendar control

Hi Experts,

I have a report in SSRS (SQL Server 2005) and one of the parameters is a date. My question is a two-parter:

1. Cascading parameters: How do I set the date of the date/calendar parameter with a value from a dataset that uses the value of a different parameter? In other words, the users sees the date parameter calendar go to a date automatically after picking one of the values from another parameter's drop down selection.

2. Is is possible to attach date values to the date calendar parameter so that unavailable dates (those not in the dataset) are greyed out and available ones are available to the user to select?

thank you. Mucho urgento!

rss2
Avatar of shorak
shorak
Flag of United Kingdom of Great Britain and Northern Ireland image

I dont think what you are asking for in question 2 is possible with the calendar but you can create a dropdown list of available dates.

As to cascading the parameters so that the dates are limited to what was chosen in the previous parameter, this should be possible but depends on your how your working with your dataset.

will you be passing the selected date parameter as well as the first parameter back to the same dataset or will you be using more than one dataset?

One way of creating your date dropdown would be to create a dataset with a query such as

select date from table
where criteria=paramater1

you would then create a report parameter representing the date and use this datset as the source. Select the date field as the default value also.

in the preview.. the date parameter will remain greyed until the first paremeter has been selected and then will list all the available dates.

Let me know if you want more details.



Rob
Avatar of rss2
rss2

ASKER

Hi shorak,

I am getting the date from a separate dataset already. That dataset is the result of a stored procedure, which takes one parameter. The parameter is populated by the first report parameter.

Confusing, so I'll outline it:
Report:
2 parameters - 1 drop down select, 1 date (calendar)

Datasets:
3 datasets: - 1 to provide the repot drop down select with data, 1 to provide the report date (calendar) with a date, and 1 to provide the report with data based on those 2 report parameters

So I want the date in the calendar to default on a date that comes from the dataset, which depends on the drop down value.

It's just not working. Could you tell me, for each of the 2 parameters, what settings I should have for each? (AVailable values: non-queries | from query and Default values: Non-queries | From query | Null )?

Thank you,
rss2
ASKER CERTIFIED SOLUTION
Avatar of shorak
shorak
Flag of United Kingdom of Great Britain and Northern Ireland 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