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

sql server reporting services

group:

More than one tables in one report . . .


More than one tables in one report . . . GGill
9/20/2007 2:30:00 PM
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.

Re: More than one tables in one report . . . Norman Yuan
9/20/2007 3:18:13 PM
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]
Re: More than one tables in one report . . . GGill
9/20/2007 5:02:02 PM
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]
Re: More than one tables in one report . . . Norman Yuan
9/20/2007 5:27:52 PM
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]
Re: More than one tables in one report . . . Peter Biddlecombe
9/21/2007 7:42:15 AM
[quoted text, click to view]

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
Re: More than one tables in one report . . . GGill
9/21/2007 3:38:00 PM
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]
AddThis Social Bookmark Button