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

Sunday, March 25, 2012

Change font size w/ expression?

Hi I have a chart whose title I would like to format w different font sizes.
The chart title is:
<caption>="This is the chart main text" + vbcrlf +
First(Fields!subtitle.Value, "Text")</caption>
The main chart title is hard coded and the second line is a field.
I would like to change the font size on that second line. Is there a way to
reference the <caption> line in <style><fontsize> and parse through it?
I'm thinking this isn't possible, but why not ask.
Thanks!
MarcusOn Nov 27, 3:56 pm, Marcus K <Marc...@.discussions.microsoft.com>
wrote:
> Hi I have a chart whose title I would like to format w different font sizes.
> The chart title is:
> <caption>="This is the chart main text" + vbcrlf +
> First(Fields!subtitle.Value, "Text")</caption>
> The main chart title is hard coded and the second line is a field.
> I would like to change the font size on that second line. Is there a way to
> reference the <caption> line in <style><fontsize> and parse through it?
> I'm thinking this isn't possible, but why not ask.
> Thanks!
> Marcus
You will most likely want to create a custom ASP.NET application that
reads in the RDL file (possibly as an XML Document) and parses the XML
tags and writes the file back out -and/or- read the RDL file in via
Streamreader and assigns it to a string and then does a string replace
of the fontsize in the tags and then writes the file back out via
Streamwriter. Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultant|||Thanks Enrique, but thats outside the scope of my knowledge.
Any chance there is a way to do it within the rdl?
"EMartinez" wrote:
> On Nov 27, 3:56 pm, Marcus K <Marc...@.discussions.microsoft.com>
> wrote:
> > Hi I have a chart whose title I would like to format w different font sizes.
> > The chart title is:
> >
> > <caption>="This is the chart main text" + vbcrlf +
> > First(Fields!subtitle.Value, "Text")</caption>
> >
> > The main chart title is hard coded and the second line is a field.
> >
> > I would like to change the font size on that second line. Is there a way to
> > reference the <caption> line in <style><fontsize> and parse through it?
> >
> > I'm thinking this isn't possible, but why not ask.
> >
> > Thanks!
> > Marcus
>
> You will most likely want to create a custom ASP.NET application that
> reads in the RDL file (possibly as an XML Document) and parses the XML
> tags and writes the file back out -and/or- read the RDL file in via
> Streamreader and assigns it to a string and then does a string replace
> of the fontsize in the tags and then writes the file back out via
> Streamwriter. Hope this helps.
> Regards,
> Enrique Martinez
> Sr. Software Consultant
>

Thursday, March 8, 2012

Change Body Size

Is there a way to change the report body size in execution time(from the
template),
depending on the result of an expression?.
--
Eduardo FonsecaTo decrease body size, decrease input, increase output, and increase
exercise time aka execution time aka CPU ;). In other words, do not
modify your data and do a lot of selects with CPU-hungry UDFs in WHERE
clause. Add WITH RECOMPILE to your stored procedures to further up
execution time. Just kidding. Sorry for the off topic. ;)

Change Body Size

Is there a way to change the report body size in execution time(from the
template),
depending on the result of an expression?.
--
Eduardo FonsecaTo decrease body size, decrease input, increase output, and increase
exercise time aka execution time aka CPU ;). In other words, do not
modify your data and do a lot of selects with CPU-hungry UDFs in WHERE
clause. Add WITH RECOMPILE to your stored procedures to further up
execution time. Just kidding. Sorry for the off topic. ;)

Friday, February 10, 2012

CAST error

I am keep getting error when I use CAST function in Expression.

If I run (DT_I4)("1") I got following error.

TITLE: Expression Builder

Cannot convert expression value to property type.

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%u00ae+Visual+Studio%u00ae+2005&ProdVer=8.0.50727.42&EvtSrc=Microsoft.DataTransformationServices.Controls.TaskUIFramework.TaskUIFrameworkSR&EvtID=CannotAssignExpressionToProperty&LinkId=20476


ADDITIONAL INFORMATION:

Cannot convert 'System.Int32' to 'System.Int64'.


BUTTONS:

OK

This says to me that the target of the expression, such as a property, is of type Int64, or DT_I8, but your value is only Int32 Try the following instead-

(DT_I8)("1")

Cast @[System::StartTime] Problem

This is a Subject Expression I put in my Mail component in my SSIS 2005 package but it's not liking the StartTime concatenation. I tried other ways but can't get it to allow this:

"Process Started by : " + @.[System::UserName] + (DT_DATE) @.[System::StartTime]

I get the error:

TITLE: Expression Builder

Expression cannot be evaluated.


ADDITIONAL INFORMATION:

The data types "DT_WSTR" and "DT_DATE" are incompatible for binary operator "+". The operand types could not be implicitly cast into compatible types for the operation. To perform this operation, one or both operands need to be explicitly cast with a cast operator.

Attempt to set the result type of binary operation ""Process Started by : " + @.[System::UserName] + (DT_DATE)@.[System::StartTime]" failed with error code 0xC0047080.

I tried to use CAST() but not sure if that's allowed or the syntax for it specifically in SSIS 2005

As the error message says, you cannot concatenate DT_WSTR & DT_DATE. Try:

"Process Started by : " + @.[System::UserName] + (DT_WSTR) @.[System::StartTime]

-Jamie