ReportDocument.Refresh();
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 CrystalDecisions.CrystalReports.Engine; using CrystalDecisions.Shared; using CrystalDecisions.Windows; using CrystalDecisions.ReportSource; using System.Web.UI.WebControls.WebParts; using System.Web.UI.WebControls; 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.Refresh(); CrystalReport.SetDatabaseLogon ("Admin", "master22", @"SQL", "Hot"); CrystalReportViewer1.ReportSource = CrystalReport; CrystalReportViewer1.DataBind(); } } }
ReportDocument CrystalReport = new ReportDocument(); ReportDocument.Refresh();
CrystalReport.Refresh();
Refresh()
load()
Follow the below steps: 1. Open the crystal reports 2. got to File -> uncheck Save Data with Report 3. save the file apply same with all subreports now try to run the program.
solution 1 is correct, some time Refresh() will also give error so you need to do below: Follow the below steps: 1. Open the crystal reports 2. got to File -> uncheck Save Data with Report 3. save the file apply same with all subreports now try to run the program.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)