Dec 22, 2011, 3:42 PM
Crystal Report and Ext.net
Hello good morning :)
For the last 2 days i've been banging my head over the wall, figuring out why my crystal report didn't appear on my aspx page.
In the page that had my crystal report i had a few textboxes to create the report dinamically, these textboxes were created using ext.net.
Anytime i would add a reference my ext.net reference always was sort of reloaded. Finally i decided to commentate these controls created with ext.net and just leave the page with the report, and now my report is correctly displayed.
My question is this: Is it a bug or is it a conflict between CR and ext.net?
Im using Visual studio 2010 + CR Version=13.0.2000.0 and Ext.Net 1.2
Thx before hand :)
This is the code of the asp page.
For the last 2 days i've been banging my head over the wall, figuring out why my crystal report didn't appear on my aspx page.
In the page that had my crystal report i had a few textboxes to create the report dinamically, these textboxes were created using ext.net.
Anytime i would add a reference my ext.net reference always was sort of reloaded. Finally i decided to commentate these controls created with ext.net and just leave the page with the report, and now my report is correctly displayed.
My question is this: Is it a bug or is it a conflict between CR and ext.net?
Im using Visual studio 2010 + CR Version=13.0.2000.0 and Ext.Net 1.2
Thx before hand :)
This is the code of the asp page.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="reporteKardex.aspx.cs" Inherits="reporteKardex" %>
<%@ Register Assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"
Namespace="CrystalDecisions.Web" TagPrefix="CR" %>
<%--<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>--%>
<!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">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<%-- <ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:TextField ID="txtcod" runat="server" FieldLabel="COD PROD" />
<ext:TextField ID="txtalmacen" runat="server" FieldLabel="almacen" />
<ext:DateField ID="txtfechaini" runat="server" FieldLabel="Fecha ini" />
<ext:DateField ID="txtfechafin" runat="server" FieldLabel="Fecha fin" />
<ext:Button ID="btReporte" runat="server" Text="Reporte" Icon="ReportDisk" />--%>
<div>
<CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" GroupTreeImagesFolderUrl="" Height="1202px" ReportSourceID="" ToolbarImagesFolderUrl="" ToolPanelWidth="200px" Width="900px" />
</div>
</form>
</body>
</html>
This is the code behind:using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
using CrystalDecisions.Web;
public partial class reporteKardex : System.Web.UI.Page
{
sqlClase objSQL = new sqlClase();
SqlDataAdapter Adaptador;
protected void Page_Load(object sender, EventArgs e)
{
ReportDocument reporte = new ReportDocument();
dsKardex ds = new dsKardex();
Adaptador = objSQL.getDataAdapterReporte("0007", "1010", "2011-01-11", "2011-30-12", "Entrada");
Adaptador.Fill(ds, "dtRes");
reporte.Load(Server.MapPath(@"Reportes\CrystalReportKardex.rpt"));
CrystalReportViewer1.ReportSource = reporte;
reporte.SetDataSource(ds.Tables[0]);
CrystalReportViewer1.DataBind();
CrystalReportViewer1.RefreshReport();
//Ext.Net.Notification.Show(new Ext.Net.NotificationConfig
//{
// Title = "Kardex",
// Icon = Ext.Net.Icon.TableRowInsert,
// Html = ds.dtRes.Rows.Count.ToString()
//});
//this.btReporte.DirectEvents.Click.Event += new Ext.Net.ComponentDirectEvent.DirectEventHandler(Click_Event_btReporte);
}
Last edited by geoffrey.mcgill; Dec 23, 2011 at 4:27 AM.
Reason: please use [CODE] tags