Showing posts with label body. Show all posts
Showing posts with label body. Show all posts

Friday, March 30, 2012

Putting System Variables in a Send Mail Task

KB Article 906547 suggest that it's possible to have system variables in the Subject & Body of a Send Email Task. Such as this:

"Package>>> " + @.[System::PackageName] +" was executed at>>> " + (DT_WSTR, 40) @.[System::StartTime] + " by user>>> " + @.[System::UserName] + " on Machine>>> " + @.[System::MachineName]

Or this in an OnError event handler:

"Error in the task: " + @.[System::SourceName] + "with the ID: " + @.[System::SourceID] + " has failed at: " + (DT_WSTR, 20) @.[System::ContainerStartTime] + "."

But when I do this I just get this exact text, no variables.

I'm obviously missing something basic but I can't find it. Can anyone offer a suggestion please?

I believe you are entering ""Package>>> " + @.[System::PackageName] +" was executed at>>> " + (DT_WSTR, 40) @.[System::StartTime] + " by user>>> " + @.[System::UserName] + " on Machine>>> " + @.[System::MachineName]" text directly in the 'Subject' field.

Since this is an expression you cannot enter in the Subject field directly instead you need to specify it as an expression.

Clear the Subject field - Select Expressions - Expand Expressions - Select 'Subject' for the property drop down - Specify "Package>>> " + @.[System::PackageName] +" was executed at>>> " + (DT_WSTR, 40) @.[System::StartTime] + " by user>>> " + @.[System::UserName] + " on Machine>>> " + @.[System::MachineName] in the Property field.

Thanks,
Loonysan

|||

Yes, that was it. Sorry I should have seen that I needed to put the items as an expression.

Thank You for your help.

Wednesday, March 28, 2012

Putting Data In Report Footer

Hi,
We have a field in our dataset which we want to appear in the footer
of each page in our report.
To do this, we have added a textbox to the body of the report and
reference this data in the footer using the following:
=ReportItems!site_code.Value
This works fine, except when the record overflows onto a second page.
When this happens, the value is printed as a blank on the second and
subsequent pages, until we come to print the next record.
Ideally, we'd like the value to be printed on each page of the report.
Does anyone know of a solution to this?No takers for this?
Seems like a limitation of the software.

Putting a db field in report header

I need to put a field in the report header, i think the way to do it is to
put a hidden textbox in the body and reference it from the header, but i
dont know how to make the expresion for that, is that the correct way to do
it?, is there better way?got the answer from another post
thandks anyway
"Rodrigo Sánchez" <rodrigoss@.netshoreprogramming.com> escribió en el mensaje
news:uzmr7f9qEHA.2856@.TK2MSFTNGP10.phx.gbl...
> I need to put a field in the report header, i think the way to do it is to
> put a hidden textbox in the body and reference it from the header, but i
> dont know how to make the expresion for that, is that the correct way to
do
> it?, is there better way?
>|||Rodrigo:
How ARE you able to place field data in the report header?
Thanks!
"Rodrigo Sánchez" wrote:
> I need to put a field in the report header, i think the way to do it is to
> put a hidden textbox in the body and reference it from the header, but i
> dont know how to make the expresion for that, is that the correct way to do
> it?, is there better way?
>
>