SSRS 2008 R2 Correct Generation of .rsds for SharePoint - powershell

I've put together a PowerShell script to deploy some reports and corresponding datasets and datasources as well as link the embedded dataset references to the shared datasets but getting stuck at specifying the shared datasource for the shared dataset.
So initially I had to rename the .rds to .rsds for it to show up as a selectable datasource via the SharePoint UI. I'm getting an error though when I programmatically or manually via the UI set the DataSource for the DataSet saying the schema is wrong. So I've tried running the Build->Deploy from BIDS and then downloaded the .rsds to see the difference. Turns out the BIDS version which is what gets built looks like this:
<?xml....?>
<RptDataSource...>
<ConnectionProperties>
<Extension>SHAREPOINTLIST</Extension>
<ConnectionString>...my sharepoint site url...</ConnectionString>
<IntegratedSecurity>true<IntegratedSecurity>
</ConnectionProperties>
<DataSourceID>...some guid...</DataSourceID>
<RptDataSource>
whereas BIDS generates this for SharePoint when doing Build->Deploy
<?xml....?>
<DataSourceDefinition>
<Extension>SHAREPOINTLIST</Extension>
<ConnectionString>...my sharepoint site url...</ConnectionString>
<CredentialRetrieval>Integrated</CredentialRetrieval>
<Enabled>True</Enabled>
</DataSourceDefinition>
So, is there a built in way (either in BIDS or an existing PowerShell module/script) to get this generated when building locally rather than running a Deploy or am I going to have to run some xslt to transform it (Or just copy an existing source file and replace the connection string as it's the only thing that matters) and rename as a post build process?

Roighto! I found that there's a way to create a datasource via the ReportingServices2010.asmx service. Using that and ignoring the .rds written when building the project in BIDS.

Related

Find Task names of an SSIS file or Find xml code of an ssis package from sql server 2019 using T-SQL

there is a Windows Server which runs an SQL Server 2019 instance at my company. I have deployed an Integration services solution (project deployment model) with some SSIS packages. I wondered if there is any way to get data flow task names from the packages, or to get the xml file body in order to extract names by using T-SQL. If none of the above is possible i would like to know in which directory the actual dtsx files are stored in Windows Server when you deploy a solution in SQL Server. I have searched a lot for the above but i cannot find any answer.
Thanks in advance.
How is the package deployed? If it's File System, you could likely do
something like Powershell and SQL. I can't, personally, remember if
packages deployed in msdb are encrypted (I haven't used the deployment
method since 2012), however, if they are deployed via SSISDB you won't
be able to query the packages stored in the database as they are all
encrypted. You'd need to inspect the source packages (in your source
controlled project).
From a comment by #Larnu

Jasper server error when referencing a custom function

I am using JasperStudio v6.3.1 and I followed the tutorial on how to create a custom Java function that I can use in my report. Everything works fine in Jasper Studio, but when I publish the report to the Jasper Server, then it fails. The report does exist on the Server, but does not run after publishing the latest changes.
"Errors were encountered when compiling report expressions class file: 1. The method CURRENT_MONTH_BEGINNING() is undefined for the type TotalTaskHrsOnly..."
This error is generated because the custom Java functions that I made in Jasper Studio did not get published to the remote Jasper Server. I need help with getting these files onto the Jasper Server, but I'm not sure how to do that within Jasper Studio, Jasper Server, or if I need to log into the remote server, and drop the java files in there somewhere. Can someone please tell me how I can add the custom functionality onto the Jasper Server?
I worked with custom Java functions in Jasperserver reports for quite awhile. Some of the things you will need to ensure:
You import the java class at the top of the Jasper report .jrxml file
The Jar is deployed to the server and is labeled as a resource in the repository. It looks like this is the part you're getting stuck on. If you log into Jasperserver and go to the repository, you can open a folder and upload a new file/resource.
The report references the jar in the repository as a resource
Does this help?

SSRS - Credentials on reports after deploy do not match source rdl file

The project I am working on has been having the issue of stored credentials in the rdl files not being reflected on the server we deploy to and it seems to be inconsistent in its behavior. We are NOT using a shared data source because we have to generate the data source connection dynamically so each report has its own data source embedded (even though they are all identical) and it has the credentials stored. I look in VS at the rdl file and see the credentials are stored, deploy to our test server, look on the test server and the credentials are set to "Not Required". Other strange thing is this doesn't happen to all reports all the time, some reports keep their credentials but not every time. It all seems very random.
Some settings and facts about the project that may be useful:
Using SQL Server 2008 R2
Using Visual Studio 2012 to deploy
ReportProject setting OverwriteDatasets = True
ReportProject setting OverwriteDataSources = True
I have had similar issues, delete the report on the SSRS server first, then deploy the report. SSRS does retain certain attributes of report it is very inconsistent when it does this and this is more of a workaround than an answer, but it works for me.

RDL vs RDLC woes when using custom code and subreports in a local report

I'm having a rather complicated problem with SSRS.
First off, we are using Local reports. We have to because the data we are using comes from rest services.
Secondly, we have build a custom library for our reports called ReportFunctions that we want to use.
We are using sql server data tools to build the .rdl (Not to be confused with RDLC) and then we copy the file into our VS project. We set build action to Content and Copy If Newer.
This works great for all of our base reports. We can even use the custom library.
Now we want to use some of these base reports as sub reports. Let's call this report "AllReports". It consists of a "SummaryReport" and a "DetailReport".
Summary and Detail are two RDL files that also need to be loaded independently.
In the code for building AllReports, I have this:
reportViewer.LocalReport.SubreportProcessing += LocalReport_SubreportProcessing;
reportViewer.LocalReport.LoadSubreportDefinition("SummaryReport", File.OpenText(Server.MapPath("SummaryReport.rdl")));
reportViewer.LocalReport.LoadSubreportDefinition("DetailReport", File.OpenText(Server.MapPath("DetailReport.rdl")));
private void LocalReport_SubreportProcessing(object sender, SubreportProcessingEventArgs e)
{
//Set e.DataSources here depending on e.ReportPath
}
When I run SummaryReport or DetailReport, they work fine. When I run AllReports I get an error:
The subreport 'SummarySubreport' could not be found at the specified location C:\path\to\my\project\Reports\SummaryReport.rdlc. Please verify that the subreport has been published and that the name is correct.
For fun, I switched the extension of the two sub reports to .rdlc Then I get a build error when I compile in visual studio:
Error while loading code module: ‘ReportFunctions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d88351e3d4dffe2f’. Details: Could not load file or assembly 'ReportFunctions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d88351e3d4dffe2f' or one of its dependencies. The system cannot find the file specified.
DetailReport is the one that uses the external library of custom functions.
I cannot place my DLL anywhere on the server except in the bin of the project. I can't stress this enough. I also cannot move to server reports. I have to use local reports.
If I set the build action to None on the RDLC, it works, but when I deploy my RDLC is not published.
Can I get the RDLC to compile? What am I missing to make my report viewer use an RDL instead of an RDLC for my subreports?
After 11 hours of working on this problem, I discovered the build server was assigning revision numbers to all libraries when they were built. So, locally ReportFunctions would be given 1.0.0.0 as the version and everything was cool. Then when it was deployed the build server would do its thing and the reports would break.
To anyone else having this issue, check the version numbers of the compiled DLL's, especially if you are using a build process.
Also, to get around the compile issue of the RDLC, we switched the build action to None and we set up the build server to copy any RDLC files over manually once the build succeeds.

VS2005: access denied on SSRS data source

Environment: Visual Studio 2005, SSRS 2005 with Sharepoint 2007 integration
Have a project with two reports and one data source. Has already been deployed to production sharepoint farm.
Needs an enhancement. Change properties to point to test farm and try to deploy:
"Access to the path 'c:\documents and settings\\my documents....\RegLog.rds' is denied"
Path is correct, and properties of files are read-only (because the files are checked in to source control). Now, I understand that SSIS packages won't execute if they are read-only (which is stupid) but I am fairly certain I have deployed SSRS reports and data sources before without having to check them out first. On the other hand, I do know that deployment requires the file to be modified in some way. But the modified version will be in Sharepoint, not in visual studio, and its extension will be .rsds, not .rds (which is the VS name)
I also think it is unusual that the path has been lower-cased. Shouldn't matter in Windows, but it's the first time I have ever seen "documents and settings\\my documents" not all initial caps. So maybe it matters. But this project deployed before without problem.
I was having this problem as well. To fix it, I did a build of the report project (which before converting from 2005 to 2008 I'd never had to do before). Once I did that, it worked just fine.