While developing SSRS reports in Visual Studio, we are able to view the reports and then export them into Excel.
As part of our build process, I would like to automate the generation of Excel files during the Visual Studio build. [Then, I will compare the file to an approved version to ensure no regression errors have occurred.]
I would prefer not to use RS.exe, as all report developers would not have SSRS installed. I am looking for a local option, so that we don't have to deploy to an SSRS server and render from there.
How can I generate exports from the RDL files during the local build process?
One option is to create your own build tool, like a console application that has references to the Microsoft.ReportViewer.Common and Microsoft.ReportViewer.WinForms. In order to get the correct assemblies, install the Microsoft Report Viewer Controls (Redistributable Package) from:
https://msdn.microsoft.com/en-us/library/ms251723(v=vs.120).aspx
This tool could spin up an instance of a report viewer control, process the report in local processing mode, and return the excel byte stream that can be saved as a file output.
Related
I have hundreds of legacy .rpt and am trying to change the connection configuration of all of these reports.
I used Crystal Reports Developer Version for Visual Studio (2019 community edition) to create a new Windows form application project and copy all the .rpt files to the project.
In the solution explorer of VS, I see the cs code in each rpt. It looks like the code only controls the layout of report. The .rpt files don't seem to have any database connection information.
Is copying existing rpt files directly into Windows Form Application project a correct way to import existing rpt? How to import .rpt in VS correctly?
Is changing database connection of existing reports in batch possible in Crystal Reports with Visual Studio 2019 community edition?
How to change database connection of existing rpt in Crystal Reports with Visual Studio? Can it be done in code with configuration file storing database connection information?
I have no idea what language were the reports developed in. It could be VB or C#. Are existing .rpt files language agnostic so that I can manipulate them in any programming language?
Documentation for Crystal Reports Developer Version for Visual Studio seems to be very limited on the internet. Is this the official user guide? The content doesn't seem to help with my problem.
https://help.sap.com/docs/SAP_CRYSTAL_REPORTS,_DEVELOPER_VERSION_FOR_MICROSOFT_VISUAL_STUDIO?locale=en-US&version=latest
Thanks!
The design of Crystal Reports rpt files is saved in a proprietary format. It is not a programming language.
You can programmatically run these reports and/or modify their design using code via the object model (e.g. Crystal for Visual Studio).
What you are trying to do is possible but rather complex. Given that you have no experience with this, consider using one of the 3rd-party Crystal Reports tools that provide mass-update functionality.
Yes, Ken Hamady maintains a list of such tools here.
While that list contains 10 utilities, most of them are limited to documenting report properties. So focus your attention on those that can update data sources.
Disclosure: I'm the developer of the Visual CUT utility. Here is a video demo of mass-updating data sources across multiple reports using that utility:
So we have a unique situation. I have 2300+ RDLs that we have in TFS that our team works on. These are deployed to 100+ different folders on the SSRS Server, and must stay that way as each folder is secured with it's own AD Group so users can't see each others folders/reports.
The problem with Visual Studio is that each folder has to be it's own project to manage the RDLs in Visual Studio. So my workaround is that I have a project in VS but then made my own folder with all of these RDL's and their own subfolder via Source Code Explorer. So when I try to edit the rdl with Visual studio it just opens it as xml and not the report designer. My work-around is that we associate the .rdl file with Report Builder, but I'd rather just use Visual Studio.
Any way to get VS to open the report designer this way? I am only interested in editing the rdl's this way, not using VS To deploy the reports.
You could try VS extension Microsoft Reporting Services Projects, which can be downloaded from website below:
https://marketplace.visualstudio.com/items?itemName=ProBITools.MicrosoftReportProjectsforVisualStudio
Or try the solution in case How to open .rdl file in visual studio :
In order to see a designer you need to give Visual Studio a bit of
context about what sort of file it is by making it part of a Report
Server Project.
Install SSDT for Visual Studio if you haven't already done so
Create a new project using the 'Report Server Project' template
Copy/move the .rdl file(s) you have into the folder for the newly created project (eg ..\Visual Studio 2015\Projects\My Report
Project\My Report Project)
Use the "Add Existing Item..." context menu option in Solution Explorer to add the .rdl to the project
Open report designer by double-clicking the newly added report project item(s)
There is one tool available in market IDSNext-Gen. The company name is Agnisys Inc.
This is an extremely vague question because I don't know enough to know what I don't know. Here's my situation:
I have downloaded SSDT and connected to a data source (A SQL Server DB instance). I've created a report. I can preview the report in VS. I can publish the report from the VS build menu and it gets published to my local reports server that seems to have been installed by default at http://localhost/reports. I can use a browser to go to that url and see the report I created.
Now, the problem is that this is all only in my local development environment. I installed SSDT through Visual Studio and it auto-created my reports server. Is there a way to install a reports server without installing visual studio and publish the reports from a report solution using an MSI created by a packager like WiX? I'm having a hard time finding information about how to do this.
The report server is typically installed when you install SQL Server. If you want to publish reports so that others can use them do the following:
Go to your VS solution and right-click on the project then select properties.
Set the TargetReportFolder (this will be created if it does not
exist). This will usually reflect the name of the group of reports
you are working on (e.g. 'HR Reports')
Set the TargetServerURL to the report server on your SQL Server box for example http://mySQLServerBox/reportserver/
Set the TargetServerVersion to match your SQL Server installation version (SQL Server 2016 etc)
Now you can simply right-click a report rdl in VS and choose deploy, you can also do the same at the folder level to deploy all the reports in one go.
To access the reports, go to the web portal which will usually be http://MySQLServerBox/reports
I hope this is what you are looking for..
The standard method of implementing a Reporting Services report template is to create an .RDL (report file) and place it in the Visual Studio Report Project template folder at C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject
Since this is a purely local approach, is there a way to implement a shared and source controlled template that can be used from the new item menu?
Our current solution for this issue is to store our templates in our report solution, and copy/paste them for new reports. Just wondering if there's a better alternative.
You need to create this as a .vsix extension and then share it. If you update the package and version all Visual Studio instanced that have it installed will prompt the user to update.
How to: https://blogs.msdn.microsoft.com/vsx/2014/06/10/creating-a-vsix-deployable-project-or-item-template-with-custom-wizard-support/
Although you can setup your own repo to load it from, It's much easyer to use http://marketplace.visualstudio.com for distribution.
I just created a Report Project with 1 .rdl in Visual Studio 2008. I then deployed the report to the SSRS Server and I can now see the report in the Report manager.
I made a change to the report using report builder 3.0.
Is there a way that I can "get latest version" from the report server of the .rdl when I open my report project in Visual Studio again?
I am guessing that 1 way would be to download the .rdl and add back (overwriting) to the report project but I am wondering if VS has a built in function to take care of this for you?
There is no built in functionality in VS to attach to an SSRS instance and pull down the .rdl files. Since they can be moved, edited and deleted, outside of the designer there could be numerous issues with doing that. Just check all your local project files into source control and manually update if needed. Since I don't edit outside of VS I never had to deal with "pulling the latest version from ssrs". However, I have come across third party tools that may have functionality to make it easier.
If this is going to become a daily struggle for you then you may want to take the time now to automate the process using the ReportExecution2010 or ReportExecution2005 web service api.
Visual Studio is used to create and deploy reports, once they are deployed, there are no links between the report in Visual Studio and the Report Server, and there will never be. Think about it, you can deploy the report to X servers, so how could Visual Studio find which report you are talking about.
To ensure you are working on the latest version, you will have to download it and overwrite as you say, although I would compare it instead to see if there are changes not deployed.
If you are working with other developers that would potentially redeploy the report, then you can just check the last modification user of the report.
In all cases, I would strongly suggest to always check-in/commit when you deploy a report.
If you want to download several reports from the report server, then you could use a tool like RSScripter for example.