Is it possible to modify the subscription schedules such that you can avoid
sending reports on non-production days? Holidays, for example? I've got a
few simple subscriptions, each configured to run the reports on 'Every
Weekday'. But, what of the holidays? Is there anyway to account for
holidays, and avoid sending out empty reports?
-- LynnAny thoughts at all? I have a calendar table, I use it like this:
SET DATEFIRST 7
IF DATEPART(WEEKDAY, GETDATE()) BETWEEN 2 AND 6
AND NOT EXISTS (SELECT 1 FROM db.dbo.calendar WHERE dt = CONVERT(CHAR(8),
GETDATE(), 112) AND isholiday = 1)
BEGIN
EXEC ......
END
Thus I am able to avoid running certain items on non-production days. As
you know, Reporting Services subscriptions create corresponding SQL Agent
jobs. Can I not preface the tSQL command w/the same thing, like this? :
SET DATEFIRST 7
IF DATEPART(WEEKDAY, GETDATE()) BETWEEN 2 AND 6
AND NOT EXISTS (SELECT 1 FROM db.dbo.calendar WHERE dt = CONVERT(CHAR(8),
GETDATE(), 112) AND isholiday = 1)
BEGIN
exec ReportServer.dbo.AddEvent @.EventType='TimedSubscription',
@.EventData='ace5773f-2dec-4d0e-9d89-b73b42f1db00'
END
My only concern here is that I'm somewhat new to RS, I'm just worried that
modifying the scheduling via SQL Agent may conflict with the RS subscription.
Any ideas, please?
-- Lynn
"Lynn" wrote:
> Is it possible to modify the subscription schedules such that you can avoid
> sending reports on non-production days? Holidays, for example? I've got a
> few simple subscriptions, each configured to run the reports on 'Every
> Weekday'. But, what of the holidays? Is there anyway to account for
> holidays, and avoid sending out empty reports?
> -- Lynn
Showing posts with label subscription. Show all posts
Showing posts with label subscription. Show all posts
Thursday, March 22, 2012
Custom Subscription Page
I have developed a custom subscription page that integrates with Active
Directory to allow searching for company employees and resolving their email
addresses. While I could certainly build a complete "My subscription" Site I
would like to just change the link to "New Subscription" on the Report
Subscriptions Tab and the My Subscriptions Page. Can this be done?
Thanks
JasonHello Jason,
You need to use the Javascript to search the source HTML code and modify the onclick event.
Currently, the NewSubscription button is like this:
<td valign="middle"><span id="ui_btnCreateSubscription"><table
id="ui_btnCreateSubscriptionTable" width="100%" class="msrs-buttonHeaderButton"
cellpadding="0" cellspacing="0" TITLE="New Subscription"
onclick="window.location='/Reports/Pages/SubscriptionProperties.aspx?CreateNew=True
\u0026IsDataDriven=False\u0026ItemPath=%2fSnapshot%2fAcceptedPostAll_snp
\u0026RedirectUrl=http%3a%2f%2flocalhost%2fReports%2fPages%2fReport.aspx%3fItemPath%
3d%252fSnapshot%252fAcceptedPostAll_snp%26SelectedTabId%3dSubscriptionsTab';"
onmouseover="document.getElementById('ui_btnCreateSubscriptionTable').className='msrs-
buttonHeaderButtonHover';" onmouseout="document.getElementById
('ui_btnCreateSubscriptionTable').className='msrs-buttonHeaderButton';">
You may use the javascript to find the TITLE new subscription and modify the onclick event.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Thanks Wei Lu,
I'm not sure how to do that with a page I have no access to the source. Do
you have any pointers on how I would place some javascript into a page that
just contains a reference to the ReportManager assemblies'
I will do some research but any pointers would be great... :)
Thanks
Jason
"Wei Lu [MSFT]" wrote:
> Hello Jason,
> You need to use the Javascript to search the source HTML code and modify the onclick event.
> Currently, the NewSubscription button is like this:
> <td valign="middle"><span id="ui_btnCreateSubscription"><table
> id="ui_btnCreateSubscriptionTable" width="100%" class="msrs-buttonHeaderButton"
> cellpadding="0" cellspacing="0" TITLE="New Subscription"
> onclick="window.location='/Reports/Pages/SubscriptionProperties.aspx?CreateNew=True
> \u0026IsDataDriven=False\u0026ItemPath=%2fSnapshot%2fAcceptedPostAll_snp
> \u0026RedirectUrl=http%3a%2f%2flocalhost%2fReports%2fPages%2fReport.aspx%3fItemPath%
> 3d%252fSnapshot%252fAcceptedPostAll_snp%26SelectedTabId%3dSubscriptionsTab';"
> onmouseover="document.getElementById('ui_btnCreateSubscriptionTable').className='msrs-
> buttonHeaderButtonHover';" onmouseout="document.getElementById
> ('ui_btnCreateSubscriptionTable').className='msrs-buttonHeaderButton';">
> You may use the javascript to find the TITLE new subscription and modify the onclick event.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>|||Hello Jason,
You could add the following into the aspx page in the ReportManager folder.
For example, I modify the Folder.aspx page in the C:\Program Files\Microsoft SQL Server\MSSQL.3
\Reporting Services\ReportManager\Pages folder.
--
<%@. Page language="c#" Codebehind="Folder.aspx.cs" AutoEventWireup="false"
Inherits="Microsoft.ReportingServices.UI.FolderPage" EnableEventValidation="false" %>
<%@. Register TagPrefix="MSRS" Namespace="Microsoft.ReportingServices.UI"
Assembly="ReportingServicesWebUserInterface" %>
<Script scr="Javascript">
function init()
{
alert("Hello");
}
if (document.all){
window.attachEvent('onload',init)
}
else{
window.addEventListener('load',init,false);
}
</Script>
--
This will prompt a dialogbox. You could modify the init() function to search and modify the text you
want show for the button.
Hope this helps.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Thanks for asking.. :)
Unfortunately I've been dealing with a bunch of Production issues and have
not been able to check out your code suggestion.. I finally found a document
I was looking for in MSDN magazine by Dino Esposito where he writes a page
handler that intercepts the existing page handler without any of the original
code. When I get some time I'm going to try both options to see which is the
cleanest. :)
Again, Thanks for your help.. :)
"Wei Lu [MSFT]" wrote:
> Hi ,
> How is everything going? Please feel free to let me know if you need any
> assistance.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>|||Hello Jason,
I would like to know which MSDN magazin article you read.
You could go back anytime when you are free to let me know the result. Thank you!
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.
Directory to allow searching for company employees and resolving their email
addresses. While I could certainly build a complete "My subscription" Site I
would like to just change the link to "New Subscription" on the Report
Subscriptions Tab and the My Subscriptions Page. Can this be done?
Thanks
JasonHello Jason,
You need to use the Javascript to search the source HTML code and modify the onclick event.
Currently, the NewSubscription button is like this:
<td valign="middle"><span id="ui_btnCreateSubscription"><table
id="ui_btnCreateSubscriptionTable" width="100%" class="msrs-buttonHeaderButton"
cellpadding="0" cellspacing="0" TITLE="New Subscription"
onclick="window.location='/Reports/Pages/SubscriptionProperties.aspx?CreateNew=True
\u0026IsDataDriven=False\u0026ItemPath=%2fSnapshot%2fAcceptedPostAll_snp
\u0026RedirectUrl=http%3a%2f%2flocalhost%2fReports%2fPages%2fReport.aspx%3fItemPath%
3d%252fSnapshot%252fAcceptedPostAll_snp%26SelectedTabId%3dSubscriptionsTab';"
onmouseover="document.getElementById('ui_btnCreateSubscriptionTable').className='msrs-
buttonHeaderButtonHover';" onmouseout="document.getElementById
('ui_btnCreateSubscriptionTable').className='msrs-buttonHeaderButton';">
You may use the javascript to find the TITLE new subscription and modify the onclick event.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Thanks Wei Lu,
I'm not sure how to do that with a page I have no access to the source. Do
you have any pointers on how I would place some javascript into a page that
just contains a reference to the ReportManager assemblies'
I will do some research but any pointers would be great... :)
Thanks
Jason
"Wei Lu [MSFT]" wrote:
> Hello Jason,
> You need to use the Javascript to search the source HTML code and modify the onclick event.
> Currently, the NewSubscription button is like this:
> <td valign="middle"><span id="ui_btnCreateSubscription"><table
> id="ui_btnCreateSubscriptionTable" width="100%" class="msrs-buttonHeaderButton"
> cellpadding="0" cellspacing="0" TITLE="New Subscription"
> onclick="window.location='/Reports/Pages/SubscriptionProperties.aspx?CreateNew=True
> \u0026IsDataDriven=False\u0026ItemPath=%2fSnapshot%2fAcceptedPostAll_snp
> \u0026RedirectUrl=http%3a%2f%2flocalhost%2fReports%2fPages%2fReport.aspx%3fItemPath%
> 3d%252fSnapshot%252fAcceptedPostAll_snp%26SelectedTabId%3dSubscriptionsTab';"
> onmouseover="document.getElementById('ui_btnCreateSubscriptionTable').className='msrs-
> buttonHeaderButtonHover';" onmouseout="document.getElementById
> ('ui_btnCreateSubscriptionTable').className='msrs-buttonHeaderButton';">
> You may use the javascript to find the TITLE new subscription and modify the onclick event.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>|||Hello Jason,
You could add the following into the aspx page in the ReportManager folder.
For example, I modify the Folder.aspx page in the C:\Program Files\Microsoft SQL Server\MSSQL.3
\Reporting Services\ReportManager\Pages folder.
--
<%@. Page language="c#" Codebehind="Folder.aspx.cs" AutoEventWireup="false"
Inherits="Microsoft.ReportingServices.UI.FolderPage" EnableEventValidation="false" %>
<%@. Register TagPrefix="MSRS" Namespace="Microsoft.ReportingServices.UI"
Assembly="ReportingServicesWebUserInterface" %>
<Script scr="Javascript">
function init()
{
alert("Hello");
}
if (document.all){
window.attachEvent('onload',init)
}
else{
window.addEventListener('load',init,false);
}
</Script>
--
This will prompt a dialogbox. You could modify the init() function to search and modify the text you
want show for the button.
Hope this helps.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi ,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Thanks for asking.. :)
Unfortunately I've been dealing with a bunch of Production issues and have
not been able to check out your code suggestion.. I finally found a document
I was looking for in MSDN magazine by Dino Esposito where he writes a page
handler that intercepts the existing page handler without any of the original
code. When I get some time I'm going to try both options to see which is the
cleanest. :)
Again, Thanks for your help.. :)
"Wei Lu [MSFT]" wrote:
> Hi ,
> How is everything going? Please feel free to let me know if you need any
> assistance.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>|||Hello Jason,
I would like to know which MSDN magazin article you read.
You could go back anytime when you are free to let me know the result. Thank you!
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to:
Posts (Atom)