using System; using System.Collections.Generic; using System.Collections; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.HtmlControls; using CrystalDecisions.Web; using System.Web.UI.WebControls.WebParts; using System.Web.UI.WebControls; using CrystalDecisions.CrystalReports.Engine; using CrystalDecisions.Shared; using System.Data; using System.Data.SqlClient; using System.Configuration; using System.Xml.Linq; using System.Web.SessionState; namespace SACSCOCLogin1._1 { public partial class ReportA : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { TextBoxINST_ID.Text = Session["inst_id"].ToString(); CrystalReportViewer1.Visible = true; ReportDocument CrystalReport = new ReportDocument(); CrystalReport.Load(Server.MapPath("~/Reports/ReportA.rpt")); CrystalReport.SetDatabaseLogon ("Admin", "master22", @"SQL", "Hot"); CrystalReportViewer1.ReportSource = CrystalReport; CrystalReportViewer1.DataBind(); } } }
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReportA.aspx.cs" Inherits="SACSCOCLogin1._1.ReportA" %> <%@ 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"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <asp:TextBox ID="TextBoxINST_ID" runat="server"></asp:TextBox> </div> <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="True" DisplayToolbar="False" EnableDatabaseLogonPrompt="False" GroupTreeImagesFolderUrl="" HasDrilldownTabs="False" HasToggleGroupTreeButton="False" HasToggleParameterPanelButton="False" Height="1142px" ReportSourceID="CrystalReportSource1" ToolbarImagesFolderUrl="" ToolPanelView="None" ToolPanelWidth="200px" Width="868px" /> <CR:CrystalReportSource ID="CrystalReportSource1" runat="server"> <Report FileName="Reports\Report1.rpt"> </Report> </CR:CrystalReportSource> </form> </body> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)