Telerik.Reporting.Report TelSubrpt = new TelSubRptContract();((TelSubRptContract)TelSubrpt).UOM = "GAL";((TelSubRptContract)TelSubrpt).RinsPrice = RinsPrice;TelSubrpt.DataSource = dtLocations;this.TelSubRptLocations.Report = TelSubrpt;txtQty.Value = Convert.ToDouble(txtQty.Value).ToString("###,###,##0") + " Gal"txtQty.Value = Convert.ToDouble(txtQty.Value).ToString("###,###,##0") + " Gal (Optional Delv. Location)"I have some reports embedded in an ASP.NET Razor View.
Everything works perfectly on my dev box, but as soon as I deploy to live I get the following error:
Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerWrapper'.;
I’ve checked the versioning in the web.config, and it is using the web.config, and I have reinstalled the telerik reporting on the server, but to no avail.
The controller is:
public ActionResult Dashboard(int id) { var instanceReportSource = new Telerik.Reporting.InstanceReportSource(); instanceReportSource.Parameters.Add(new Telerik.Reporting.Parameter() { Name = "BidId", Value = id }); instanceReportSource.ReportDocument = new BidSummary(); return View(instanceReportSource); }And the view is
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Telerik.Reporting.InstanceReportSource>" %><%@ Import Namespace="BidGovernance.Reports" %><%@ Register assembly="Telerik.ReportViewer.WebForms, Version=7.0.13.521, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" namespace="Telerik.ReportViewer.WebForms" tagprefix="telerik" %><%@ Register assembly="Telerik.Reporting, Version=7.0.13.521, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" namespace="Telerik.Reporting" tagprefix="telerik" %><!DOCTYPE html><html><head runat="server"> <meta name="viewport" content="width=device-width" /> <title>Dashboard</title></head><body> <div> <form id="form1" runat="server"> <telerik:ReportViewer ID="ReportViewer1" runat="server" Width="100%" Height="800px"></telerik:ReportViewer> <div> <script runat="server"> public override void VerifyRenderingInServerForm(Control control) { // to avoid the server form (<form runat="server"> requirement } protected override void OnLoad(EventArgs e) { base.OnLoad(e); //Telerik.Reporting.ObjectDataSource data = new Telerik.Reporting.ObjectDataSource(); //data.DataSource = Model; //Telerik.Reporting.Report report = new Telerik.Reporting.Report(); //report.DataSource = data; // var instanceReportSource = new Telerik.Reporting.InstanceReportSource(); // instanceReportSource.ReportDocument = report; // instanceReportSource.ReportDocument = new DSTest(); ReportViewer1.ReportSource = Model; } </script> </div> </form> </div></body></html>i have created a reportserver. This allows to display several independant reports in the browser.
The initial reportparameters are filled in with values from the url
but those parameters can be changed.
when i export the second render result (with different parameter values) to pdf in the code behind, it always saves the document with the initial report parameters.
when i use the export function from the reportviewer, it is correct
Dim succesful As Boolean = False
try
Dim reportProcessor As New Processing.ReportProcessor()
Dim instanceReportSource As New InstanceReportSource()
instanceReportSource = ReportSelection(true)
Dim result As Processing.RenderingResult = reportProcessor.RenderReport("PDF", instanceReportSource, deviceInfo)
Dim fileName As String '= result.DocumentName + "." + result.Extension
Dim directoryPath As String = servername.MapPath("../docs/")
Dim contextDirectory As New DirectoryInfo(directoryPath)
If contextDirectory.Exists Then
Else
contextDirectory.Create()
end If
Using fs As New System.IO.FileStream(directoryPath & fileName, System.IO.FileMode.Create)
fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length)
fs.Close()
end Using
any suggestions?