Showing posts with label suggest. Show all posts
Showing posts with label suggest. 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 7, 2012

Published Reports -- URGENT

Hi
I am trying to supply input parameters to a report from an aspx page. I tried many methods , but none seem to be working.
Can anyone suggest how I can work with parameterized reports from code?
Moreover , Do I have to publish a report to be able to supply Report Parameters from the code?
Thanks
--
Posted using Wimdows.net NntpNews Component -
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.You always have to publish a report to the server before you can use it. Not
sure what you are trying to do.
Are you using URL Access or the SOAP API? Supplying paramters to each is
described in BOL.
--
Brian Welcker
Group Program Manager
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"SqlJunkies User" <User@.-NOSPAM-SqlJunkies.com> wrote in message
news:uOaURsuZEHA.3112@.TK2MSFTNGP09.phx.gbl...
> Hi
> I am trying to supply input parameters to a report from an aspx page. I
> tried many methods , but none seem to be working.
> Can anyone suggest how I can work with parameterized reports from code?
> Moreover , Do I have to publish a report to be able to supply Report
> Parameters from the code?
> Thanks
> --
> Posted using Wimdows.net NntpNews Component -
> Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine
> supports Post Alerts, Ratings, and Searching.|||Hi
This is what i think.
1) in your .aspx page, you would have a hyperlink or something that links to the targeted report Eg:
<a href="http://links.10026.com/?link=http://localhost/Reportserver?/report1¶m1=123" >Go to report1</a>
2) In report1.rdl, you would have created a parameter called param1.
3) You definitely need to publish your report. You do this through the report manager: upload.
Chiara
"SqlJunkies User" wrote:
> Hi
> I am trying to supply input parameters to a report from an aspx page. I tried many methods , but none seem to be working.
> Can anyone suggest how I can work with parameterized reports from code?
> Moreover , Do I have to publish a report to be able to supply Report Parameters from the code?
> Thanks
> --
> Posted using Wimdows.net NntpNews Component -
> Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.
>