Changing Datasets in an Expression

dgorka

Well-known member
Joined
Dec 27, 2006
Messages
88
Programming Experience
5-10
I'm creating a report to track sales for a client. On the results that the report displays, one of the fields is a link to another report. On the navigation of that, I'm passing the DealerId to the other report so it can display information about that dealer, however, if they don't enter a dealer number I'd like it to display information for all dealers. So my question is if I can switch datasets in the expression that I writting. I tried the following, but it didn't work. Any help would be appreciated:

VB.NET:
=IIf(Parameters!DealerNumber.Count = 0, Fields!AllDealers.Value, Parameters!DealerNumber.Value)


As a note, DealerNumber is the parameter that the user can enter and is passed to the second report, AllDealers is a list of all dealers for that Distributor that is in a different DataSet.
 
Back
Top