I'm new to the forum as well as Report Services. I have created a couple of
sample reports and I'm monkeying with the settings. I have a book on the
way which I hope will help answer some of my questions but in the meantime I
have a couple beginner questions...
1) I want to concatenate a string in the Title of a report with a parameter
I have assigned to the report... Basically I want the title to read "Here's
the Data for 01/01/2003 thru 12/31/2003" where both of the dates in the
title are runtime parameters specified by the user.
2) Is there a way to do conditional formatting and or use constants when
formatting fields... How about records? For instance, make the value in
the field RED if it meets a certain criterion... or, make the record
background blue if the record meets a certain criterion.
Any direction you may provide or answers will be appreciated.
Thanks
REM7600#1: ="Here's the data for " & Parameters!Report_Parameter_0.Value & " to " &
Parameters!Report_Parameter_1.Value [Check
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSMAIN/htm/rsc_ov_using_v1_6foz.asp
for details]
#2: =iif(Trim(Fields!type.Value) = "business", "Red", "Blue") [Check
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSCREATE/htm/rcr_creating_expressions_v1_3983.asp
for details]
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"REM7600" <rem7600@.hotmail.com> wrote in message
news:uVjBs%23RaEHA.2892@.TK2MSFTNGP10.phx.gbl...
> I'm new to the forum as well as Report Services. I have created a couple
of
> sample reports and I'm monkeying with the settings. I have a book on the
> way which I hope will help answer some of my questions but in the meantime
I
> have a couple beginner questions...
> 1) I want to concatenate a string in the Title of a report with a
parameter
> I have assigned to the report... Basically I want the title to read
"Here's
> the Data for 01/01/2003 thru 12/31/2003" where both of the dates in the
> title are runtime parameters specified by the user.
> 2) Is there a way to do conditional formatting and or use constants when
> formatting fields... How about records? For instance, make the value in
> the field RED if it meets a certain criterion... or, make the record
> background blue if the record meets a certain criterion.
> Any direction you may provide or answers will be appreciated.
> Thanks
> REM7600
>|||1) Set title value to an expression:
="Here's the Data for " + CStr(Parameters!StartDate.Value) + " thru " +
CStr(Parameters!EndDate.Value)
2) You may set color or background color properties to expressions returning
color name, for example:
=iif(Fields!MyData.Value < 0, "Red", "Blue")
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"REM7600" <rem7600@.hotmail.com> wrote in message
news:uVjBs%23RaEHA.2892@.TK2MSFTNGP10.phx.gbl...
> I'm new to the forum as well as Report Services. I have created a couple
> of
> sample reports and I'm monkeying with the settings. I have a book on the
> way which I hope will help answer some of my questions but in the meantime
> I
> have a couple beginner questions...
> 1) I want to concatenate a string in the Title of a report with a
> parameter
> I have assigned to the report... Basically I want the title to read
> "Here's
> the Data for 01/01/2003 thru 12/31/2003" where both of the dates in the
> title are runtime parameters specified by the user.
> 2) Is there a way to do conditional formatting and or use constants when
> formatting fields... How about records? For instance, make the value in
> the field RED if it meets a certain criterion... or, make the record
> background blue if the record meets a certain criterion.
> Any direction you may provide or answers will be appreciated.
> Thanks
> REM7600
>|||Ravi... I could have sworn I did option 1... I do that in access all the
time. Oh well, I'll follow the KB article referenced and see what I left
out (I'm sure there's something).
Thanks for the help!
REM7600
> #1: ="Here's the data for " & Parameters!Report_Parameter_0.Value & " to "
&
> Parameters!Report_Parameter_1.Value [Check
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSMAIN/htm/rsc_ov_using_v1_6foz.asp
> for details]
> #2: =iif(Trim(Fields!type.Value) = "business", "Red", "Blue") [Check
>
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSCREATE/htm/rcr_creating_expressions_v1_3983.asp
> for details]|||I didn't try doing the Convert on the dates... Maybe that's what I did
wrong.
Thanks for the quick answers!
REM7600
> 1) Set title value to an expression:
> ="Here's the Data for " + CStr(Parameters!StartDate.Value) + " thru " +
> CStr(Parameters!EndDate.Value)
> 2) You may set color or background color properties to expressions
returning
> color name, for example:
> =iif(Fields!MyData.Value < 0, "Red", "Blue")
> --|||Note:
* if you use "+" to concatenate strings no implicit data type conversions
will happen.
* if you use "&" to concatenate strings, implicit conversions will be done
(invoking the default .ToString() implementation).
i.e. both expressions should work:
="Here's the Data for " + CStr(Parameters!StartDate.Value) + " thru " +
CStr(Parameters!EndDate.Value)
="Here's the Data for " & Parameters!StartDate.Value & " thru " &
Parameters!EndDate.Value
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"REM7600" <rem7600@.hotmail.com> wrote in message
news:OnsrcYSaEHA.1840@.TK2MSFTNGP11.phx.gbl...
> I didn't try doing the Convert on the dates... Maybe that's what I did
> wrong.
> Thanks for the quick answers!
> REM7600
>
> > 1) Set title value to an expression:
> > ="Here's the Data for " + CStr(Parameters!StartDate.Value) + " thru " +
> > CStr(Parameters!EndDate.Value)
> >
> > 2) You may set color or background color properties to expressions
> returning
> > color name, for example:
> > =iif(Fields!MyData.Value < 0, "Red", "Blue")
> >
> > --
>
Monday, February 13, 2012
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment