Insert report into ReportServer via TSQL - reporting-services

As far as i understand SSRS are just databases "ReportServer & ReportServerTempDB"
So Is it possible to insert a report into the ReportServer.Catalog using a insert query. (note that the Content image is shortened for demonstration purposes)
INSERT [dbo].[Catalog]
([ItemID], [Path], [Name], [ParentID], [Type], [Content], [Property], [CreatedByID], [CreationDate],
[ModifiedByID], [ModifiedDate], [Parameter], [PolicyID],PolicyRoot,ExecutionFlag)
VALUES
(N'7dd2ae9e-063d-421c-a596-1995f97caea5', N'/LsnReports/Monitoring/tst001', N'tst001',
N'db29a5c2-9738-4143-ad90-392aa6f26aa3', 2,
0xEFBBBF3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D227574662D38223F3E0D0A3C5265706F727420786D6C6E733A72643D22687474703A2F2F736368656D61732E6D6963726F736F66742E636F6D2F53514C5365727665722F7265706F7274696E672F7265706F727464657369676E65722220786D6C6E733A636C3D22687474703A2F2F736368656D61732E6D6963726F736F66742E636F6D2F73716C7365727665722F7265706F7274696E672F323031302F30312F636F6D706F6E656E74646566696E6974696F6E2220786D6C6E733D22687474703A2F2F736368656D61732E6D6963726F736F66742E636F6D2F73716C7365727665722F7265706F7274696E672F323031302F30312F7265706F7274646566696E6974696F6E223E0D0A20203C4175746F526566726573683E303C2F4175746F526566726573683E0D0A20203C5265706F727453656374696F6E733E0D0A202020203C5265706F727453656374696F6E3E0D0A2020202020203C426F64793E0D0A20202020202020203C5265706F72744974656D733E0D0A202020202020202020203C54657874626F78204E616D653D225265706F72745469746C65223E0D0A2020202020202020202020203C43616E47726F773E747275653C2F43616E47726F773E0D0A2020202020202020202020203C4B656570546F6765746865723E747275653C2F4B656570546F6765746865723E0D0A2020202020202020202020203C506172616772617068733E0D0A20202020202020202020202020203C5061726167726170683E0D0A202020202020202020202020202020203C5465787452756E733E0D0A2020202020202020202020202020202020203C5465787452756E3E0D0A20202020202020202020202020202020202020203C56616C75653E5468697320697320612074657374207265706F72743C2F56616C75653E0D0A20202020202020202020202020202020202020203C5374796C653E0D0A202020202020202020202020202020202020202020203C466F6E7446616D696C793E56657264616E613C2F466F6E7446616D696C793E0D0A202020202020202020202020202020202020202020203C466F6E7453697A653E323070743C2F466F6E7453697A653E0D0A20202020202020202020202020202020202020203C2F5374796C653E0D0A2020202020202020202020202020202020203C2F5465787452756E3E0D0A202020202020202020202020202020203C2F5465787452756E733E0D0A202020202020202020202020202020203C5374796C65202F3E0D0A20202020202020202020202020203C2F5061726167726170683E0D0A2020202020202020202020203C2F506172616772617068733E0D0A2020202020202020202020203C72643A57617465726D61726B54657874626F783E5469746C653C2F72643A57617465726D61726B54657874626F783E0D0A2020202020202020202020203C72643A44656661756C744E616D653E5265706F72745469746C653C2F72643A44656661756C744E616D653E0D0A2020202020202020202020203C546F703E306D6D3C2F546F703E0D0A2020202020202020202020203C4865696768743E31302E31366D6D3C2F4865696768743E0D0A2020202020202020202020203C57696474683E3133392E376D6D3C2F57696474683E0D0A2020202020202020202020203C5374796C653E0D0A20202020202020202020202020203C426F726465723E0D0A202020202020202020202020202020203C5374796C653E4E6F6E653C2F5374796C653E0D0A20202020202020202020202020203C2F426F726465723E0D0A20202020202020202020202020203C50616464696E674C6566743E3270743C2F50616464696E674C6566743E0D0A20202020202020202020202020203C50616464696E6752696768743E3270743C2F50616464696E6752696768743E0D0A20202020202020202020202020203C50616464696E67546F703E3270743C2F50616464696E67546F703E0D0A20202020202020202020202020203C50616464696E67426F74746F6D3E3270743C2F50616464696E67426F74746F6D3E0D0A2020202020202020202020203C2F5374796C653E0D0A202020202020202020203C2F54657874626F783E0D0A20202020202020203C2F5265706F72744974656D733E0D0A20202020202020203C4865696768743E37302E36303537356D6D3C2F4865696768743E0D0A20202020202020203C5374796C653E0D0A202020202020202020203C426F726465723E0D0A2020202020202020202020203C5374796C653E4E6F6E653C2F5374796C653E0D0A202020202020202020203C2F426F726465723E0D0A20202020202020203C2F5374796C653E0D0A2020202020203C2F426F64793E0D0A2020202020203C57696474683E3135322E346D6D3C2F57696474683E0D0A2020202020203C506167653E0D0A20202020202020203C50616765466F6F7465723E0D0A202020202020202020203C4865696768743E31312E34336D6D3C2F4865696768743E0D0A202020202020202020203C5072696E744F6E4669727374506167653E747275653C2F5072696E744F6E4669727374506167653E0D0A202020202020202020203C5072696E744F6E4C617374506167653E747275653C2F5072696E744F6E4C617374506167653E0D0A202020202020202020203C5265706F72744974656D733E0D0A2020202020202020202020203C54657874626F78204E616D653D22457865637574696F6E54696D65223E0D0A20202020202020202020202020203C43616E47726F773E747275653C2F43616E47726F773E0D0A20202020202020202020202020203C4B656570546F6765746865723E747275653C2F4B656570546F6765746865723E0D0A20202020202020202020202020203C506172616772617068733E0D0A202020202020202020202020202020203C5061726167726170683E0D0A2020202020202020202020202020202020203C5465787452756E733E0D0A20202020202020202020202020202020202020203C5465787452756E3E0D0A202020202020202020202020202020202020202020203C56616C75653E3D476C6F62616C7321457865637574696F6E54696D653C2F56616C75653E0D0A202020202020202020202020202020202020202020203C5374796C65202F3E0D0A20202020202020202020202020202020202020203C2F5465787452756E3E0D0A2020202020202020202020202020202020203C2F5465787452756E733E0D0A2020202020202020202020202020202020203C5374796C653E0D0A20202020202020202020202020202020202020203C54657874416C69676E3E52696768743C2F54657874416C69676E3E0D0A2020202020202020202020202020202020203C2F5374796C653E0D0A202020202020202020202020202020203C2F5061726167726170683E0D0A20202020202020202020202020203C2F506172616772617068733E0D0A20202020202020202020202020203C72643A44656661756C744E616D653E457865637574696F6E54696D653C2F72643A44656661756C744E616D653E0D0A20202020202020202020202020203C546F703E352E30386D6D3C2F546F703E0D0A20202020202020202020202020203C4C6566743E3130312E366D6D3C2F4C6566743E0D0A20202020202020202020202020203C4865696768743E362E33356D6D3C2F4865696768743E0D0A20202020202020202020202020203C57696474683E35302E386D6D3C2F57696474683E0D0A20202020202020202020202020203C5374796C653E0D0A202020202020202020202020202020203C426F726465723E0D0A2020202020202020202020202020202020203C5374796C653E4E6F6E653C2F5374796C653E0D0A202020202020202020202020202020203C2F426F726465723E0D0A202020202020202020202020202020203C50616464696E674C6566743E3270743C2F50616464696E674C6566743E0D0A202020202020202020202020202020203C50616464696E6752696768743E3270743C2F50616464696E6752696768743E0D0A202020202020202020202020202020203C50616464696E67546F703E3270743C2F50616464696E67546F703E0D0A202020202020202020202020202020203C50616464696E67426F74746F6D3E3270743C2F50616464696E67426F74746F6D3E0D0A20202020202020202020202020203C2F5374796C653E0D0A2020202020202020202020203C2F54657874626F783E0D0A202020202020202020203C2F5265706F72744974656D733E0D0A202020202020202020203C5374796C653E0D0A2020202020202020202020203C426F726465723E0D0A20202020202020202020202020203C5374796C653E4E6F6E653C2F5374796C653E0D0A2020202020202020202020203C2F426F726465723E0D0A202020202020202020203C2F5374796C653E0D0A20202020202020203C2F50616765466F6F7465723E0D0A20202020202020203C506167654865696768743E32392E37636D3C2F506167654865696768743E0D0A20202020202020203C5061676557696474683E3231636D3C2F5061676557696474683E0D0A20202020202020203C4C6566744D617267696E3E32636D3C2F4C6566744D617267696E3E0D0A20202020202020203C52696768744D617267696E3E32636D3C2F52696768744D617267696E3E0D0A20202020202020203C546F704D617267696E3E32636D3C2F546F704D617267696E3E0D0A20202020202020203C426F74746F6D4D617267696E3E32636D3C2F426F74746F6D4D617267696E3E0D0A20202020202020203C436F6C756D6E53706163696E673E302E3133636D3C2F436F6C756D6E53706163696E673E0D0A20202020202020203C5374796C65202F3E0D0A2020202020203C2F506167653E0D0A202020203C2F5265706F727453656374696F6E3E0D0A20203C2F5265706F727453656374696F6E733E0D0A20203C72643A5265706F7274556E6974547970653E4D6D3C2F72643A5265706F7274556E6974547970653E0D0A20203C72643A5265706F727449443E37653537343362392D383630362D346137352D393834612D3736373834653437393565363C2F72643A5265706F727449443E0D0A3C2F5265706F72743E,
N'<Properties>
<Language>en-US</Language>
<HasUserProfileQueryDependencies>False</HasUserProfileQueryDependencies>
<HasUserProfileReportDependencies>False</HasUserProfileReportDependencies>
<PageHeight>297.000007629395</PageHeight>
<PageWidth>210</PageWidth>
<TopMargin>20</TopMargin>
<BottomMargin>20</BottomMargin>
<LeftMargin>20</LeftMargin>
<RightMargin>20</RightMargin>
</Properties>',
N'e3ce88b0-16a2-4111-abf9-96d6866f513a',
CAST(0x0000A55A0069B25C AS DateTime),
N'e3ce88b0-16a2-4111-abf9-96d6866f513a',
CAST(0x0000A55A0069B25C AS DateTime),
N'<Parameters>
<UserProfileState>0</UserProfileState>
</Parameters>',
N'be91f173-be6a-48b7-940a-0ed79476b6c1',0,1)
I did try a simple report without datasources and datasets, but i get the following error in Report Manager.
"An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help For more information about this error navigate to the report server on the local server machine, or enable remote errors"
I need to create an update to SSRS for just over 50 individual sites... Is this at all possible?

If you need to deploy or change something on a group of servers you should script it using the rs.exe utility provided with Reporting Services. This utility allows you to administer a Report Server (including uploading content) using "rss" scripts written in Visual Basic that interact with the SSRS API.
Microsoft provide a very comprehensive example which is probably overkill for your needs but there are plenty of other rss examples available on the web.
I would not recommend trying to upload content (or any other SSRS change) by directly modifying the ReportServer database, you could easily end up with a report server in a non-functioning state.

Related

SSRS 2017 Subscription can't be created or edited because the credentials used to run the report are not stored

I have an ssrs server that is not allowing me to create subscriptions for some reports. There are 20+ reports in a folder which all use the same data source: /Data Sources/MyDataSource. The credentials are stored in the data source. I can add subscriptions to most of the reports, but there are a few which throw the following error:
An Error Has Occurred:
Subscription can't be created or edited because
the credentials used to run the report are not stored, or if a linked
report, the link is no longer valid.
I have tried deleting the report and re-uploading them, deploying the whole bit from the project and adding another data source with the same stored credentials. However, I still get the same warning triangle on the subscription button. There are a batch of new reports I have added, some have this issue and others do not. Restarting the SSRS service did not help.
Any other ideas for troubleshooting this?
Bonkers! Looks like the issue was a case sensitivity one. In the project, all of the reports referred to a shared data source. However, sometimes the reference to the shared data source was spelled "mySharedDataSource" instead of "MySharedDataSource"
I found a hint of this in the logs, which complained about the first version of the spelling which did not exist on the report server. Fixing that and deploying the report corrected the issue and now I can create subscriptions.
Might be a 2017 thing, I have these reports both on a 2016 and 2019 instance and they have not complained.

Adding SSRS report through CRM2016: Prefiltering doesn't work?

I've created a custom Reporting Services report from within Visual Studio that is intended to use automatic prefiltering as described here.
So, I've created my query as follows:
select fullname, createdbyname, createdon
from FilteredContact as CRMAF_FilteredContact
order by createdon desc
However, once I add a new Report in CRM based on the report's .rdl file (as described under "Deploying the Report" here) it adds the report fine, but two things happen:
1) The shared data source for this report is initally invalid, both CRM and SSRS refuse to render it with the error:
"The report server cannot process the report or shared dataset. The shared data source 'MyOrg_MSCRM' for the report server or SharePoint site is not valid. Browse to the server or site and select a shared data source. (rsInvalidDataSourceReference)"
I have to manually set the DataSource from within SSRS to /MyOrg_MSCRM/CustomReports/MSCRM_DataSource to get it to work.
2) The report doesn't appear under "Run on Selected records" but under "Run on All Records", and doesn't perform any prefiltering.
Also, when I download the .rdl from SSRS it hasn't modified it, neither adding an extra parameter or changing the SQL query. as I would have expected based on this information.
What could I be doing wrong?
I'm using MS CRM 2016 update 1 (v8.1.0.359) on premise, with SQL Server 2014 Reporting Services and the SRS Data Connector installed on the same machine.
Apparently, you can use a shared data source reference, but you have to name it MSCRM_DataSource, just as the Data Source that MSCRM uses for its reports.
If you upload a Report in MSCRM like this, MSCRM recognizes this and automatically updates the data source to the valid /MyOrg_MSCRM/CustomReports/MSCRM_DataSource datasource, and also adds the prefiltering modifications.
You've created a Shared Data Source that you are using for multiple reports. When uploading reports through CRM this is not supported. Each report must have its own connection details embedded in the report.
I think the reason for this is, as you are trying to do, the report gets modified to add hidden CRM parameters and to alter the queries so that pre-filtering can take place.
To fix this, you have to modify each report and enter the Connection Details directly into the report rather than using a Shared Connection. Its a little annoying but should give you the results you are expecting to see

Can't deploy a report to SpagoBI Server

I'm trying to deploy a report from SpagoBIStudio 5.2.0 on a SpagoBI Server v5.1.0.
The report works perfectly in SpagoBIStudio (locally in my computer), and I successfully created the data source and the data sets using the web interface of SpagoBI Server.
Nevertheless when I click on the "Deploy" option of my ".rptdesign" file, I see the following dialog and the "Finish" button is always disabled.
For some reason I can select the correct Datasource but the Dataset dropdown list is empty and disabled. I guess this could be the problem.
The data source is a JDBC-Hive connection to Cosmos and the Datasets are defined as HQL queries in both Studio and Server.
Does anybody know why the datasets aren't listed in the deploy document wizard of SpagoBIStudio?
Thanks in advance.
you cannot finish the deploy not because of dataset but because you did not select any functionality on the tree on the right.
You don't have any functionality on server where to store your document, so you should go to server with and administrator user role,
then with the menu on the right, on the profile section, select the "functionalities management" menu and create a folder that is child of the root. Give it the permissions you need
After this operation try again the deploy and you should be able to select one funcitonality and so have finish button enabled
greetings
the dataset selection is disabled because a Birt Report is not linked to dataset that way.
There are two ways of using datasets in Birt:
- Birt embedded datasets, that can be of several types provided by Birt (SpagoBI has no role with that)
- SpagoBIServer type dataset; these are linked to SpagoBIDataset by providing label, but this association is written inside template, during template definition.
Hope this fix your problem, I would suggest you also to take a look at SpagoBI wiki page for further informations
greetings
Giulio
You don't have to select the dataset. Your finish button is not enabled because you haven't select the path from the functionalities tab. After selecting it will be enabled and your report will be deployed. After deployment you need to create Analytical drivers for the parameters through which your report will run.
NOTE: You must have a Active server configured under resources under SpagoBI project folder.

Unbale to preview the Report in Visual studio SSRS

I have created the custom data source Provider. I have edited the config file RSReportDesigner.config and RSPreviewPolicy.config. I am able to see my custom data source provider in data source list while creating the data source in SSRS (Visual Studio). While creating dataset, iam able to execute query and get data.
But, when i try to preview the report it display following error: An attempt has been made to use Data Extension 'CUSTOM_DATASOURCE' that is either not registered for this report server or is not supported in this edition of Reporting Services
See: https://support.microsoft.com/en-us/kb/2750044
and as the article instructs, be sure to also add the same xml snippet provided as the solution in the article, to the PreviewProcessingService.exe.config file that is located in %Program Files%\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies folder.
This file does not have existing entries like the devenv.exe.config, but you will see an <assemblyBinding> </assemblyBinding>section and you can insert the xml from the article between these tags.
You may have to relaunch SQL Data Tools for the changes to take affect.
Are you using Sql Server Express? Express doesn't support the full feature set of Reporting Services. There is a list of the unsupported features on MSDN, one of which is:
The Reporting Services API extensible platform for delivery, data processing, rendering, and security is not supported

Report Builder 3.0 - Dataset Credentials Do Not Work

I am using SSRS 2008 R2 and Report Builder 3.0. I set up a shared data source via the browser (http://myserver/reports/) wherein the "credentials are stored securely in the report server" to use with multiple reports. Testing the connection via the browser works.
Now, I fire up Report Builder 3.0. I start a new report and "Add Data Source". I select the "Use a shared connection", browse to the server, and select the above data source. Click "Test Connection" and all is well.
I then try to "Add Dataset". In the dialog, I select "Use a dataset embedded in my report", I select my data source added above, type in the SQL string and click OK. The "Enter Data Source Credentials" appears. No matter what permutation of valid domain (like the domain admin account and others) or SQL Server (like the 'sa' account) credentials plus checkboxes I use, I get an "Unable to connect to data source".
Security settings on the shared data source allow BUILTIN\administrators and domain\administrator all roles. The data source does work, as some legacy migrated reports run fine. Report Builder says the data source connects okay. But, I cannot create new reports, nor modify existing ones.
Any suggestions?
After much gnashing and wailing seems like Report Builder uses information in definitions in Report Server to then run queries locally by itself, and not through Reporting Services.
My mistaken belief was that when I did something like Refresh Fields when setting up a Dataset, Report Builder was going through Report Services to get the relevant output and/or metadata. This seems to not be the case.
I had defined the connection string of the shared data source as Data Source=(local);Initial Catalog=<database name>. Now, this works when you are in Reporting Services' browser interface, but Report Builder seems to read the connection string and use it for itself. Reporting Services on my local development machine does not have any of the setup on the target server running these reports, so anything I would use will fail.
Changing the connection string to Data Source=<server name>;Initial Catalog=<database name>, instead of localhost, allowed Report Builder to work properly. (RB still popped up "Enter Data Source Credentials". I used my Windows credentials, which is a valid login on the target server.)
To accomplish what you are attempting, it sounds like you will need to use windows integrated security.
According to MSDN stored credentials are not passed to client applications. They are for use only by the report server for things like scheduled reports.
http://msdn.microsoft.com/en-us/library/ms159736.aspx
I can tell you that the prompt "Enter Data Source Credentials" is looking for SQL authentication, not domain accounts.
Outstanding question and answer. I really appreciate your careful description. I had the same problem. In my case the problem was that I was accessing Report Builder from a machine connected to my home office by VPN. I guess because I was outside of the Windows network of the home office, RB couldn't authenticate me. Working with a Remote Desktop connected to a machine at the office allowed me to side-step the problem. Your and #RichShealer's answers reminded me that when running the reports from the browser, they're being served up by an inside server machine. This is not the case when running RB, a desktop app.