Groups | Blog | Home
all groups > sql server reporting services > may 2007 >

sql server reporting services : A couple of beginner's questions about reporting services


B. Chernick
5/9/2007 1:13:00 PM
I'm writing my first RS report.

1. Is there any way to program a field to clear, or even hide, under certain
conditions?

2. Is there any way to simulate a check box, to display boolean values? (I
Potter
5/9/2007 4:38:30 PM
On May 9, 4:13 pm, B. Chernick <BChern...@discussions.microsoft.com>
[quoted text, click to view]


1. Yes. Many of the controls on SSRS are expression based. In your
scenario, expressions can be used to manipulate the Hidden property of
a textbox based on other data, constants, etc.
2. Assuming you're talking about the body of the report. I have used
images in the past to simulate an X or a checkmark.
B. Chernick
5/10/2007 12:25:00 PM
I don't think I really understand what you mean by expressions yet. Are you
talking about writing what appears to be a vb command in the format field?
If so, I haven't been able to get that to work yet. What I'd like to do is
something like this:

iif(instr(Fields!SomeValue.Value, "A String") > 0,"",Fields!SomeValue.Value)

In other words, if the value of the incoming string does contain a
particular pattern, blank the box, otherwise display it. Or have I
completely misunderstood the concept?

[quoted text, click to view]
jewelfire
5/10/2007 7:21:48 PM
[quoted text, click to view]

hi there

In the properties box - there is a visibility property - you can use
this and toggle it depending on other fields.

hope that helps
jewel
Bruce L-C [MVP]
5/11/2007 12:00:00 AM
In the visibility property, hidden can be set to true, false or expression.
Pick expression and put the appropriate expression there.


--
Bruce Loehle-Conger
MVP SQL Server Reporting Services

[quoted text, click to view]

B. Chernick
5/11/2007 6:02:00 AM
Actually no, I need a way to program the visibility based on content.
Clicking on a field won't do.

[quoted text, click to view]
B. Chernick
5/11/2007 8:06:02 AM
Missed that! That's what I was looking for.

Just to play safe, here is my code.
=IIf (InStr(me.Value,"1/1/1753") > 0, True ,False)

I'm assuming that 'Me' in this context, refers to the current text field.
As I mentioned elsewhere, this is legacy code with '1/1/1753' indicating a
blank date. (No nulls, period. Company rules.)

[quoted text, click to view]
Bruce L-C [MVP]
5/11/2007 10:45:15 AM
I haven't used Me in RS (I've used it in VB). It is easy to test. Most
errors are picked up when you try to preview it.


--
Bruce Loehle-Conger
MVP SQL Server Reporting Services

[quoted text, click to view]

Elle
5/11/2007 1:14:03 PM
You can also hide the field using an expression like this (instead of an iif statement):

Click your field, go to your properties box and scroll down to Visibility. Under that you have a hidden option--select Expression.

In the expression paste in a TRUE statement for what you want hidden

=Fields!Dates.Value= "1753"

That will hide the field just under certain conditions.
Hope that also gives you some flexibility.

From http://www.developmentnow.com/g/115_2007_5_0_0_968676/A-couple-of-beginners-questions-about-reporting-services.htm

Posted via DevelopmentNow.com Groups
AddThis Social Bookmark Button