Hi,
I have the following sp:
if (@.Paramreport =1) or (@.Paramreport =0)
begin
select
count(CASE family WHEN '420' THEN 1 END) as Unmarried,
count (case family when '421' then 1 end) as Separated,
count (case family when '422' then 1 end ) as' Divorce,
sum (1) as Total
from (
select student.SID, family, max(hid) as hid
from student
inner join hasama on hasama.sid=student.sid
where type=4
and
(@.Paramregion IS NULL OR region= @.Paramregion )
AND
yearcode=@.PARAMYEAR
group by student.SID, family
) t
end
--studyState
if (@.Paramreport =2) or (@.Paramreport =0)
begin
count(CASE educ WHEN '520' THEN 1 END) as High School,
count (case educ when '521' then 1 end) as University,
sum (1) as Total
etc
What I notice in reporting services in the parameters toolbar is that it
only displays the fields of the first begin. How can I show all the fields in
the parameter's toolbar?
ThanksThis is the way RS works, it picks up the first select it finds.
Another problem you have is with @.Paramreport set to 0 you have multiple
resultsets. RS only works with one resultset.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"collie" <collie@.discussions.microsoft.com> wrote in message
news:0DD8021D-E7D7-434A-95F9-265BBE8B0A47@.microsoft.com...
> Hi,
> I have the following sp:
> if (@.Paramreport =1) or (@.Paramreport =0)
> begin
> select
> count(CASE family WHEN '420' THEN 1 END) as Unmarried,
> count (case family when '421' then 1 end) as Separated,
> count (case family when '422' then 1 end ) as' Divorce,
> sum (1) as Total
> from (
> select student.SID, family, max(hid) as hid
> from student
> inner join hasama on hasama.sid=student.sid
> where type=4
> and
> (@.Paramregion IS NULL OR region= @.Paramregion )
> AND
> yearcode=@.PARAMYEAR
> group by student.SID, family
> ) t
> end
> --studyState
> if (@.Paramreport =2) or (@.Paramreport =0)
> begin
> count(CASE educ WHEN '520' THEN 1 END) as High School,
> count (case educ when '521' then 1 end) as University,
> sum (1) as Total
> etc
> What I notice in reporting services in the parameters toolbar is that it
> only displays the fields of the first begin. How can I show all the fields
in
> the parameter's toolbar?
> Thanks
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment