sql server reporting services:
I n my report i need to have 3 tables, these tables using same dataset, the difference is between these tables is using different field names. I have parameter which is (All, 1, 2, 3),. So if i select All then i should view all 3 tables, if 1 then view first table t.e.. Please could you give me any idea what i need to do to make this report work.
You can set each table's Visibility.Hidden propeprty to an expression, such as =IIF(Parameters!ParaName.Value="All", False,IIF(Parameters!ParaName.Value="1",...,...)) [quoted text, click to view] "GGill" <GGill@discussions.microsoft.com> wrote in message news:56DD5D2C-23A3-41A7-BE8D-0A78EC67C234@microsoft.com... >I n my report i need to have 3 tables, these tables using same dataset, the > difference is between these tables is using different field names. I have > parameter which is (All, 1, 2, 3),. So if i select All then i should view > all > 3 tables, if 1 then view first table t.e.. Please could you give me any > idea > what i need to do to make this report work. > > Thanks.
Thank you for respond. I tried to use this parameter in each tables, but it shows syntax error after "All". Here is the parameter i used in each tables: =IIF(Parameters!ParaName.Value="All", False, IIF(Parameters!ParaName.Value="1", IIF(Parameters!ParaName.Value="2", IIF(Parameters!ParaName.Value="3")) Where is the error? Thanks. [quoted text, click to view] "Norman Yuan" wrote: > You can set each table's Visibility.Hidden propeprty to an expression, such > as > > =IIF(Parameters!ParaName.Value="All", > False,IIF(Parameters!ParaName.Value="1",...,...)) > > > "GGill" <GGill@discussions.microsoft.com> wrote in message > news:56DD5D2C-23A3-41A7-BE8D-0A78EC67C234@microsoft.com... > >I n my report i need to have 3 tables, these tables using same dataset, the > > difference is between these tables is using different field names. I have > > parameter which is (All, 1, 2, 3),. So if i select All then i should view > > all > > 3 tables, if 1 then view first table t.e.. Please could you give me any > > idea > > what i need to do to make this report work. > > > > Thanks. >
Assume this table is visible when parameter value is "All" or "1", and invisible when "2" or "3": =IIF(Parameters!ParaName.Value="All", False, IIF(Parameters!ParaName.Value="1", False, IIF(Parameters!ParaName.Value="2", True, IIF(Parameters!ParaName.Value="3",True,False)))) [quoted text, click to view] "GGill" <GGill@discussions.microsoft.com> wrote in message news:C615495E-7C6E-41C5-84C6-7D1190E5746E@microsoft.com... > Thank you for respond. > I tried to use this parameter in each tables, but it shows syntax error > after "All". Here is the parameter i used in each tables: > > =IIF(Parameters!ParaName.Value="All", False, > IIF(Parameters!ParaName.Value="1", IIF(Parameters!ParaName.Value="2", > IIF(Parameters!ParaName.Value="3")) > > Where is the error? > Thanks. > > "Norman Yuan" wrote: > >> You can set each table's Visibility.Hidden propeprty to an expression, >> such >> as >> >> =IIF(Parameters!ParaName.Value="All", >> False,IIF(Parameters!ParaName.Value="1",...,...)) >> >> >> "GGill" <GGill@discussions.microsoft.com> wrote in message >> news:56DD5D2C-23A3-41A7-BE8D-0A78EC67C234@microsoft.com... >> >I n my report i need to have 3 tables, these tables using same dataset, >> >the >> > difference is between these tables is using different field names. I >> > have >> > parameter which is (All, 1, 2, 3),. So if i select All then i should >> > view >> > all >> > 3 tables, if 1 then view first table t.e.. Please could you give me any >> > idea >> > what i need to do to make this report work. >> > >> > Thanks. >> >>
[quoted text, click to view] On Sep 21, 1:27 am, "Norman Yuan" <NoAddr...@NoEmail.fake> wrote: > Assume this table is visible when parameter value is "All" or "1", and > invisible when "2" or "3": > > =IIF(Parameters!ParaName.Value="All", False, > IIF(Parameters!ParaName.Value="1", False, IIF(Parameters!ParaName.Value="2", > True, IIF(Parameters!ParaName.Value="3",True,False)))) > > "GGill" <GG...@discussions.microsoft.com> wrote in message > > news:C615495E-7C6E-41C5-84C6-7D1190E5746E@microsoft.com... > > > > > Thank you for respond. > > I tried to use this parameter in each tables, but it shows syntax error > > after "All". Here is the parameter i used in each tables: > > > =IIF(Parameters!ParaName.Value="All", False, > > IIF(Parameters!ParaName.Value="1", IIF(Parameters!ParaName.Value="2", > > IIF(Parameters!ParaName.Value="3")) > > > Where is the error? > > Thanks. > > > "Norman Yuan" wrote: > > >> You can set each table's Visibility.Hidden propeprty to an expression, > >> such > >> as > > >> =IIF(Parameters!ParaName.Value="All", > >> False,IIF(Parameters!ParaName.Value="1",...,...)) > > >> "GGill" <GG...@discussions.microsoft.com> wrote in message > >>news:56DD5D2C-23A3-41A7-BE8D-0A78EC67C234@microsoft.com... > >> >I n my report i need to have 3 tables, these tables using same dataset, > >> >the > >> > difference is between these tables is using different field names. I > >> > have > >> > parameter which is (All, 1, 2, 3),. So if i select All then i should > >> > view > >> > all > >> > 3 tables, if 1 then view first table t.e.. Please could you give me any > >> > idea > >> > what i need to do to make this report work. > > >> > Thanks.- Hide quoted text - > > - Show quoted text -
The real error is in the sheer compexity! The Hidden property is Boolean. So is the result of a comparison. So abbreviating "Parameters!ParaName.Value" to "x", to make the table visible for All or 1 when the only other choices are 2 or 3, you need =((x="2") OR (x="3")) i.e. =((Parameters!ParaName.Value="2") OR (Parameters!ParaName.Value="3")) (and some of those brackets can be scrapped if you know your execution order rules better than me) The tangled expression is the equivalent of writing this daft VB code which is depressingly common: If a > b Then blnAExceedsB = True Else blnAExceedsB = False End If instead of just putting: blnAExceedsB = a > b
In this parameter if i select all 4 options then show all tables, if i select option 1 then show only first table. it will show all 4 tables at once but if i select only one it still show all 4 tables. =IIF(Parameters!ParaName.Value(0)="1" or Parameters!ParaName.Value(0)="2" or Parameters!ParaName.Value(0)="3" or Parameters!ParaName.Value(0)="4", False, IIF(Parameters!ParaName.Value(0)="1", False, IIF(Parameters!ParaName.Value(0)="2" or Parameters!ParaName.Value(0)="2" or Parameters!ParaName.Value(0)="4",True,False))) Also each table has list properties. So this parameter i typed in table and list properties. Is i t right thing to do? Why it does not show less then 4 tables? Thanks. [quoted text, click to view] "Peter Biddlecombe" wrote: > On Sep 21, 1:27 am, "Norman Yuan" <NoAddr...@NoEmail.fake> wrote: > > Assume this table is visible when parameter value is "All" or "1", and > > invisible when "2" or "3": > > > > =IIF(Parameters!ParaName.Value="All", False, > > IIF(Parameters!ParaName.Value="1", False, IIF(Parameters!ParaName.Value="2", > > True, IIF(Parameters!ParaName.Value="3",True,False)))) > > > > "GGill" <GG...@discussions.microsoft.com> wrote in message > > > > news:C615495E-7C6E-41C5-84C6-7D1190E5746E@microsoft.com... > > > > > > > > > Thank you for respond. > > > I tried to use this parameter in each tables, but it shows syntax error > > > after "All". Here is the parameter i used in each tables: > > > > > =IIF(Parameters!ParaName.Value="All", False, > > > IIF(Parameters!ParaName.Value="1", IIF(Parameters!ParaName.Value="2", > > > IIF(Parameters!ParaName.Value="3")) > > > > > Where is the error? > > > Thanks. > > > > > "Norman Yuan" wrote: > > > > >> You can set each table's Visibility.Hidden propeprty to an expression, > > >> such > > >> as > > > > >> =IIF(Parameters!ParaName.Value="All", > > >> False,IIF(Parameters!ParaName.Value="1",...,...)) > > > > >> "GGill" <GG...@discussions.microsoft.com> wrote in message > > >>news:56DD5D2C-23A3-41A7-BE8D-0A78EC67C234@microsoft.com... > > >> >I n my report i need to have 3 tables, these tables using same dataset, > > >> >the > > >> > difference is between these tables is using different field names. I > > >> > have > > >> > parameter which is (All, 1, 2, 3),. So if i select All then i should > > >> > view > > >> > all > > >> > 3 tables, if 1 then view first table t.e.. Please could you give me any > > >> > idea > > >> > what i need to do to make this report work. > > > > >> > Thanks.- Hide quoted text - > > > > - Show quoted text - > > The real error is in the sheer compexity! The Hidden property is > Boolean. > So is the result of a comparison. > > So abbreviating "Parameters!ParaName.Value" to "x", to make the table > visible for All or 1 when the only other choices are 2 or 3, you need > =((x="2") OR (x="3")) > > i.e. > =((Parameters!ParaName.Value="2") OR (Parameters!ParaName.Value="3")) > > (and some of those brackets can be scrapped if you know your execution > order > rules better than me) > > The tangled expression is the equivalent of writing this daft VB code > which is > depressingly common: > > If a > b Then > blnAExceedsB = True > Else > blnAExceedsB = False > End If > > instead of just putting: > blnAExceedsB = a > b >
Don't see what you're looking for? Try a search.
|