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

Problem with rendering report in published version

2 Answers 188 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Marc
Top achievements
Rank 1
Marc asked on 07 Sep 2011, 08:39 AM
Hello.

I want to save a report as an pdf-document. Herefore I use following code:


try
{
    ReportProcessor reportProcessor = new ReportProcessor();
    RenderingResult result = reportProcessor.RenderReport("PDF", report, null);
 
    using (FileStream fs = new FileStream(fileName, FileMode.Create))
    {
        fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
    }
}
catch (Exception ex)
{
    return false;
}

This actually works on the working machine debugged with VS2010. But when I want to use this as published version on the server the following error occurs (on rendering the report):

MESSAGE:
ExtensionParameter Unit on extension type Telerik.Reporting.ExcelRendering.Excel97.ExcelReport, Telerik.Reporting, Version=5.1.11.713, Culture=neutral, PublicKeyToken=a9d7983dfcc261be can not assign the specified value. -
 Stacktrace:    bei V10Portal.Core.ScheduledJobs.SendReportJob.saveReportOnHarddisk(Report report, String fileName) in F:\V10Portal\V10Portal.Core\ScheduledJobs\SendReportJob.cs:Zeile 408.
   bei V10Portal.Core.ScheduledJobs.SendReportJob.logSaveReports(String& logErrorIn, String reportsPath, List`1 reportsToSend) in F:\V10Portal\V10Portal.Core\ScheduledJobs\SendReportJob.cs:Zeile 701.
   bei V10Portal.Core.ScheduledJobs.SendReportJob.Run() in F:\V10Portal\V10Portal.Core\ScheduledJobs\SendReportJob.cs:Zeile 186.
 
STACKTRACE:
bei Telerik.Reporting.Interfaces.Attributes.ExtensionParameterAttribute.Apply(ExtensionInfo extInfo)
   bei Telerik.Reporting.Processing.ExtensionInfo.Create(Type extensionType, String extensionName)
   bei Telerik.Reporting.Processing.ExtensionManagerBase.CreateExtensionInfo(String typeName, String extensionName)
   bei Telerik.Reporting.Processing.ExtensionManagerBase.Load(ExtensionInfoCollection extensions, IEnumerable`1 extensionTypeNames)
   bei Telerik.Reporting.Processing.ExtensionManagerBase..ctor(IEnumerable`1 extensionTypeNames, ReportingConfigurationSection section)
   bei Telerik.Reporting.Processing.ExtensionManager.get_Instance()
   bei Telerik.Reporting.Processing.ExtensionManager.ListExtensions(Type extensionType)
   bei Telerik.Reporting.Processing.ReportProcessor.GetRenderer(String name)
   bei Telerik.Reporting.Processing.ReportProcessor.RenderReport(String format, IReportDocument reportDocument, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback)
   bei Telerik.Reporting.Processing.ReportProcessor.RenderReportStateless(String format, IReportDocument reportDocument, Hashtable deviceInfo, Hashtable renderingContext, CreateStream createStreamCallback)
   bei Telerik.Reporting.Processing.ReportProcessor.RenderReport(String format, IReportDocument reportDocument, Hashtable deviceInfo)
   bei V10Portal.Core.ScheduledJobs.SendReportJob.saveReportOnHarddisk(Report report, String fileName) in F:\V10Portal\V10Portal.Core\ScheduledJobs\SendReportJob.cs:Zeile 404. -
 Stacktrace:    bei V10Portal.Core.ScheduledJobs.SendReportJob.saveReportOnHarddisk(Report report, String fileName) in F:\V10Portal\V10Portal.Core\ScheduledJobs\SendReportJob.cs:Zeile 408.
   bei V10Portal.Core.ScheduledJobs.SendReportJob.logSaveReports(String& logErrorIn, String reportsPath, List`1 reportsToSend) in F:\V10Portal\V10Portal.Core\ScheduledJobs\SendReportJob.cs:Zeile 702.
   bei V10Portal.Core.ScheduledJobs.SendReportJob.Run() in F:\V10Portal\V10Portal.Core\ScheduledJobs\SendReportJob.cs:Zeile 186.

May you have a solution or some hints for me what errors could have this exception in consequence?

Thanks.


Best regards

David

2 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 08 Sep 2011, 10:04 AM
Hello Uwe Frigger,

The error you've encountered could be caused by two things:
  1. You have a rendering extension setting in the Telerik Reporting config section in your application config file and it is not valid. More information on configuring the rendering extensions is available in the following articles:
  2. You have not deployed the application correctly. Please refer to the Deploying Applications using Telerik Reporting help section for step by step instructions.

Best wishes,
Steve
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Marc
Top achievements
Rank 1
answered on 08 Sep 2011, 02:10 PM
Thank you very much for your help.

Best Regards.
Tags
General Discussions
Asked by
Marc
Top achievements
Rank 1
Answers by
Steve
Telerik team
Marc
Top achievements
Rank 1
Share this question
or