Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/31.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# web报表查看器输入字符串_C#_Asp.net_Reporting Services_Reportviewer_Rdlc - Fatal编程技术网

C# web报表查看器输入字符串

C# web报表查看器输入字符串,c#,asp.net,reporting-services,reportviewer,rdlc,C#,Asp.net,Reporting Services,Reportviewer,Rdlc,开始时: 我在用户控件中使用了ASP.NET报表查看器。我有以下用户控件:(aspx) 一切正常,报告显示正确,但我有elmah,它通过邮件向我发送以下错误: 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. -

开始时: 我在用户控件中使用了ASP.NET报表查看器。我有以下用户控件:(aspx)

一切正常,报告显示正确,但我有elmah,它通过邮件向我发送以下错误:

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)
我认为错误是关于某种颜色,但我没有在rdlc上添加任何颜色。。。 此外,在开发服务器上,报告加载速度非常快,但在生产环境中,报告加载速度有点慢,几乎30秒

如果有人能帮助解决这两个问题…,谢谢

注意:该错误仅在web应用程序处于生产状态而不是在开发服务器(Cassini)中时显示

编辑: 错误地(将此rv控件的样式与firebug的另一个项目中的另一个控件进行比较),我发现了问题所在。RV控件创建一个html表和它具有工具栏的表的一个td。此td有一个带有url的背景图像。现在是:

 url("/myApplicationName/Reserved.ReportViewerWebControl.axd?OpType=BackImage&Version=11.0.3010.3&Color=%23ECE9D8&Name=Microsoft.Reporting.WebForms.Icons.toolbar_bk.png");

请参阅错误中的数字。如果我删除“myApplicationName”,一切正常,错误就会消失。所以必须从那里开始。问题是:我没有在任何地方输入这个url,它是由reportviewer自动生成的,控件没有像tools背景图像这样的属性来更改它。。。因此,相对路径或绝对路径问题

如果使用asp.net 4.0和IE10,则需要在生产服务器上下载framework 4.5以解决此问题

  • 验证是否在生产服务器和开发服务器中使用相同的框架
  • 验证要调用的报表是否具有特定颜色的格式
据我所见,他在“%23ECE9D8”中抱怨
我不明白为什么会出现百分号。错误可能在那里。

问题是我们使用的是反向代理。现已修复。

我使用的是.net 4.0,但不是IE,问题出在所有浏览器上
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)
 url("/myApplicationName/Reserved.ReportViewerWebControl.axd?OpType=BackImage&Version=11.0.3010.3&Color=%23ECE9D8&Name=Microsoft.Reporting.WebForms.Icons.toolbar_bk.png");