For start : I have used the ASP.NET Report Viewer in a user control. I have the following user control : (aspx)
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<rsweb:ReportViewer InteractivityPostBackMode="AlwaysAsynchronous" ID="rVControl" ShowRefreshButton="false" SizeToReportContent="true" ShowPrintButton="true"
Width="50%" Height="100%" runat="server" Font-Names="Verdana" AsyncRendering="true" ProcessingMode="Remote"
Font-Size="8pt" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="12pt">
</rsweb:ReportViewer>
in code behind i have :
public void LoadRVData() {
rVControl.ProcessingMode = ProcessingMode.Local;
rVControl.Visible = true;
LocalReport report = rVControl.LocalReport;
report.ReportPath = ReportPath;
ReportDataSource rvSource = new ReportDataSource(ReportSourceName, ReportSource);
report.DataSources.Clear();
report.DataSources.Add(rvSource);
}
all works fine, the report is displayed correctly, but i have elmah and it is sending me, on mail, the following error :
System.FormatException: Input string was not in a correct format.
Generated: Wed, 08 May 2013 17:15:19 GMT
System.Exception: %23ECE9D8 is not a valid value for Int32. ---> System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.ComponentModel.Int32Converter.FromString(String value, NumberFormatInfo formatInfo)
at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
--- End of inner exception stack trace ---
at System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
at System.Drawing.ColorConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value)
at System.Drawing.ColorTranslator.FromHtml(String htmlColor)
at Microsoft.Reporting.WebForms.BackgroundImageOperation.GetResource(String resourceName, String& mimeType, NameValueCollection urlQuery)
at Microsoft.Reporting.WebForms.EmbeddedResourceOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response)
at Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
I think the error is about some kind of color but i didn't put any on rdlc... Also, on development server the report is loading pretty fast but on production it is kind off slow, almost 30 seconds..
If anyone can help with this two problems..., thx
P.S. the error only shows when the web application is on production not in development server (Cassini)
Edit : By mistake (was comparing the styles of this rv control with another one from an another project with firebug), i found where the problem is. RV Control creates a html table and one of the td of the table it has the tools bar. this td has a background image with an url. Now it is :
url("/myApplicationName/Reserved.ReportViewerWebControl.axd?OpType=BackImage&Version=11.0.3010.3&Color=%23ECE9D8&Name=Microsoft.Reporting.WebForms.Icons.toolbar_bk.png");
See the numbers in the error... .If i remove "myApplicationName" everything is ok , the error disappears. So it has to be from there. the problem : i don't enter this url anywhere, it is autogenerated by reportviewer , and the control doesn't have a property like tools background image to change this... So relative path or absolute path problem