Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

dynamic reports at the time of prview reports in ssrs Expand / Collapse
Author
Message
Posted Tuesday, August 21, 2012 12:31 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, September 12, 2014 2:11 AM
Points: 211, Visits: 4,540
hi friends i have small doubt in ssrs plz tell me answer

i developed one report in ssrs. in that report i write the query in dataset like
select * from sample then
in design part i taken 2 desgin that are one is table and matrix .what ever i required field i select same field in table ,matrix .
and i create one parameter for idenfication of table ,matrix
in that parameter i choice the option avilable value in that chose avilable value add lable on table.....>value=1
lable on maric...> value=2
then in table design propety chose visibility show or hide base on expersionand
i write expersion like =iif(Parameters!abc.Value =1,"False","True")
and same expersion wirte matrixe
=iif(Parameters!abc.Value =2,"False","True")
finealy i preview the report but that time it show errore like
an error occurred during local report processing
the hidden expression used in tablix 'tablix3' returneda data type that is not valid.
that time also i change differnect datatype but same errore occured.
plz tell me why errore occured.
when evere we previwe report that time what ever we choise report that report only show remain reports hide.plz tell me how to solve this
Post #1347582
Posted Tuesday, August 21, 2012 4:11 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 2:45 PM
Points: 2,003, Visits: 3,408
Hi, remove the quotes from your expressions, so:

=iif(Parameters!abc.Value =1,False, True)

=iif(Parameters!abc.Value =2, False, True)

Does that work?

Thanks
Post #1347673
Posted Tuesday, August 21, 2012 7:40 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, September 12, 2014 2:11 AM
Points: 211, Visits: 4,540
k its working fine suppose in preview time i chose multiple reports like table and matrix that time what i do.
i do like parameter propertis in that general i chose mulitple value .but its now work.what is the prob that time plz tell me how to solve that one
errore occure like
an error occured during local report processing
the hidden expression for the tablix 'tablix1' contains an error:operator'=' is not defind for
type 'object()' and type 'integer'
plz tell me how to solve this issue
Post #1347791
Posted Tuesday, August 21, 2012 9:44 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 2:45 PM
Points: 2,003, Visits: 3,408
So parameter abc is a multi-valued parameter? Try these, which test the first selected value of abc:

=iif(Parameters!abc.Value(0) =1,False, True)

=iif(Parameters!abc.Value(0) =2, False, True)

I don't know if there's any guarantee on the order of the values when multiple values are selected though.
If you have more complicated logic on which report parts to show I'd imagine the multi-value things get difficult then.

It might be easier to produce a list and have single value parameters, e.g.:
Label Value
Table only 1
Chart Only 2
Matrix Only 3
Table + Chart 4
Matrix + Chart 5

and combine with nested iif statements like for Table:

=iif(Parameters!abcsingle.Value = 1, True, iif(Parameters!abcsingle.Value = 4, True, False))

Cheers

Post #1347888
Posted Wednesday, August 22, 2012 9:53 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, September 12, 2014 2:11 AM
Points: 211, Visits: 4,540
hi try that loagic l
in table i wirte expersion like
=iif(Parameters!abc.Value= 1, True, iif(Parameters!abc.Value=3, True, False))

and in matrix
=iif(Parameters!abc.Value= 2, True, iif(Parameters!abc.Value=3, True, False)

that time i chose table+matrix value that time it not show any data.
what is the problem there.plz tell me how i do that sistution
Post #1348535
Posted Thursday, August 23, 2012 5:44 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, January 7, 2014 2:21 PM
Points: 132, Visits: 557
Does you table or matrix show data (of course when not hidden) ?

And i think instead of the logic you applied, you can try this :

in table
=iif(Parameters!abc.Value= 1 or Parameters!abc.Value=3, True, False)

and in matrix
=iif(Parameters!abc.Value= 2 or Parameters!abc.Value=3, True, False)

i don't know if it's any better then your logic. but give it a try.





BI Developer
SSRS, SSIS, SSAS, IBM Cognos, IBM Infosphere Cubing services, Crystal reports, IBM DB2, SQL Server, T-SQL
Please visit... ApplyBI
Post #1349041
Posted Thursday, August 23, 2012 11:16 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, September 12, 2014 2:11 AM
Points: 211, Visits: 4,540
this time also not show any data when ever i chose table +matrix
just change logic like
in table
=iif(Parameters!abc.Value= 1 or Parameters!abc.Value=3, false, true)

and in matrix
=iif(Parameters!abc.Value= 2 or Parameters!abc.Value=3, False,true)
it works whever we chose table+matrix
.that time table data and maatrex data also showing.

thanks for given logic
Post #1349264
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse