Telerik Report types

5 posts, 0 answers
  1. PrimePay
    PrimePay avatar
    25 posts
    Member since:
    Feb 2015

    Posted 15 Aug 2016 Link to this post

    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.

  2. Katia
    Admin
    Katia avatar
    693 posts

    Posted 16 Aug 2016 Link to this post

    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) where in 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
  3. Rod
    Rod avatar
    4 posts
    Member since:
    May 2014

    Posted 13 Aug in reply to Katia Link to this post

    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?
  4. Silviya
    Admin
    Silviya avatar
    214 posts

    Posted 15 Aug Link to this post

    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
  5. Rod
    Rod avatar
    4 posts
    Member since:
    May 2014

    Posted 16 Aug in reply to Silviya Link to this post

    Thanks Silviya. Perfect!
Back to Top