convert rdl to rdlc? - sql

I am using visual studio 2008 and reporting service 2008.
I created a .rdl reports. Now I want to convert .rdl to .rdlc. How can I do it?

Good question. According to spec whey should be more or less the same, but in reality they differ wildly depending on version. For instance if I open an RDLC file I created in Visual Studio 2010 in Report Builder 3.0 it works. But if I make a change in my RDL(C) file and try to open it in VS2010 I first get asked if I want to convert it to RDLC 2008 format (yes) and then I get the error message "The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2010/01/reportdefinition' which cannot be upgraded."

There is nothing to convert. All you have to do is to rename the file to .rdlc. This converts it from a server report to a client report. The underlying schema is the same, whether it's an .rdl or .rdlc file.
Take a look at FAQ #8 here: http://www.gotreportviewer.com/

I found working with MS support that converting an RDL to RDLC merely by changing the extensions results in a ReportViewer Control HTTPHandler error which is shown with a style of "dsiplay:none". It accuses the developer of not including the HTTPHandler in the web.config, when it is actually in the web.config. Using an rdlc created by VS in that project, then the reportviewer opens just fine and properly displays. MS support and I are still researching what other changes need to be made, but as of now, I can let people know not to drink the MSDN Kool-Aid.
I also tried changing the schemas namespace in the XML file and I got the same report definition cited above.

Related

Not able to preview RDLC report in VS2013 because of blank data source instance

I have been struggling with this issue for two years now. My problems are happening in Visual Studio 2013 (not a web server).
Occasionally, I have to take an RDLC file that was created by someone else and make changes to it. Using VS, I create an XSD file for the dataset, then replace the DataSource and DataSet in the RDLC so that the report now points to the tableadapter(s) in the XSD.
Often when I try to view the report in the ReportViewer form, the Report Data Source and Data Source Instance are blank. I've tried Rebind Data Sources, and I've cleaned and rebuilt the project, but I can't get the data source to show up. Sometimes the report will have a subreport, and that data source will be available if I choose that RDLC.
I'm a third party developer -- I'm not editing (and cannot edit) aspx files; just the reports. I've tried editing the code in Form.vb manually to insert the TableAdapter, but it hasn't worked, and I don't really know what I'm doing there -- I have some object-oriented programming experience, but not much.
What can I do to make the data source available to the report viewer and/or bind it to the RDLC? Any suggestions are appreciated. Please let me know if there's any particular code it would be useful to share.
Thank you.
I ended up doing the following, which solved the problem in this case. Not sure it's a solution that will work in all situations like this.
I replaced the opening Report tag in the XML of the RDLC with this:
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
I removed the <ReportSections> and <ReportSection> tags, as they are not supported by the 2008 schema. I didn't remove anything that was between the tags.
After making these changes, the data source became available to the form, and I was able to preview the report.

XML schema for XML reports on SQL Server reporting services

This may be a newbie question, and I have done quite a lot of searching for an answer but have had no luck.
I am using SSRS on SQL Server 2008 R2 (Standard edition) to generate XML reports. I have developed my report in Report builder 3 and uploaded the report to the Report server.
So far so good
Now I want to have a subscription that generates the reports in XML format and deposits it into a folder
No problem with this straight forward enough
How do I install an XML transform or specify the actual XML schema for the rendered document as I don't want to manually handle the generated report.
In the Report Builder software there appears to be a report property where I can specify as path which would have to be to a file on my local desktop but nothing on how to supply a similar file to the reporting server to use.
How do I do this?
And I thank all of you kindly stackoverflow souls in advance for your collective wisdom.
The answer to this is Read the Manual !
However finding information through the myriad of MS pages is an excercise in Google-foo
and old fashioned primary school collage.
You upload XSL through the Report Manager UI using IE and make sure that you have a server side path specified in the DataTransform field in Report Properties in ReportBuilder 3 for your RDL file
The essential confusion that I suffered from was that I thought the XSL transform would be incorporated into the RDL file for publication to the report server. It isn't
SO
For the DataTransform property:
1 A local absolute file path with a drive letter will not work
2 Use a path that makes sense on the report server
3 Either a relative path to the XSL file from the location of the RDL file
OR an absolute path from the Report Server should be used
Angus

Editing an .rpt file

A company developed a small web interface written in VB.net to query a database and produce reports. The interface uses CrystalDecisions.Shared library. In the code, it references this:
If rbExportType.SelectedValue = "PDF" Then
Dim sda As New DB2DataAdapter(cmd)
ReportName = "Reports/R002.rpt"
rpt.Load(Server.MapPath(ReportName), CrystalDecisions.[Shared].OpenReportMethod.OpenReportByTempCopy)
sda.Fill(ds.tbl_R002)
rpt.SetDataSource(ds)
rpt.SetParameterValue(0, ddDatabase.SelectedItem.Text)
ExporttoPDF()
Else
Now, the users have asked me to add a simple field to the report, Date. I've edited the query to pull this data, but when I run the report the Date field is not shown on the report. I'm assuming that the actual .rpt file has to be edited to include this field on the report.
When trying to edit Reports/R002.rpt in a text editor, there are just numbers/symbols.
How can I edit this .rpt file? The version of Visual Studio 2010 has past it's trial.
Visual Studio has (or had) a Crystal Reports editor built in. I couldn't find it just now in my Visual Studio 2012 install, so it's possible they dropped it in favor of their own Reporting Services platform, but I might just have missed it. If you can't find the editor in your Visual Studio 2010 copy, try downloading an older version of Visual Studio.
Update:
A quick Google search indicates that it's simply distributed separately now.
Here's the VS2012 version: http://scn.sap.com/docs/DOC-35074
Here's the VS2010 version: http://scn.sap.com/docs/DOC-7824
CrystalReports is a proprietary software and wouldn't be part of the default VS package.
And yes, in order to add a field to the report, you would have to edit the report itself. Its not that big of a deal, if you have a copy of the CrystalReport software.

SQL Server Reporting Services VS rdlc and the ReportViewer

We are planning on creating reports to be run on the same computer that the database application is running on.
Can you tell me which of these is the best approach? (SQL Server Reporting Services or creating a rdlc ReportViewer report)
Also I tried to locate detailed rdlc ReportViewer report tutorials both in books and online and found none. It's probably because I'm looking in the wrong places.
We are also using VB.Net as the language.
All help will be appreciated.
In a nutshell, .rdlc is the client version. You cannot host these on the report server. These reports do not know how to fetch the data, you MUST get the data yourself and pass it to the report. For this reason, you cannot even preview the report while designing. ReportViewer.ProccessingMode = Local
The .rdl or server reports know how to fetch the data. You configure the datasource and upload them to the report server. Because of this, you can preview the reports while designing them. You can use the web/desktop ReportViewer control to run the reports from inside your app...like a proxy between your application and the report server.ReportViewer.ProccessingMode = Remote
I prefer rdl for any sql datasource, but rdlc is also good for cases where your datasource is very complex or can only be built through the application code. I think there might be ways to configure an object datasource for rdl but I haven't looked into that yet.

Where can I find documentation for RDLC xml?

I'm trying to find documentation on RDLC.
Specifically I'm looking for the different Actions in a TextBox element.
You can find the RDL specifications for the various SQL Server versions here:
SQL Server RDL Specification
On page 41, you get a list of possible actions:
Action The Action element defines a
hyperlink, bookmark link or
drillthrough action associated with a
ReportItem.
According to Got Reportviewer?, RDLC and RDL share the same format:
Q8: What is the difference between RDL
and RDLC formats?
A: RDL files are created by the SQL
Server 2008 version of Report
Designer. RDLC files are created by
the Visual Studio 2008 version of
Report Designer.
RDL and RDLC formats have the same XML
schema. However, in RDLC files, some
values (such as query text) are
allowed to be empty, which means that
they are not immediately ready to be
published to a Report Server. The
missing values can be entered by
opening the RDLC file using the SQL
Server 2008 version of Report
Designer. (You have to rename .rdlc to
.rdl first.)