I'll chime back in. I don't fully understand your example below for the
dates. Are you saying you have a table with all dates in it? If I have a
FROM and TO date and I need the TO to be greater than the from, then how are
you loading the drop down for the TO date? Does this table contain all the
dates in time? I guess if I can understand how to do this date logic, then
most rules could be handled with TSQL. However, I don't know enuff yet to
know how to conditionally load a drop. Example: Dropdown1 has customers in
it. I want to load DropDown2 based on the customer selected in DropDown1.
How do you make the dropdown load conditioned on the first one?
> Class consultant response; "It Depends".
>
[quoted text clipped - 48 lines]
>>> >
>>> > Can anyone tell me how to do this?
Here you go.
> Example: Dropdown1 has customers in it. I want to load DropDown2 based
> on the customer selected in DropDown1. How do you make the dropdown load
> conditioned on the first one?
Let's suppose that @CustomerId is the parameter to be used in the report.
Also, @BillingPeriod is used in the report and is related to customer via a
table called "CustomerBillingPeriod".
the sql for the Customer parameter comes from the dataset dsCustomer:
select CustomerID,
CustomerFullName
from CustomerTable
the sql for the BillingPeriod parameter comes from the dataset
dsBillingPeriod:
select b.BillingPeriodID,
b.BillingPeriodDesc
from BillingPeriod b
INNER JOIN CustomerBillingPeriod cb
ON b.BillingPeriodID = cb.BillingPeriodID
WHERE cb.CustomerID = @CustomerID
The billingPeriod parameter has now become a dependent parameter, dependent
on the selection of Customer.
There's a trade-off here though. The more dependent parameters you have in
a report, the more complicated the report becomes. You now have to
replicate portions of the TSQL for the report to help filter the report
based on parameters that will actually yield a report. If, on the other
hand, you made every parameter independent of the others, you now invite the
user to select parameters that yield no results whatsoever. This is
sometimes very frustrating, especially when a report takes longer than a
couple of minutes to run. On the positive side, the user is guided to their
report by the absense of parameter values that would otherwise give them the
"No data is available for the parameters you specified".
That's a paragraph from a book I'm going to write one day. <g>
-Tim
Say for example, that
> I'll chime back in. I don't fully understand your example below for the
> dates. Are you saying you have a table with all dates in it? If I have a
[quoted text clipped - 60 lines]
>>>> >
>>>> > Can anyone tell me how to do this?
JrMcG - 28 Jun 2006 14:43 GMT
I think i've got now. Thanks so much for your help.
PS - let me know when the book gets published!
Jr
> Here you go.
>
[quoted text clipped - 103 lines]
>>>>> >
>>>>> > Can anyone tell me how to do this?