Showing posts with label expression. Show all posts
Showing posts with label expression. Show all posts

Friday, March 30, 2012

Manage TextBox.Value in other TextBox for calculations

Hi,
I need to know if and how can I do this:
tbTotal tbNumber1 tbNumber2
? 12 5
? 3 7
If I've some rows and I want insert in expression of tbTotal the pseudo-code
tbNumber1+tbNumber2
how can I do this? I need this method because the real formula is more
complex with condition etc..
Help me please!!!!! :-)Dario,
you can do this way
ReportItems!tbNumber1.Value+ReportItems!tbNumber2.value
or
Fields!Number1.Value+Fields!Number2.Value
Kiran
"Dario Concilio [MCP]" <dco@.experta-spa.com> wrote in message
news:eP3TQqxcFHA.3940@.TK2MSFTNGP10.phx.gbl...
> Hi,
> I need to know if and how can I do this:
>
> tbTotal tbNumber1 tbNumber2
> ? 12 5
> ? 3 7
>
> If I've some rows and I want insert in expression of tbTotal the
> pseudo-code
> tbNumber1+tbNumber2
> how can I do this? I need this method because the real formula is more
> complex with condition etc..
> Help me please!!!!! :-)
>

Wednesday, March 28, 2012

Making the year field 2007 to a 07 instead?

Hi

In my matrix cell I have a cell with the following Expression:

=Fields!monthname.Value & " " & Fields!Year.Value

In one of my datasets I have a SELECT CAST(FCYB.cyb_yearname AS int) AS 'Year' ... amongst other things.

Now, how do I make 'Year' to say 07 instead of 2007? What is the proper way to do it? In the expression or in the SQL code?

Thanks in advanced as always

KR

Use Right(fields!Year.Value,2)|||

Thanks a lot!! Worked perfectly!!

Making text bold in a table cell

I want to build a string to be displayed in a table cell using an
expression, I want to make some parts of the string bold. Can I do this..?
here's an example, in my table cell I have the following expression:
= "Cause:" + Fields!Cause.Value
I want to make the text string "Cause:" bold
TIA,
DanIt's all or nothing in the current release - this attribute can be set at a
cell level, not to a part of string in the cell.
--
Ravi Mumulla (Microsoft)
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"alien2_51" <dan.billow"at"n.o.s.p.a.m.monacocoach.commercialversion> wrote
in message news:%23H8vxFBfEHA.248@.TK2MSFTNGP12.phx.gbl...
> I want to build a string to be displayed in a table cell using an
> expression, I want to make some parts of the string bold. Can I do this..?
> here's an example, in my table cell I have the following expression:
> = "Cause:" + Fields!Cause.Value
> I want to make the text string "Cause:" bold
>
> TIA,
> Dan
>|||Formatting only part of the string (i.e. rich text) isn't in the current
version. On the wishlist for a future version.
--
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.
"alien2_51" <dan.billow"at"n.o.s.p.a.m.monacocoach.commercialversion> wrote
in message news:%23H8vxFBfEHA.248@.TK2MSFTNGP12.phx.gbl...
> I want to build a string to be displayed in a table cell using an
> expression, I want to make some parts of the string bold. Can I do this..?
> here's an example, in my table cell I have the following expression:
> = "Cause:" + Fields!Cause.Value
> I want to make the text string "Cause:" bold
>
> TIA,
> Dan
>

Friday, March 23, 2012

Making a row not show

I have one column that is an expression that either returns a value or
returns zero. I would like if it is zero to not show at all. How is this
done?
Thanks,
RyanGo to properties for that column, click on Visibility tab. Click on
Expression radio button and enter this formula:
=iif (Fields!<expression>.Value = 0, True, False)
you may have to map the expression to a data set row before this will work.
I have made it work with parameter and field values.
"Ryan Mcbee" wrote:
> I have one column that is an expression that either returns a value or
> returns zero. I would like if it is zero to not show at all. How is this
> done?
> Thanks,
> Ryan|||Carl,
I tried this and it didn't work. I think because I am using a matrix
report. Would have to put this formula in every column since it is a matrix
report?
Thanks,
Ryan
"Carl Henthorn" wrote:
> Go to properties for that column, click on Visibility tab. Click on
> Expression radio button and enter this formula:
> =iif (Fields!<expression>.Value = 0, True, False)
> you may have to map the expression to a data set row before this will work.
> I have made it work with parameter and field values.
> "Ryan Mcbee" wrote:
> > I have one column that is an expression that either returns a value or
> > returns zero. I would like if it is zero to not show at all. How is this
> > done?
> >
> > Thanks,
> > Ryan

Wednesday, March 21, 2012

Make textbox value dependent on result of a dataset

I need to make a textbox1 say "Pass" or "Fail" depending on the value in
another textbox2. Textbox2 has an expression assigned to it:
=Sum(Fields!TotAgents.Value, "NumAgts") which returns a 0 or greater number.
I am struggling with the syntax of linking the textbox1 text to the result of
textbox2's evaluation. In otherwords, if textbox2 evaluates to 0, then
textbox1 should say "Pass".
Thank you.Try this:
Right click on textbox1 and choose expressions.
Type: IIF(Fields!TotAgents.Value = 0, "Pass", "Fail")
This should give you the word "Pass" if the value in textbox2 is = 0
and the word "Fail" if the condition is not met. Hopes this helps!

Monday, February 20, 2012

Maintenance Plan Tasks In SSIS(Sql 2005)

I am finding difficult to set Expression Property "SelectedDatabases" in Check Databases Integrity Task in SSIS.

I keep getting error:

TITLE: Expression Builder

Expression cannot be evaluated.


ADDITIONAL INFORMATION:

The data type of variable "User::varDataset" is not supported in an expression.

Reading the variable "User::varDataset" failed with error code 0xC00470D0.

(Microsoft.DataTransformationServices.Controls)

I need the flexibilty to be able to control the Task behaviour during runtime through Variables.

Any suggestions .... or even a different approach will be helpful..

cheers

aigbor

Hi Aigbor

I encountered a similar problem when using the Shrink Database Task and decided to use Execute SQL Task with an expression instead.

You might find the execute sql task with the DBCC CHECKDB command to be more useful.

Maintenance Plan Tasks In SSIS(Sql 2005)

I am finding difficult to set Expression Property "SelectedDatabases" in Check Databases Integrity Task in SSIS.

I keep getting error:

TITLE: Expression Builder

Expression cannot be evaluated.


ADDITIONAL INFORMATION:

The data type of variable "User::varDataset" is not supported in an expression.

Reading the variable "User::varDataset" failed with error code 0xC00470D0.

(Microsoft.DataTransformationServices.Controls)

I need the flexibilty to be able to control the Task behaviour during runtime through Variables.

Any suggestions .... or even a different approach will be helpful..

cheers

aigbor

Hi Aigbor

I encountered a similar problem when using the Shrink Database Task and decided to use Execute SQL Task with an expression instead.

You might find the execute sql task with the DBCC CHECKDB command to be more useful.