HI y'all.
PROBLEM. Would like to change row color based on a calculated field.
I.E. need the row to highlight when an expiration date is within 14 days of
expiring.
I can use the row expression panel to alternate row color, but cant quite
find the magic to make it happen with data as the driver. I can also use the
report code panel which can be accessed with an =Code.bgcolor in the row
background settings.
(sample http://sqlservercentral.com/cs/blogs/aaron_myers/default.aspx)
But yet the report code requires objects references and I can find no
information how this is done in reporting services.
While I am here: What is the process sequence at run time? Does the
report, Table and row formatting have a view of the fields in a defined
dataset?
Thanks in advance.From Properties/BackgroundColor, select Expression.
If you are using a field as the driver, cope and paste the following code
and make sure to change YourFieldName with the actual name.
=IIf(Fields!YourFieldName.Value < 14, "Red", "White")
If you are using a parameter field as the driver, use this instead.
=IIf(Parameters!YourParameterName.Value < 14, "Red", "White")
"MKTapps" wrote:
> HI y'all.
> PROBLEM. Would like to change row color based on a calculated field.
> I.E. need the row to highlight when an expiration date is within 14 days of
> expiring.
> I can use the row expression panel to alternate row color, but cant quite
> find the magic to make it happen with data as the driver. I can also use the
> report code panel which can be accessed with an =Code.bgcolor in the row
> background settings.
> (sample http://sqlservercentral.com/cs/blogs/aaron_myers/default.aspx)
> But yet the report code requires objects references and I can find no
> information how this is done in reporting services.
> While I am here: What is the process sequence at run time? Does the
> report, Table and row formatting have a view of the fields in a defined
> dataset?
> Thanks in advance.
Showing posts with label formatting. Show all posts
Showing posts with label formatting. Show all posts
Thursday, March 29, 2012
dynamic row formatting based on dataset field values
Sunday, March 11, 2012
Dynamic formatting question
Hello,
I have a dataset that returns one column of data from which some fields are supposed to appear horizontally in the report, while the rest appear line by line vertically. Is it possible to take, for example, three consecutive fields from the dataset and merge the corresponding table rows that hold these fields in the report? Perhaps using an expression or custom code?
Thanks in advance for any help. I'd be happy to provide examples of what I need if it can help clarify the question.
RLGow
Not exactly sure what you are trying to do, but you can write expressions that concatenate the value of multiple fields, such as:
=Fields!ColumnA.Value & Fields!ColumnB.Value & Fields!ColumnC.Value
-- Robert
Dynamic formatting of table columns
I have a table with a few columns in my report and I would like to make some
of the rows show up in bold in the report if the value in one of the column
is within a particular range. Can I do this using Expressions. If so, can
someone post a sample expression or let me know if there is another way to do
this. Thanks in advance.
PremYes,
You can do it using expressions.
Goto row property ->font->Fontweight
Then there you can write expression
like
=iif( Fields!XYZ.Value>0,"Bold","Normal")
Malkesh
"Prem" wrote:
> I have a table with a few columns in my report and I would like to make some
> of the rows show up in bold in the report if the value in one of the column
> is within a particular range. Can I do this using Expressions. If so, can
> someone post a sample expression or let me know if there is another way to do
> this. Thanks in advance.
> Prem
>
of the rows show up in bold in the report if the value in one of the column
is within a particular range. Can I do this using Expressions. If so, can
someone post a sample expression or let me know if there is another way to do
this. Thanks in advance.
PremYes,
You can do it using expressions.
Goto row property ->font->Fontweight
Then there you can write expression
like
=iif( Fields!XYZ.Value>0,"Bold","Normal")
Malkesh
"Prem" wrote:
> I have a table with a few columns in my report and I would like to make some
> of the rows show up in bold in the report if the value in one of the column
> is within a particular range. Can I do this using Expressions. If so, can
> someone post a sample expression or let me know if there is another way to do
> this. Thanks in advance.
> Prem
>
Dynamic formatting
Can someone please provide me some pointers on dynamic formatting. How
can I change the formatting information from code.
Where on SQL Books online can I get information on dynamic formatting
Thanks
KarenOn Jul 6, 10:03 am, KarenM <karenmiddl...@.yahoo.com> wrote:
> Can someone please provide me some pointers on dynamic formatting. How
> can I change the formatting information from code.
> Where on SQL Books online can I get information on dynamic formatting
> Thanks
> Karen
I'm not sure that I understand your question; however, you can select
a field in Layout view -> select F4 (for the Properties window) ->
select <Expression...> to the right of Format and you can enter an
expression w/an if, choice or switch statement based on the value in
the field, etc. Here are a couple of examples.
=iif(CStr(Fields!FieldName.Value) Like "*.*", "$#,0.00", "#,0") -or-
something like
=iif(Fields!FieldName.Value < 0, "(#,0)", "#,0") -or- something like
=switch(CStr(Fields!FieldName.Value) Like "*.*", "$#,0.00", Fields!
FieldName.Value < 0, "(#,0)", true, "#,0")
Also, this link might be helpful.
http://msdn2.microsoft.com/en-us/library/ms157328.aspx
Regards,
Enrique Martinez
Sr. Software Consultant
can I change the formatting information from code.
Where on SQL Books online can I get information on dynamic formatting
Thanks
KarenOn Jul 6, 10:03 am, KarenM <karenmiddl...@.yahoo.com> wrote:
> Can someone please provide me some pointers on dynamic formatting. How
> can I change the formatting information from code.
> Where on SQL Books online can I get information on dynamic formatting
> Thanks
> Karen
I'm not sure that I understand your question; however, you can select
a field in Layout view -> select F4 (for the Properties window) ->
select <Expression...> to the right of Format and you can enter an
expression w/an if, choice or switch statement based on the value in
the field, etc. Here are a couple of examples.
=iif(CStr(Fields!FieldName.Value) Like "*.*", "$#,0.00", "#,0") -or-
something like
=iif(Fields!FieldName.Value < 0, "(#,0)", "#,0") -or- something like
=switch(CStr(Fields!FieldName.Value) Like "*.*", "$#,0.00", Fields!
FieldName.Value < 0, "(#,0)", true, "#,0")
Also, this link might be helpful.
http://msdn2.microsoft.com/en-us/library/ms157328.aspx
Regards,
Enrique Martinez
Sr. Software Consultant
Subscribe to:
Posts (Atom)