資源描述:
《sql server reporting service》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在學(xué)術(shù)論文-天天文庫(kù)。
1、SQLServerReportingService 上次介紹了SQLServerReportingService命令行部署報(bào)表的基本內(nèi)容,利用這些知識(shí)我們可以輕松的部署報(bào)表,然而在TFS中,每個(gè)項(xiàng)目都有它對(duì)應(yīng)的報(bào)表,這些報(bào)表如果要一個(gè)個(gè)的更新也是件痛苦的事情,現(xiàn)在我也遇到了這個(gè)問(wèn)題,針對(duì)TFS開發(fā)了兩張報(bào)表,但是如何將這些報(bào)表應(yīng)用到所有項(xiàng)目上呢?結(jié)合之前的部署腳本知識(shí),我們可以使用下面方法實(shí)現(xiàn): 首先建立一個(gè)批處理文件ImporticrosoftVisualStudio9.0VCvcvarsall.batx86port/t%1/
2、p%2/ficrosoftCorporation. Allrightsreserved.''ThissourcecodeisintendedonlyasasupplementtoMicrosoft'DevelopmentToolsand/oron-lineumentation. Seetheseother'materialsfordetailedinformationregardingMicrosoftcodesamples.''THISCODEANDINFORMATIONAREPRO
3、VIDEDASISPLIED,INCLUDINGBUTNOTLIMITEDTOTHE'IMPLIEDERCHANTABILITYAND/ORFITNESSFORA'PARTICULARPURPOSE.'=============================================================================''1.0Documentation''Readthefolloiliarizeyourselfplescript.'
4、'1.1Overvieplescriptusesascriptfile(.rss)andthescriptenvironmenttorun'and-promptvariableusingthe杤splereportsthatshipwithReportingServicestoareportserver.'Dependingo123下一頁(yè)>>>>這篇文章來(lái)自..,。nthelocationofyoursamplereports,youmayneedtomodifythe'valueofthefileP
5、athvariable,plereports.''1.2ScriptVariables''VariablesthatarepassedonthemandlineplemandLines'''1.3.1UsethescripttopublishthesamplereportstoanAdventureain()SubMain() rs.Credentials=System.Net.CredentialCache.DefaultCredentials ''C
6、reatetheparentfolder 'Try ' rs.CreateFolder(parentFolder,/,Nothing) ' Console.essage) 'EndTry ''CreatetheAdventureD,_ ' datasource=localhost;initialcatalog=Adventureplereports DimsreaderAsNe.IO.StreamReader(ProjectInfo.in
7、i) DimpNameAsString= pName=sreader.ReadLine() PublishReport(SSe) PublishReport(SSe)EndSubPublicSubCreateSampleDataSource()SubCreateSampleDataSource(ByValnameAsString,ByValextensionAsString,ByValconnectionStringAsString) 'Definethedatasourcedefinition. D
8、imdefinitionAsNe.Integrated definition.ConnectString=connectionString definition.Enabled=True definition.Enable