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

Telerik Report types

4 Answers 873 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
PrimePay
Top achievements
Rank 1
PrimePay asked on 15 Aug 2016, 05:35 PM

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?

Thanks.

4 Answers, 1 is accepted

Sort by
0
Katia
Telerik team
answered on 16 Aug 2016, 01:45 PM
Hi,

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:

Report templates are available in both Designers (Report Wizards) Standalone Designer you can also design and save your custom templates (Report Templates).


I hope this information will help.

Regards,
Katia
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Rod
Top achievements
Rank 1
answered on 13 Aug 2018, 06:15 AM
I require Telerik Reporting via C# CLass Library that is COM enabled to print reports using *.trdp files.

Among your examples.....

1)____________________________________________
https://docs.telerik.com/reporting/t-telerik-reporting-typereportsource
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"));

2)____________________________________________
https://docs.telerik.com/reporting/m-telerik-reporting-processing-reportprocessor-printreport
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";
reportProcessor.PrintReport(typeReportSource, printerSettings);

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?
0
Silviya
Telerik team
answered on 15 Aug 2018, 08:50 AM
Hello Rod,

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 :
var uriReportSource = new Telerik.Reporting.UriReportSource();
 
// Specifying an URL or a file path
uriReportSource.Uri = "SampleReport.trdp";
 
// Adding the initial parameter values
uriReportSource.Parameters.Add(new Telerik.Reporting.Parameter("OrderNumber", "SO43659"));

About the printing, the same approach applies:
// Obtain the settings of the default printer
System.Drawing.Printing.PrinterSettings printerSettings
    = new System.Drawing.Printing.PrinterSettings();
 
// The standard print controller comes with no UI
System.Drawing.Printing.PrintController standardPrintController =
    new System.Drawing.Printing.StandardPrintController();
 
// Print the report using the custom print controller
Telerik.Reporting.Processing.ReportProcessor reportProcessor
    = new Telerik.Reporting.Processing.ReportProcessor();
 
reportProcessor.PrintController = standardPrintController;
 
Telerik.Reporting.UriReportSource uriReportSource =
    new Telerik.Reporting.UriReportSource();
 
// Specifying an URL or a file path
uriReportSource.Uri = "SampleReport.trdp";
 
// Adding the initial parameter values
uriReportSource.Parameters.Add(new Telerik.Reporting.Parameter("OrderNumber", "SO43659"));
 
reportProcessor.PrintReport(uriReportSource, printerSettings);

Regards,
Silviya
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Rod
Top achievements
Rank 1
answered on 17 Aug 2018, 12:48 AM
Thanks Silviya. Perfect!
Tags
General Discussions
Asked by
PrimePay
Top achievements
Rank 1
Answers by
Katia
Telerik team
Rod
Top achievements
Rank 1
Silviya
Telerik team
Share this question
or