My Crystal Report always appears blank

Asked

Viewed 1,147 times

1

Utilizo Visual Studio 2012 Ultimate and the latest version of Crystal Reports.

But every time I run the page, even on localhost the report comes blank. By displaying the page’s source code I can see all the information on it. It just doesn’t throw that information into report form. Any idea?

Aspx

<%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<form id="form1" runat="server">
  <div>
    <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="True" />
  </div>
</form>

ASPX.CS

protected void Page_Load(object sender, EventArgs e)       
{            
    ReportDocument rptrel = new ReportDocument();
    rptrel.Load(Server.MapPath("Rel_ComissaoInadCanc.rpt"));    
    CrystalReportViewer1.ReportSource = rptrel;
    CrystalReportViewer1.DataBind();
}
  • Without seeing your code or something, it’s hard to guess what’s going on with you, don’t you think?

  • I just played the code! In Visual Studio I can see it normally in the design. But when running and going to localhost, it generates blank. Even sending data to the page.

  • Take a test by swapping ReportDocument rptrel = new ReportDocument();&#xA; rptrel.Load(Server.MapPath("Rel_ComissaoInadCanc.rpt")); for ReportDocument rptrel = new Rel_ComissaoInadCanc();

  • Or, you can still try, ReportDocument rptrel = new ReportDocument(); rptrel.Load("Caminho do relatorio");

  • I changed how you reported, but it keeps coming blank.

1 answer

0

I solved this problem by playing the folder aspnet_client inside the directory where IIS reads the project.

Inside this folder is the crystalreportsviewers that carries the report. In my case, that’s what made the screen come blank.

inserir a descrição da imagem aqui

Browser other questions tagged

You are not signed in. Login or sign up in order to post.