Monday, March 26, 2012

push report via command line script

Is there a way to kick off a report using a command line script? For
instance, I want a report to run only after a certain table in the database
has been updated (monthly) and I would like the report emailed as a PDF to a
user. I cannot use the My Subscriptions to do this b/c I don't know when this
monthly batch job will finish each month. Also, I don't want to just send the
user a link to his report b/c I don't want him to have to log in to see it.
I was thinking, is there a way to kick off a report via a batch script, then
have it save somewhere as a PDF and then an email can be generated and attach
this file as an attachment. Unless there is some way that the My
Subscriptions page in RS can be set up to only generate a report when a
particular database table is updated.
Thanks!Depending on the delay you can accept... YOu might go ahead and create a
subscription which runs every 10 minutes.
When you want to kick it off, simply insert the appropriate row in the
subscriptions table you created, and within 10 minutes, it'll be done.
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Lucky Horseshoe" <Lucky Horseshoe@.discussions.microsoft.com> wrote in
message news:B8EEA02B-9789-4925-9246-158A792287DF@.microsoft.com...
> Is there a way to kick off a report using a command line script? For
> instance, I want a report to run only after a certain table in the
> database
> has been updated (monthly) and I would like the report emailed as a PDF to
> a
> user. I cannot use the My Subscriptions to do this b/c I don't know when
> this
> monthly batch job will finish each month. Also, I don't want to just send
> the
> user a link to his report b/c I don't want him to have to log in to see
> it.
> I was thinking, is there a way to kick off a report via a batch script,
> then
> have it save somewhere as a PDF and then an email can be generated and
> attach
> this file as an attachment. Unless there is some way that the My
> Subscriptions page in RS can be set up to only generate a report when a
> particular database table is updated.
> Thanks!|||Hi,
Thanks for your response. Let me make sure I have this right, I should set
up a Subscription to run every 10 minutes and then after the appropriate
database table is updated (which happens once a month) just wait 10 minutes
and then kick off my email and file attachment to the user?
Would this create a lot of overhead on the report server running the report
every 10 minutes? It takes about a minute to render (or slightly less).
Thanks, Lucky
"Wayne Snyder" wrote:
> Depending on the delay you can accept... YOu might go ahead and create a
> subscription which runs every 10 minutes.
> When you want to kick it off, simply insert the appropriate row in the
> subscriptions table you created, and within 10 minutes, it'll be done.
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Lucky Horseshoe" <Lucky Horseshoe@.discussions.microsoft.com> wrote in
> message news:B8EEA02B-9789-4925-9246-158A792287DF@.microsoft.com...
> > Is there a way to kick off a report using a command line script? For
> > instance, I want a report to run only after a certain table in the
> > database
> > has been updated (monthly) and I would like the report emailed as a PDF to
> > a
> > user. I cannot use the My Subscriptions to do this b/c I don't know when
> > this
> > monthly batch job will finish each month. Also, I don't want to just send
> > the
> > user a link to his report b/c I don't want him to have to log in to see
> > it.
> >
> > I was thinking, is there a way to kick off a report via a batch script,
> > then
> > have it save somewhere as a PDF and then an email can be generated and
> > attach
> > this file as an attachment. Unless there is some way that the My
> > Subscriptions page in RS can be set up to only generate a report when a
> > particular database table is updated.
> >
> > Thanks!
>
>

No comments:

Post a Comment