我的 asp.net 页面中有一个 CrsytalReportView。我在 Page_Load 事件中设置 CrystalReportViewer 的 ReportSource。当我通过运行 Visual Studio 启动页面时,ReportViewer 在页面中显示报告数据。我通过 http 在 IIS 中发布了我的网站,一切正常。但是从 IIS 将网站的绑定更改为HTTPS后,报告页面中没有显示任何内容。
这是一些代码:
1.我的报告页面
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterMain.Master" AutoEventWireup="true"
CodeBehind="ReportPageMain.aspx.cs" Inherits="RPS_ArchiveEditor_NEW.ReportPageMain" %>
<%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cph_Body" runat="server">
<CR:CrystalReportViewer ID="CrystalReportViewerMain" runat="server" AutoDataBind="true"
HasPrintButton="False" HasExportButton="False" HasDrillUpButton="False" HasDrilldownTabs="False" />
<asp:Button runat="server" ID="btnPrintReport" CssClass="PrintReportButton" OnClick="btnPrintReport_Click" Text="Çap et" />
<input type="button" id="btnGoToDefaultPage" class="PrintReportButton" value="Əsas səhifə" onclick="window.location.href='Default.aspx'" />
</asp:Content>
2. Page_Load event
protected void Page_Load(object sender, EventArgs e)
{
ReportDocument crystalReport = new ReportDocument();
if (Ajax.RoleIsAdmin())
crystalReport.Load(Server.MapPath("rptMainGridView.rpt"));
else
crystalReport.Load(Server.MapPath("rptUserGridView.rpt"));
// in this session have data, I'm absolutely sure.
List<PersonDetailsForPrint> perDetsForPrintList = Session["perDetForPrint"] as List<PersonDetailsForPrint>;
crystalReport.SetDataSource(perDetsForPrintList);
CrystalReportViewerMain.ReportSource = crystalReport;
Session["ReportSource"] = crystalReport;
}