Crystal IE 报告下载失败,因为超过 2083 个字符

Crystal report download fails in IE since exceeding 2083 characters

我在我的项目中使用 Crystal 报告来显示和下载报告。我的项目基本上是在.Net 中开发的。我从屏幕上获取用户选择,并通过查询字符串将其传递给业务对象服务器。当参数数量更多时,我在这里遇到问题。查询字符串长度超过 2083 个字符,因此报告下载在 IE 中中断,而在任何其他浏览器中都可以正常工作。所以如果有任何情况可以忽略IE的这个限制,请帮助我。

如果您需要更多详细信息,请告诉我。

如本 Microsoft Support page 页面所示

Microsoft Internet Explorer has a maximum uniform resource locator (URL) length of 2,083 characters. Internet Explorer also has a maximum path length of 2,048 characters. This limit applies to both POST request and GET request URLs.

除此之外,它还提出了一个解决方法:

the POST method is not limited by the size of the URL for submitting name/value pairs. These pairs are transferred in the header and not in the URL.

所以解决方法是,在您调用 report/build url 参数的页面上,您在该页面上使用 隐藏字段 ,然后将所需的 url 参数值分配给隐藏字段,并使用 post 方法将它们提交到报告查看器页面,您可以在其中通过 request 对象访问它们。