Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 drop box list in VS2005

Author  Topic 

pga728
Starting Member

1 Post

Posted - 2009-08-06 : 16:40:39
i have a studentname dataset to produce a list of student names, the query is

select s.teacherpersonid,case when vs.middle_name is null
then vs.last_name+', '+first_name
else
vs.last_name+', '+vs.first_name+' '+vs.middle_name
end as 'Student Name'
from view_students vs with (nolock)
inner join calendar cal with (nolock) on cal.calendarid = @calendarid
inner join person p with (nolock) on p.personid = vs.personid
inner join roster r with (nolock) on r.personid = vs.personid
inner join section s with (nolock) on s.sectionid = r.sectionid and s.teacherpersonid = @personid
inner join course c with (nolock) on c.courseid = s.courseid and homeroom = 1
where vs.calendarid = cal.calendarid
and (s.teacherpersonID = @personid OR @personid IS NULL)
union select null,'ALL'
order by 1

i have report parameters set up for calendarid and personid
in my studentname dataset under the tabe parameters i have @calendarid with the value of =parameters!calendarid.value and
@personid with the value of =parameters!personid.value

the problem
when i preview this report i receive the following errors

The report parameter ‘studentname’ has a DefaultValue or a ValidValue that depends on the report parameter “calendarID”. Forward dependencies are not valid.

The report parameter ‘studentname’ has a DefaultValue or a ValidValue that depends on the report parameter “personID”. Forward dependencies are not valid.

what do i need to do to correct these erros?

thanks
pga

yavvie
Starting Member

46 Posts

Posted - 2009-08-07 : 03:22:49
Basically what it means is that you have two parameters and default values of both depend on each other.
you can have in a parameter default value based on another parameter, but not as a forward reference. one of your defaults has to be based on a query result or on a different parameter that the user chooses first. Here is the important thing - the order of the parameters in the list determine which has to be filled first. So if you need to use parameters calendarID and personID to fill the parameter studentname then you need to have those two parameters in the list before studentname.

Hope I understood the problem correctly :)

Go to Top of Page

freezea
Starting Member

5 Posts

Posted - 2009-09-14 : 10:58:12
Hi, pga728.
You can use RAQ Report to solve your problem. As I know, users can make drop-down list with it easily.

Welcome to my blog at http://freezea.blogspot.com/.
Go to Top of Page
   

- Advertisement -