[英]Create a shared datasource in VS2012 for SSRS
I'm just looking to create a shared datasource in VS2012 without selecting an entire database scheme. 我只是想在VS2012中创建共享数据源,而不选择整个数据库方案。 We'll mostly put doing all the dataset queries by sql query. 我们将主要通过sql查询来进行所有数据集查询。
I found this but i'm still unable to create a shared datasource. 我找到了,但是我仍然无法创建共享数据源。
http://msdn.microsoft.com/en-us/library/ms159165.aspx http://msdn.microsoft.com/en-us/library/ms159165.aspx
For an embedded data source, verify that Embedded connection is selected.
Does not exists. 不存在。
So how do you create a shared datasource in VS2012 with just a connection string? 那么,如何仅使用连接字符串在VS2012中创建共享数据源?
A DataSource is just a connection string in an element in an xml structure as far as SSRS is concerned. 就SSRS而言,DataSource只是xml结构中元素中的连接字符串。 A shared one is just one kept as it's own object and then the rdl elements(reports) have a reference in their xml to that object. 共享的对象只是作为其自己对象保留的对象,然后rdl元素(报告)在其xml中具有对该对象的引用。 Think of an rds file (data source for SSRS) as this very similar to .NET standard connection strings: 认为一个rds文件(SSRS的数据源)与.NET标准连接字符串非常相似:
Data Source=(server);Initial Catalog=(database)
Plus you can store credentials to mock who is running the report. 另外,您可以存储凭据以模拟谁在运行报告。 Thus you can make a proxy user to run the database connection. 因此,您可以使代理用户运行数据库连接。 However SSRS does this through a GUI called 'Business Intelligence Development Studio' it is an add on to Visual Studio that is generally SQL Server version matches that VS version EXCEPT FOR 2012. That one creates a shell Visual Studio of VS 2010 just meant for BIDS. 但是,SSRS通过称为“ Business Intelligence Development Studio”的GUI进行此操作,它是Visual Studio的一个附加组件,通常SQL Server版本与VS版本的EXCEPT FOR 2012相匹配。该对象创建了一个Visual Studio of VS 2010,仅用于BIDS。 。
To my knowledge you should be creating these directly in BIDS and not try to hack the RDS file directly unless you get the ReportService2010.asmx web service to mess with it's properties in .NET (which is a lot more work.). 据我所知,您应该直接在BIDS中创建这些文件,而不要尝试直接对RDS文件进行破解,除非您使ReportService2010.asmx Web服务在.NET中混乱其属性(这需要做很多工作)。
To add one you just do this: 要添加一个,只需执行以下操作:
Generally SSRS has three parts to everything it does 一般而言,SSRS的工作分为三个部分
Generally reports can have everything embedded or else just reference everything they use. 通常,报表可以嵌入所有内容,或者仅引用其使用的所有内容。 References are often easier for deployments sake as SSRS is designed to look if DataSources first exist and NOT OVERWRITE them by default. 为了便于部署,引用通常更容易使用,因为SSRS旨在查看数据源是否首先存在,并且默认情况下不覆盖它们。 Thus if you reuse a datasource it is much easier in the long run as long as policy for it is set up correct. 因此,如果重用了数据源,从长远来看,只要设置正确的数据源,它就容易得多。
If you want to just know the structure of an rds file they look like this: 如果您只想知道rds文件的结构,则如下所示:
<?xml version="1.0" encoding="utf-8"?>
<RptDataSource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Name="Test">
<ConnectionProperties>
<Extension>SQL</Extension>
<ConnectString>Data Source=TestServer;Initial Catalog=TestDatabase</ConnectString>
</ConnectionProperties>
<DataSourceID>45be0ac1-80a8-4d5c-906b-c13b03298e0a</DataSourceID>
</RptDataSource>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.