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

Report AssemblyName Error

3 Answers 342 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Mehmet
Top achievements
Rank 1
Mehmet asked on 21 May 2014, 10:52 AM
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...

3 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 26 May 2014, 11:39 AM
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.

 
0
Mehmet
Top achievements
Rank 1
answered on 28 May 2014, 07:49 AM
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 ? 
0
Stef
Telerik team
answered on 29 May 2014, 07:50 AM
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.

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