We are evaluating whether we can use Telerik reporting as our reporting platform going forward. In working with reports and the report designer, we've run across questions between the two report file types (.trdp and .cs files). The questions we have are:
- If we are starting to create our reports today, which is the "preferred" type to use?
- Can Telerik Reporting Server handle .cs files?
- Is there a way to convert between the two types (either way)? If so, can you link documentation as we are unable to find it.
- What are the differences between the file types? And what are the intended use cases?
- Do they both support templates - both code and/or styling?
4 Answers, 1 is accepted
TRDP reports are XML report definitions packaged in a zip archive (could be also plain legacy format TRDX). Those report can be opened with Standalone Report Designer which is desktop application we provide for end-users.
.NET type report definitions (.CS or .VB files) are created by Visual Studio Report Designer.
Only TRDP(TRDX)format can be stored on Telerik Report Server.
The main differences between those two formats are also described in this help article.
The conversion is possible both ways:
- How Import reports created with the VS Report Designer
- How to: Import reports created with Standalone Report Designer
Telerik by Progress
Among your examples.....
var typeReportSource = new Telerik.Reporting.TypeReportSource();
// Specifying the assembly qualified name of the Report class for the TypeName of the report source
typeReportSource.TypeName = typeof(Invoice).AssemblyQualifiedName;
// Adding the initial parameter values
typeReportSource.Parameters.Add(new Telerik.Reporting.Parameter("OrderNumber", "SO43659"));
PrinterSettings printerSettings = new PrinterSettings();
PrintController standardPrintController = new StandardPrintController();
ReportProcessor reportProcessor = new ReportProcessor();
reportProcessor.PrintController = standardPrintController;
TypeReportSource typeReportSource = new TypeReportSource();
typeReportSource.TypeName = "Telerik.Reporting.Examples.CSharp.Dashboard, CSharp.ReportLibrary";
Neither of these shed any light on how to print a report using a *.trdp file.
How do I create a TypeReportSource for a *trdp report file?
To show a report created with the Standalone Report Designer (TRDP/TRDX reports), you will have to use UriReportSource and a path to the report's file instead of TypeReportSource (.cs reports created with Visual Studio Designer). For example :
About the printing, the same approach applies: