This is a migrated thread and some comments may be shown as answers.

Converting .trdx to .cs

3 Answers 825 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Randy
Top achievements
Rank 1
Randy asked on 09 May 2014, 08:53 PM
So I have reports that are generated with the standalone report generator, I'm wondering if it is possible to convert them to .cs files (as if they were generated with the integrated tool instead). If this still isn't possible then I'm curious if there is an easy way to have the Report Manager find .trdx files so that it can be loaded with the report catalog that came with the example package.

I know how to show the reports on the client individually, but I can't figure out how to show both types of files in a consolidated reports catalog. Ideally I'd like it if the report catalog found .trdx reports and .cs reports and make the end user unaware of the fact that they are stored differently.

3 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 10 May 2014, 08:49 AM
Hi Randy,

Currently, there is no option to import TRDX files in Visual Studio. For now we support only import of VS reports into the Standalone Designer.

You can still deserialize the reports in Telerik.Reporting.Report objects and enlist them in a catalog with the available reports, by using a similar to ours ReportManager implementation (the one from our local examples installed by default under C:\Program Files (x86)\Telerik\Reporting Q1 2014\Examples\CSharp\ReportLibrary). To unify the work with the manager, it can returns the deserialized report object of TRDX files or an instance of a report created in Visual Studio.

I hope the above information helps you.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Randy
Top achievements
Rank 1
answered on 19 May 2014, 08:53 PM
I appreciate the answer, however I don't completely understand how to go about doing this. Could you give an example of adding the .TRDX files (or at least their contents) to the report catalog?
0
Accepted
Stef
Telerik team
answered on 22 May 2014, 05:44 PM
Hello Randy,

Ideally, you can serialize all reports in XML format and return a collection of their paths on the server, which can be directly used with an UriReportSource and set for the navigate to report action in the ReportCatalog.


If not, the approaches are to gather the information for all existing reports in a collection and use an user function and a binding to the TextBox.Action property. The user function would return a NavigateToReportAction.

For example, the ReportManager gets the current assembly and extracts all types from it. Then it checks if each type is actually a Telerik.Reporting.IReportDocument. If yes, there is created a ReportInfo object for that type. Note the ReportInfo class has a property AssemblyQualifiedName, which gets the assembly qualified name of the stored type.
This ReportInfo can be extended with a property, which stores the paths of TRDX files, retrieved by searching the reports project's directory. And another one pointing the report format.
Also the ReportInfo can be extended with a property that return a Telerik.Reporting.Report - the deserialized TRDX file or an instance of the type.

Then in the user function, you can use these fields to determine what type of report source to be created and assign it to the NavigateToReportAction.


There are many approaches to create a library with mixed report formats and you have to consider yours with your custom requirements.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Report Designer (standalone)
Asked by
Randy
Top achievements
Rank 1
Answers by
Stef
Telerik team
Randy
Top achievements
Rank 1
Share this question
or