[SharePoint 2013] Subscribe report within SharePoint mode
param([string]$path, [string]$fileName, [string]$storage) $description = "Save in $storage as $fileName." $matchData31 = '<?xml version="1.0" encoding="utf-16" standalone="yes"?><ScheduleDefinition xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><StartDateTime xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer">2017-01-01T23:00:00.000+01:00</StartDateTime><MonthlyRecurrence xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer"><Days>31</Days><MonthsOfYear><January>true</January><March>true</March><May>true</May><July>true</July><August>true</August><October>true</October><December>true</December></MonthsOfYear></MonthlyRecurrence></ScheduleDefinition>' $matchData30 = '<?xml version="1.0" encoding="utf-16" standalone="yes"?><ScheduleDefinition xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><StartDateTime xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer">2017-01-01T23:00:00.000+01:00</StartDateTime><MonthlyRecurrence xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer"><Days>30</Days><MonthsOfYear><April>true</April><June>true</June><September>true</September><November>true</November></MonthsOfYear></MonthlyRecurrence></ScheduleDefinition>' $matchData28 = '<?xml version="1.0" encoding="utf-16" standalone="yes"?><ScheduleDefinition xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><StartDateTime xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer">2017-01-01T23:00:00.000+01:00</StartDateTime><MonthlyRecurrence xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/03/01/ReportServer"><Days>28</Days><MonthsOfYear><February>true</February></MonthsOfYear></MonthlyRecurrence></ScheduleDefinition>' $eventType = "TimedSubscription"
$extension = "Report Server DocumentLibrary"
$webServiceUri = "http://server/_vti_bin/ReportServer/ReportService2010.asmx" $rs2010 = New-WebServiceProxy -Uri $webServiceUri -Namespace SSRS.ReportingService2010 -UseDefaultCredential $parameters = New-Object -TypeName System.Collections.Generic.List[SSRS.ReportingService2010.ParameterValue]
$deliverySettings = New-Object -TypeName SSRS.ReportingService2010.ExtensionSettings
$parameterValues = New-Object -TypeName System.Collections.Generic.List[SSRS.ReportingService2010.ParameterValueOrFieldReference] $parameterFileName = New-Object -TypeName SSRS.ReportingService2010.ParameterValue
$parameterFileName.Name = "FILENAME"
$parameterFileName.Value = $fileName
$parameterValues.Add($parameterFileName) $parameterFileExtn = New-Object -TypeName SSRS.ReportingService2010.ParameterValue
$parameterFileExtn.Name = "FILEEXTN"
$parameterFileExtn.Value = $true
$parameterValues.Add($parameterFileExtn) $parameterTitle = New-Object -TypeName SSRS.ReportingService2010.ParameterValue
$parameterTitle.Name = "TITLE"
$parameterTitle.Value = $fileName
$parameterValues.Add($parameterTitle) $parameterFormat = New-Object -TypeName SSRS.ReportingService2010.ParameterValue
$parameterFormat.Name = "RENDER_FORMAT"
$parameterFormat.Value = "EXCELOPENXML"
$parameterValues.Add($parameterFormat) $parameterMode = New-Object -TypeName SSRS.ReportingService2010.ParameterValue
$parameterMode.Name = "WRITEMODE"
$parameterMode.Value = "Overwrite"
$parameterValues.Add($parameterMode) $parameterAutoCopy = New-Object -TypeName SSRS.ReportingService2010.ParameterValue
$parameterAutoCopy.Name = "AUTOCOPY"
$parameterAutoCopy.Value = $false
$parameterValues.Add($parameterAutoCopy) $parameterPath = New-Object -TypeName SSRS.ReportingService2010.ParameterValue
$parameterPath.Name = "PATH"
$parameterPath.Value = $storage
$parameterValues.Add($parameterPath) $deliverySettings.Extension = $extension
$deliverySettings.ParameterValues = $parameterValues.ToArray() $subscriptions = $rs2010.ListSubscriptions($path) if($subscriptions.Count -eq 0){
$subscription31 = $rs2010.CreateSubscription($path, $deliverySettings, $description, $eventType, $matchData31, $parameters.ToArray())
Write-Host $subscription31 $subscription30 = $rs2010.CreateSubscription($path, $deliverySettings, $description, $eventType, $matchData30, $parameters.ToArray())
Write-Host $subscription30 $subscription28 = $rs2010.CreateSubscription($path, $deliverySettings, $description, $eventType, $matchData28, $parameters.ToArray()) Write-Host $subscription28
}
[SharePoint 2013] Subscribe report within SharePoint mode的更多相关文章
- BEGINNING SHAREPOINT® 2013 DEVELOPMENT 第2章节--SharePoint 2013 App 模型概览 SharePoint 2013 App 模型
BEGINNING SHAREPOINT® 2013 DEVELOPMENT 第2章节--SharePoint 2013 App 模型概览 SharePoint 2013 App 模型 你能够通过两个 ...
- SharePoint 2013 create workflow by SharePoint Designer 2013
这篇文章主要基于上一篇http://www.cnblogs.com/qindy/p/6242714.html的基础上,create a sample workflow by SharePoint De ...
- 跟我学SharePoint 2013视频培训课程——理解SharePoint网站的体系结构(3)
课程简介 第三天,理解SharePoint 2013 网站的体系结构 视频 SharePoint 2013 交流群 41032413
- SharePoint 2013 入门教程
以下文章是自己在学习SharePoint的过程中,不断积累和总结的博文,现在总结一个目录,分享给大家.这个博客也是自己从SharePoint入门,到一个SharePoint开发的成长记录,里面记录的都 ...
- SharePoint 2013 工作流之使用Designer配置示例篇
在SharePoint 2013中,支持SharePoint Designer 2013(以下简称SPD)配置简单的工作流,完成我们的业务需要.下面,我们就举一个小例子,实现SPD配置工作流. 1. ...
- SharePoint 2013 搜索高级配置(Search Scope)
前言:SharePoint 2013集成了Fast Search,而后在配置上与2010及之前版本都有一些区别,如果需要开启搜索的文档,请参考我之前写的博客,博客地址附后.下面,我们开始了解下,Sha ...
- SharePoint 2013常用开发工具分享
众所周知,一款好的开发工具不仅能提高项目开发效率,而且能够协助开发人员简化开发流程.本文汇总几款SharePoint 2013开发常用开发工具,希望能够对大家有所帮助.如果您有更好的工具,没有包含在本 ...
- Configure SSL for SharePoint 2013
http://blogs.msdn.com/b/fabdulwahab/archive/2013/01/21/configure-ssl-for-sharepoint-2013.aspx In thi ...
- VS2012 开发SharePoint 2013 声明式workflow action(activity)之 HelloWorld
本文讲述VS2012 开发SharePoint 2013 声明式workflow action 之 HelloWorld. 使用VS2012开发客户化的workflow action是SharePoi ...
随机推荐
- 滚动div至底部
document.getElementById("chat").scrollTop=document.getElementById("chat").scroll ...
- 【使用Unity开发Windows Phone上的2D游戏】(2)初识工具
下载工具 我们需要下载两个工具:Unity 和 2D Toolkit Unity 在我写这篇文章的时候,最新的Unity版本是4.2.1, 下载地址 Unity公司的开发效率实在是很高,我一个多月前开 ...
- CSS3动画里的过渡效果
过渡效果中有: 1平滑效果 2线性过渡 3由慢到快 4由快到慢 5慢-快-慢 等等 具体参考 w3chool 例如: <body> <div class="out&quo ...
- 浅谈JAVA设计模式
没有万行的代码量,就不要想搞清楚设计模式.目前本人代码量大约在六千五百行,2016年需要继续努力,尽快完成万行之约. 工作之余需要,下面提前简单讨论一下设计模式. 创建型模式,共五种:工厂模式.抽象工 ...
- 2016 Multi-University Training Contest 1 J.Subway
Subway Time Limit: 7000/3500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Su ...
- html和css书写规范
HTML 规范 分离的标记.样式和脚本 结构.表现.行为分离 在可能情况下验证你的标记 使用编辑器验证你的标记是否正确,一般编辑器都自带有这个功能. 技术不支持的时候使用备胎,如canvas 编码格式 ...
- jQueryt过滤选择器
jQueryt过滤选择器 基本过滤选择器 选择器 描述 返回 示例 重要 :first 返回第一个元素 单个元素 :last 返回最后一个元素 单个元素 :not(selector) ...
- EF 5 最佳实践白皮书
Performance Considerations for Entity Framework 5 By David Obando, Eric Dettinger and others Publish ...
- 五分钟理解一致性哈希算法(consistent hashing)
转载请说明出处:http://blog.csdn.net/cywosp/article/details/23397179 一致性哈希算法在1997年由麻省理工学院提出的一种分布式哈希(DHT)实现算法 ...
- Web.xml各版本模版
web.xml v2.3 web.xml v2.4 <?xml version="1.0" encoding="UTF-8"?> <web-a ...