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 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 ReportFormA : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { CrystalReportViewer1.Visible = true; ReportDocument crystalReport = new ReportDocument(); crystalReport.Load(Server.MapPath("~/Reports/ReportA.rpt")); crystalReport.SetDatabaseLogon ("Admin", "master22", @"SQL", "Hot"); CrystalReportViewer1.ReportSource = crystalReport; CrystalReportViewer1.SelectionFormula = "{COCINST.inst_id} = '" + Session["inst_id"].ToString() + "'"; } } }
A number is required here. Details: errorKind Error in File FormAReport {F1AAC878-E2B7-4104-BE51-B9CC0023DD43}.rpt: Error in formula Record Selection: '{TableCOCINST.INST_ID} = '10960'' A number is required here. Details: errorKind
INST_ID
CrystalReportViewer1.SelectionFormula = "{TableCOCINST.inst_id} = '10000'";
Page_Load()
inst_id
CrystalReportViewer1.SelectionFormula = "{COCINST.inst_id} = " + Session["inst_id"].ToString();
{COCINST.inst_id} = 100
{?inst_id}
{TableCOCINST.inst_id} = {?inst_id}
{TableCOCINST.inst_id} = CInt({?inst_id})
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)