all groups > sql server reporting services > august 2005 >
You're in the

sql server reporting services

group:

Visibilty of subreport based on Lists' visibilty


Visibilty of subreport based on Lists' visibilty DigitalVixen
8/1/2005 12:38:07 PM
sql server reporting services:
I have created a contract, at the last minute there is a change that must
take place based on a value I am pulling from the db.
Scenario: Contract contains 2 datasets which are both contained in lists..ex
list1, list2. There are a number of "paragrahs"= textboes that are static,
however today that changed a little.
Issue: Based on the one of the value's in list2, I must replace a textbox
with another.

What I have done is create a subreport containing the text to replace. I
have created a list3 that houses the text I want to hide. I have set the
visiblity to list3 based on the value in list2 WORKS NICELY...however I now
need to set the visibility of my subreport to True if the visiblity of list3
is False...I tried using ReportItems to reference it but that throws an
exception. I attempted to use the same Iif statement used to hide list2 but
swithced the True, False and that doesn't work because the field I am
referencing in the iif statement does not link to the subreport as it does
not contain any datasets since it is just text.
ANY help, direction...would be greatly appreciated.

RE: Visibilty of subreport based on Lists' visibilty Rose
8/1/2005 10:31:03 PM
Based on the one of the value's in list2, I must replace a textbox with
another......to do this you can have two textboxes

on textbox1 go to visibility property and on the hidden write expression
like below
First(Fields!Name.Value, "dataset1") = ""

on textbox2 write
First(Fields!Name.Value, "dataset1") <>""

if name has value then textbox1 will be displayed else textbox2 will be
displayed.

Regards,
Rose.

RE: Visibilty of subreport based on Lists' visibilty DigitalVixen
8/2/2005 6:03:02 AM
Ah, didn't think of the "easy" way. This will work perfectly if I can get
the proper syntax for using a wildcard...is that possible? I want

on textbox1 First(Fields!Name.Value, "dataset1") Like "Completed" + "%"

on textbox2 First(Fields!Name.Value, "dataset1") Not Like "Completed" + "%"

Thanks :)

[quoted text, click to view]
AddThis Social Bookmark Button