Report AssemblyName Error

4 posts, 0 answers
  1. Mehmet
    Mehmet avatar
    3 posts
    Member since:
    May 2014

    Posted 21 May 2014 Link to this post

    I new user on Telerik. I want save my pdf report on server. I want when user click save button report save on server a folder. 
    My function is:

     public void SaveReport(string fileName="aaaa")
            {
                Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
                System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
                deviceInfo.Add("DocumentAuthor", "Umut Güncan");
                deviceInfo.Add("DocumentTitle", "İlkPdfKaydı");
                deviceInfo["OutputFormat"] = "JPEG";

                Telerik.Reporting.TypeReportSource typeReportSource = new Telerik.Reporting.TypeReportSource();
                // reportName is the Assembly Qualified Name of the report
                typeReportSource.TypeName = "Telerik.Reporting.Examples.CSharp.Invoice, CSharp.ReportLibrary";
                Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("ddfe.PDF", typeReportSource, deviceInfo);
                
                fileName = result.DocumentName + "." + result.Extension;
                string path = @"d:\rpr\";
                string filePath = System.IO.Path.Combine(path, fileName);

                using (System.IO.FileStream fs = new System.IO.FileStream(filePath, System.IO.FileMode.Create))
                {
                    fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
                }
            }

    How can I define assembly name? Reagards...
  2. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 26 May 2014 Link to this post

    Hello Mehmet,

    Details how to export a report document using the ReportProcessor are available in the Exporting Report Programmatically help article. The full list of device settings for the PDF renderer can be found here.

    About specifying which report to be processed, in the example is used the assembly qualified name of the report object (<namespace>.<report_name>, <assembly_name>). Using this name, the reporting enigine creates an instance of the report by using its default constructor. You can use any of the existing report source types to specify the report as well.

    I hope this 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.

     
  3. DevCraft banner
  4. Mehmet
    Mehmet avatar
    3 posts
    Member since:
    May 2014

    Posted 28 May 2014 in reply to Stef Link to this post

    Hi, 
    My project name is StandAloneReportServer, and the folder which contains .trdx files is Reports and the TRDX file which i want to render is Incoive.trdx. and trying to set assembly name as below 
                typeReportSource.TypeName = "StandAloneReportServer.Reports.Invoice, Csharp.ReportLibrary";

    But still failed. Could you please help[ me ? 
  5. Stef
    Admin
    Stef avatar
    3036 posts

    Posted 29 May 2014 Link to this post

    Hi Mehmet,

    TRDX files can be used with the following report sources:
    Finally, use the create report source object with the ReportProcessor.

    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.

     
Back to Top