Showing posts with label expression. Show all posts
Showing posts with label expression. Show all posts
Monday, March 26, 2012
Easy One
Hi,
I need to format part of an expression as money. The expression is ="Total
Aged Balance : " & SUM(Fields!Invoice_Total.Value).
How do I do that?
Thanks
JerryOk...got it...FORMATCURRENCY.
"Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
news:%23aV%23sWuvFHA.2924@.TK2MSFTNGP15.phx.gbl...
> Hi,
> I need to format part of an expression as money. The expression is
> ="Total Aged Balance : " & SUM(Fields!Invoice_Total.Value).
> How do I do that?
> Thanks
> Jerry
>
I need to format part of an expression as money. The expression is ="Total
Aged Balance : " & SUM(Fields!Invoice_Total.Value).
How do I do that?
Thanks
JerryOk...got it...FORMATCURRENCY.
"Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
news:%23aV%23sWuvFHA.2924@.TK2MSFTNGP15.phx.gbl...
> Hi,
> I need to format part of an expression as money. The expression is
> ="Total Aged Balance : " & SUM(Fields!Invoice_Total.Value).
> How do I do that?
> Thanks
> Jerry
>
Monday, March 19, 2012
Dynamically Referencing a Field Name
Is there any way to reference a Data Set field name dynamically in an expression?
For example, I have 5 reports that have the same layout but reference different columns.
For example, TextBox1 would be one of the following names depending on the report:
=Fields!A_Total.Value
=Fields!B_Total.Value
=Fields!C_Total.Value
=Fields!D_Total.Value
=Fields!E_Total.Value
I would like to build the field name dynamically instead (e.g., "Fields!" & Parameters.XXX.Label & "_Total.Value").
I know we could use IFF statements but that gets messy.
I have used dynamic sql in stored procedures to solve this issue for other reports, but I was wondering if there was an easy way to do this within the report (I have limited ability to modify this particular stored proc).
Thanks,
Mike=Fields(Parameters.WhichField.Value & "_Total").Value
--
This post is provided 'AS IS' with no warranties, and confers no rights. All
rights reserved. Some assembly required. Batteries not included. Your
mileage may vary. Objects in mirror may be closer than they appear. No user
serviceable parts inside. Opening cover voids warranty. Keep out of reach of
children under 3.
"Mike Lyncheski" <MikeLyncheski@.discussions.microsoft.com> wrote in message
news:CCFFB904-03B0-41CF-87C9-ED43CC027355@.microsoft.com...
> Is there any way to reference a Data Set field name dynamically in an
expression?
> For example, I have 5 reports that have the same layout but reference
different columns.
> For example, TextBox1 would be one of the following names depending on the
report:
> =Fields!A_Total.Value
> =Fields!B_Total.Value
> =Fields!C_Total.Value
> =Fields!D_Total.Value
> =Fields!E_Total.Value
> I would like to build the field name dynamically instead (e.g., "Fields!"
& Parameters.XXX.Label & "_Total.Value").
>
> I know we could use IFF statements but that gets messy.
> I have used dynamic sql in stored procedures to solve this issue for other
reports, but I was wondering if there was an easy way to do this within the
report (I have limited ability to modify this particular stored proc).
> Thanks,
> Mike
>
For example, I have 5 reports that have the same layout but reference different columns.
For example, TextBox1 would be one of the following names depending on the report:
=Fields!A_Total.Value
=Fields!B_Total.Value
=Fields!C_Total.Value
=Fields!D_Total.Value
=Fields!E_Total.Value
I would like to build the field name dynamically instead (e.g., "Fields!" & Parameters.XXX.Label & "_Total.Value").
I know we could use IFF statements but that gets messy.
I have used dynamic sql in stored procedures to solve this issue for other reports, but I was wondering if there was an easy way to do this within the report (I have limited ability to modify this particular stored proc).
Thanks,
Mike=Fields(Parameters.WhichField.Value & "_Total").Value
--
This post is provided 'AS IS' with no warranties, and confers no rights. All
rights reserved. Some assembly required. Batteries not included. Your
mileage may vary. Objects in mirror may be closer than they appear. No user
serviceable parts inside. Opening cover voids warranty. Keep out of reach of
children under 3.
"Mike Lyncheski" <MikeLyncheski@.discussions.microsoft.com> wrote in message
news:CCFFB904-03B0-41CF-87C9-ED43CC027355@.microsoft.com...
> Is there any way to reference a Data Set field name dynamically in an
expression?
> For example, I have 5 reports that have the same layout but reference
different columns.
> For example, TextBox1 would be one of the following names depending on the
report:
> =Fields!A_Total.Value
> =Fields!B_Total.Value
> =Fields!C_Total.Value
> =Fields!D_Total.Value
> =Fields!E_Total.Value
> I would like to build the field name dynamically instead (e.g., "Fields!"
& Parameters.XXX.Label & "_Total.Value").
>
> I know we could use IFF statements but that gets messy.
> I have used dynamic sql in stored procedures to solve this issue for other
reports, but I was wondering if there was an easy way to do this within the
report (I have limited ability to modify this particular stored proc).
> Thanks,
> Mike
>
Labels:
database,
dynamically,
example,
expression,
field,
layout,
microsoft,
mysql,
oracle,
reference,
referencing,
reports,
server,
sql
Sunday, March 11, 2012
Dynamically execute a string as an expression
Hi,
Is it possible to execute a string which is entered in the value of a texbox.
For example:
I have a table with 4 groups. The detail row of the table is filled with a dynamic query like:
="SELECT FactSales.CustomerNr, " & Parameters!SalesFigure.Value & " AS SelectedFigure FROM DWHSales". The "SelectedFigure" comes from a Parameter Combobox. Because the SelectedFigure could not allways be sumed (sometimes I have to do some special math's), i will put in the group header rows a string like
=Code.GenerateSumString(......)
which returns a string like "Sum(Fields!Fieldx.Value)" and this string should be executed, Is there a mechanism like =Execute(Code.GenerateSumString(...)) available or how can I do such things?
Thanks
Hans
Friday, March 9, 2012
Dynamically controlling a cell in 2005 SRS
Is there a way to put code (i.e. an Expression) behind a cell in a
table that will control the background and foreground colors of the
cell itself?
For example (this is pseudocode to indicate what I want to happen)
If =Fields!policy_count.Value > 5 then
Set background and foreground to "Red"
else
Set background and foreground to "Green"
endif
Thanks!!Couple issues here:
First, to answer your main question, yes you can do this with
expressions but you're going to need to set up two sepearte
expressions; one for each of the cell properties you want to change,
BackgroundColor and Color. Color is the property for font color i.e.
Foreground.
Insert code something like =IIF(Fields!policy_count.Value >
5,"Red","Green") as the Expression for the property in question. That
should give you the appearance you desire.
Second thing and maybe I'm just reading too much in but you don't want
use the same expression for both properties otherwise you'll end up
with just all green or all red cells.
HTH
toolman
wardellcastles wrote:
> Is there a way to put code (i.e. an Expression) behind a cell in a
> table that will control the background and foreground colors of the
> cell itself?
> For example (this is pseudocode to indicate what I want to happen)
> If =Fields!policy_count.Value > 5 then
> Set background and foreground to "Red"
> else
> Set background and foreground to "Green"
> endif
> Thanks!!
table that will control the background and foreground colors of the
cell itself?
For example (this is pseudocode to indicate what I want to happen)
If =Fields!policy_count.Value > 5 then
Set background and foreground to "Red"
else
Set background and foreground to "Green"
endif
Thanks!!Couple issues here:
First, to answer your main question, yes you can do this with
expressions but you're going to need to set up two sepearte
expressions; one for each of the cell properties you want to change,
BackgroundColor and Color. Color is the property for font color i.e.
Foreground.
Insert code something like =IIF(Fields!policy_count.Value >
5,"Red","Green") as the Expression for the property in question. That
should give you the appearance you desire.
Second thing and maybe I'm just reading too much in but you don't want
use the same expression for both properties otherwise you'll end up
with just all green or all red cells.
HTH
toolman
wardellcastles wrote:
> Is there a way to put code (i.e. an Expression) behind a cell in a
> table that will control the background and foreground colors of the
> cell itself?
> For example (this is pseudocode to indicate what I want to happen)
> If =Fields!policy_count.Value > 5 then
> Set background and foreground to "Red"
> else
> Set background and foreground to "Green"
> endif
> Thanks!!
Labels:
background,
cell,
code,
colors,
control,
controlling,
database,
dynamically,
expression,
foreground,
itself,
microsoft,
mysql,
oracle,
server,
sql,
srs,
table
Sunday, February 26, 2012
Dynamic Textbox size
I want to create a TextBox with dynamic width.
Probably reading from an expression.
Has anyone tried to set the width of the report objects with an expression.I posted a response here:
http://www.reportingservicesfaq.com/ow.asp?DynamicTextboxSize
Help build the Wiki!
--
Reporting Services Articles, Forums, Blogs and Wiki Community
www.ReportingServicesFAQ.com
> I want to create a TextBox with dynamic width.
> Probably reading from an expression.
> Has anyone tried to set the width of the report objects with an expression.
>
>|||There is a CanGrow property on the textbox - however, it will allow the
textbox to grow vertically but not horizontally.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"newbie" <newbie@.discussions.microsoft.com> wrote in message
news:0A8894B2-A1C3-4B7E-B1FF-555D2C1A5866@.microsoft.com...
> I want to create a TextBox with dynamic width.
> Probably reading from an expression.
> Has anyone tried to set the width of the report objects with an
expression.
>
>
Probably reading from an expression.
Has anyone tried to set the width of the report objects with an expression.I posted a response here:
http://www.reportingservicesfaq.com/ow.asp?DynamicTextboxSize
Help build the Wiki!
--
Reporting Services Articles, Forums, Blogs and Wiki Community
www.ReportingServicesFAQ.com
> I want to create a TextBox with dynamic width.
> Probably reading from an expression.
> Has anyone tried to set the width of the report objects with an expression.
>
>|||There is a CanGrow property on the textbox - however, it will allow the
textbox to grow vertically but not horizontally.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"newbie" <newbie@.discussions.microsoft.com> wrote in message
news:0A8894B2-A1C3-4B7E-B1FF-555D2C1A5866@.microsoft.com...
> I want to create a TextBox with dynamic width.
> Probably reading from an expression.
> Has anyone tried to set the width of the report objects with an
expression.
>
>
Subscribe to:
Posts (Atom)