all groups > sql server reporting services > may 2007 >
You're in the

sql server reporting services

group:

Problem with 2 Dataset Sharing Parameters


Problem with 2 Dataset Sharing Parameters ME
5/2/2007 3:31:16 PM
sql server reporting services:
I have a report that will pull out a list of bugs assigned to users for a
period of time (@StartDate, @EndDate). Optionally the report has option to
select a single user (@UserName) or just all of them. There are 2 datasets.

First dataset: Bugs requires 3 parameters: @StartDate, @EndDate, @UserName.

Second dataset: UserName. At first I have a query to list all users. Since
the list has hundreds of users while the result set from dataset Bugs mostly
has less than 10 users, I built another query to list only users having bugs
assigned from @StartDate to @EndDate. So it requires 2 parameters @StartDate
and @Enddate.

Now both datasets use @StartDate and @EndDate. The list to select for
@UserName is produced after @StartDate and @EndDate are entered. I expected
the report to let me select the username after I enter @StartDate and
@EndDate. However in the preview tab right at the moment when I clicked on
the box for @EndDate to enter a value the program hang up (VS 2003). I
uploaded it to a report server to see how it behaves then I got this error
after I click on the EndDate box: The value provided for the report
parameter 'EndDate' is not valid for its type.
(rsReportParameterTypeMismatch).

I don't know what's wrong. If I change the dataset UserName to list all
users (no parameter required) then the report runs fine. I use Visual
Studio .NET 2003 Service Pack 1, report server is SQL 2000 with latest SP on
the O/S, SQL, and SQL RS.

An thought?

Thanks.



Re: Problem with 2 Dataset Sharing Parameters EMartinez
5/2/2007 7:48:35 PM
[quoted text, click to view]


The issue sounds kind of strange. Maybe you should check to make sure
that you have the correct @EndDate mapping as part of the UserName
dataset (via the Data tab -> Edit Selected Dataset button [...] ->
Parameters tab). Also, make sure that the stored procedure/query that
sources the UserName dataset is not expecting a different data type
for @EndDate (for whatever reason). Sorry I could not be of greater
assistance.

Regards,

Enrique Martinez
Sr. Software Consultant
Re: Problem with 2 Dataset Sharing Parameters ME
5/3/2007 1:19:53 PM
Thanks for the reply. I use datatime as data type for @StartDate, @EndDate
in both datasets. Double checked everything but still have no clue why.
When I learned and practiced SQL 2005 I had no problem doing similar thing.


[quoted text, click to view]

AddThis Social Bookmark Button