ReportViewer.cshtml 1.1 KB

123456789101112131415161718192021222324252627
  1. @{
  2. ViewBag.Title = "ReportViewer";
  3. }
  4. <form id="reportForm" method="post" action="@Url.Content("~/ReportViewer/Page.aspx")">
  5. </form>
  6. @section scripts{
  7. <script type="text/javascript">
  8. $(function () {
  9. var html = new Array();
  10. html.push('<input type="hidden" name="ReportFolder" value="' + $.SystemGeneral.getUrlParam("ReportFolder") + '"/>');
  11. if (top.ReportParameter) {
  12. for (var prop in top.ReportParameter) {
  13. if (prop.toString() == "BackGroundImage") {
  14. html.push('<input type=hidden name="' + prop.toString() + '" value="' + (top.ReportParameter[prop] ? top.ReportParameter[prop] : "").toString() + '"/>');
  15. } else {
  16. html.push('<input type=hidden name="' + prop.toString() + '_RAP" value="' + ((top.ReportParameter[prop] || top.ReportParameter[prop] == 0) ? top.ReportParameter[prop] : "").toString() + '"/>');
  17. }
  18. }
  19. $("#reportForm").html(html.join(''));
  20. $("#reportForm").submit();
  21. }
  22. });
  23. </script>
  24. }