How to Create Embedded Data Source in SSRS 2014 - reporting-services

I want to create embedded data source in SSRS 2014 using Visual studio 2013. But there is no item for embedded data source. How I can add it?
Thanks

You create an Embedded Data Source in the report itself, not in the project.
Create a new report in your project (or use an existing one). Then, in the Report Data pane Ctrl+Alt+D, create a new Data Source by right-clicking on the Data Sources folder.
Choose Embedded connection, the Type and populate the Connection String with the settings that are appropriate for connecting to your database.
Afterward, add a new dataset by right-clicking on the Datasets folder and choosing Add dataset. Choose Use a dataset embedded in my report, and pick the data source you created above.
The report will use that embedded connection going forward, at least for this dataset.

Related

Output/export information from configmgr 2012 ssrs report

I understand it is possible to export the report data into multiple file types using the export button. however i'm wanting to access the information without having to manually export. So my question is, is it possible using a batch file or powershell to read a text box on the report and output it say into a notepad file or spreadsheet. or if not maybe just a way to export all of the data on the report without having to manually do it? Screenshot attached for an example.
One option is to create a subscription for the report and either have an attachment emailed to you or have it saved to a network location. In either case, there are several export options (csv, excel, xml, etc.). If you're only wanting partial data from the report, I'd recommend creating a sql query or just create a new report that gets you exactly what you need.

SSRS - Upload Data Source after Report

I'm creating an MVC application which uses the Reporting Web service (2010) for programatically managing reports and data sources.
About a month or so ago when I first implemented this functionality, I was able to upload reports (.rdl files) first and later upload its data source.
I was then able to view the report using a report viewer control in a web page.
However, since a week or so, this flow has broken, i.e. if I upload the report first and then the data source, the report doesn't render in the report viewer control. It gives the following error.
The report server cannot process the report or shared dataset.
The shared data source 'AW' for the report server or SharePoint site is not valid.
Browse to the server or site and select a shared data source.
The data source is a shared data source which is defined in the rdl file as follows.
<DataSources>
<DataSource Name="AW">
<DataSourceReference>AW</DataSourceReference>
</DataSource>
</DataSources>
If I reverse the flow, i.e. upload the data source first and then the report, it starts working!
But I'm 100% sure, the other flow used to work when I first implemented it.
I'm stumped as to why the original flow has stopped working.
Both the report and the data source are uploaded to a specific folder.
Can someone please shed some light on this.
Does the original flow make sense? I mean is it supposed to work, or was I imagining stuff?
btw, the data source uploaded is in the following format
<?xml version="1.0" encoding="utf-8"?>
<DataSourceDefinition xmlns="http://schemas.microsoft.com/sqlserver/reporting/2006/03/reportdatasource">
<Extension>SQLAZURE</Extension>
<ConnectString>Data Source=xxx;Initial Catalog=AdventureWorks2012</ConnectString>
<UseOriginalConnectString>false</UseOriginalConnectString>
<OriginalConnectStringExpressionBased>false</OriginalConnectStringExpressionBased>
<CredentialRetrieval>Store</CredentialRetrieval>
<WindowsCredentials>false</WindowsCredentials>
<ImpersonateUser>false</ImpersonateUser>
<UserName>user</UserName>
<Password>pass</Password>
<Enabled>True</Enabled>
</DataSourceDefinition>
and I use the ReportingService2010.CreateCatalogItem method for creating both the report and the data source.
Any help is highly appreciated.
Perhaps, my case may be useful for you. I had a task to upload reports from rdl-files to SSRS2012 before application server start. I decided to use Web Service API, not rs.exr.
After report loading by method CreateCatalogItem of class ReportingService2010 I tried to execute reports in browser and got error. SSRS could not find shared data source for loaded report. When I published reports from VS2013, reports worked properly. I could not use method SetItemDataSources , because could not get the reference to existing data source as instance of DataSource class. That is why I found following solution. The idea in that the rdl-file has only name of shared data source, not path. Therefore, if report and its data source are located in different folder, report don’t see data source. In my case my data source located in folder “Data Sources”, so it’s necessary to correct rdl-file before uploading,, as shown below:
Warning[] warnings = null;
string name = "ProductList";
string dsName = "DB_CORE";
string dsFolderPath = "/Data Sources";
byte[] definition = null;
// correct rdl
XmlDocument rdlDoc = new XmlDocument();
rdlDoc.Load(+ name + ".rdl");
XmlNodeList dsRefmodes = rdlDoc.GetElementsByTagName("DataSourceReference");
dsRefmodes[0].InnerText = dsFolderPath + "/" + dsName;
definition = Encoding.UTF8.GetBytes(rdlDoc.OuterXml);
// upload
CatalogItem report = rs.CreateCatalogItem("Report", name, "/" + parent,
true, definition, null, out warnings);

Error with shared dataset when manually download report and put into ReportViewer

I have a server report that references a shared dataset on the server. It works fine if I add a ReportViewer to a page and set the report server URL and report path properties.
Because I need to look at the xml of the report and do some preprocessing, I:-
Manually download the report using: ReportingService2010.GetItemDefinition(path). I then convert this to an XDocument.
Do my preprocessing - this does not touch anything to do with datasets.
Load the xml definition into the report viewer using:
XDocument processedDocument;
using (var sr = new StringReader(processedDocument.ToString()))
{
viewer.ServerReport.LoadReportDefinition(sr);
}
When I attempt to view the report, I see this error in the server error logs:
Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException:
Shared dataset definition stream does not exist.
To get to the crux of the error, I've removed step 2 completely so that all I am doing is downloading the report, converting to xml and then loading the xml into the ReportViewer.
I do not get this problem when the datasets are embedded in the report.
Any ideas what is happening here?
ETA:
If I download the report, convert to XDocument, convert back to byte[] and then use ReportingService2010.SetItemDefinition() to save the report on the server, it displays fine in the ReportViewer (when the path is specified).
This means the problem is not in the xml<->byte[] conversions. When the ReportViewer downloads a report, using a path, it must be doing something with the referenced shared datasets that I'm not doing.
I have a workaround.
It seems to be a problem with the relative path to the shared DataSets. I presume I would have the same problem referring to shared images on the server as well.
Here's what I intend to do:
Download the report.
Perform pre-processing.
Use ReportingServices2010.CreateCatalogueItem to save a new report back on the server at exactly the same location, but using a temporary name.
Use reportViewer.ServerReport.ReportPath to reference the new temporary report.
ETA:
Actually, because the DataSet path references always start at the root, I don't think you have to store the report at exactly the same location. You can create a /Temp folder that you can easily periodically clean out.

SSRS 2008: How to define Table/Tablix style without using a wizard?

Or how do I change the Table (Tablix) style in an already existing Report Server Project?
(I'm talking about a style which can be set in Report Server Project Wizard)
The style selected as a step in the Report wizard sets many properties on individual items in the report. Once created there is no easy way to switch a report from one style to another.
Two options:
Recreate the report using the wizard and select the new style.
Create two reports using a simple dataset, and then compare the resulting .rdl file (XML) in a file compare utility, such as UltraCompare. This will give you a list of all the different properties.
The file used for the style templates is at
C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\Business Intelligence Wizards\Reports\Styles\en\StyleTemplates.xml in my installation of BIDS.
Examining this file can show you the changed properties as well.

how to add file extension in url while passing it to ssrs

i want to save/open a file in txt format other then CSV in SSRS 2005. So any one who knows how to add file extension in url that can overirde default extension in SSRS 2005..
I think you mean you want to export a report to a text file, but not CSV format? You haven't specified what other format you want, but if you want to output to a text file with a different kind of delimiter (for example Tab or | ) then you can do that by rendering the report via URL Access and overriding some of the rendering extension parameters.
For example, to export to a TAB delimited file with the extension .TXT:
http://SERVERNAME/reportserver/?%2fReportFolder%2fMyReport&rs:Format=CSV&rc:FieldDelimiter=%09&rc:Extension=TXT
As far as I can tell SSRS 2005 does not support setting these values in rsreportserver.config unfortunately. However SSRS 2008 does, which means in 2008 you can create a new rendering extension based on CSV and specify these settings. Users can then select the render format from the Export list in Report Manager, however as I mentioned 2005 does not support this so I think URL Access is your only option.
CSV Device Info settings for SSRS 2005
Report Server URL Access for SSRS 2005