Quiero montar en un servidor IIS de Windows Server 2003, una pagina web ASP.net que tiene Crystal reports.
He montado todo, el Framework 4.0, el redist del crsytal reports. En la carpeta system.web de aspnet_client, me he fijado que tiene el componente crystalreportsviewers.
Pero cuando quiero mostrar un informe me salta este error: No se ha podido cargar el informe.
¿Me falta algo por instalar?, las dll, de crsytal report estan en la carpeta bin
Lo tengo diseñado, de la siguiente forma.
Resguardo.aspx
Código ASP:
Ver original
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="resguardo.aspx.vb" Inherits="resguardo" %> <%@ Register assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" namespace="CrystalDecisions.Web" tagprefix="CR" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> ... <form id="form1" runat="server"> <div> <CR:CrystalReportViewer ID="ResguardoOperaciones" runat="server" AutoDataBind="True" EnableTheming="True" GroupTreeImagesFolderUrl="" HasGotoPageButton="False" HasPageNavigationButtons="False" HasSearchButton="False" Height="1269px" ToolbarImagesFolderUrl="" ToolPanelWidth="200px" Width="1082px" ReuseParameterValuesOnRefresh="True" ShowAllPageIds="True" HasCrystalLogo="False" HasDrilldownTabs="False" HasDrillUpButton="False" HasToggleGroupTreeButton="False" HasToggleParameterPanelButton="False" HasZoomFactorList="False" ToolPanelView="None" RenderingDPI="300" /> </div> </form> </body> </html>
Resguardo.aspx.vb
Código ASP:
Ver original
... Dim CrReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument CrReport = New CrystalDecisions.CrystalReports.Engine.ReportDocument() CrReport.Load(Server.MapPath("resguardos\resguardo.rpt")) CrReport.SetDataSource(dtDatos) ResguardoOperaciones.ReportSource = CrReport ResguardoOperaciones.ParameterFieldInfo.Clear() Response.Buffer = False Response.Clear() CrReport.ExportToHttpResponse(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat, Response, True, "Resguardo")
Gracias