I need to set value to my report fields. If I open the .xsd file and assign "HELLO" to the DefaultValue field it gets displayed on the report.
My problem:
I'm using a C# program to assign the value, but I can't get it displayed when I run the program.
This is a sample of the code:
ReportDocument rptCheck = new ReportDocument();
dsCheck ds = new dsCheck(); // .xsd file name
DataTable dt = new DataTable();
// Just set the name of data table
dt.TableName = "Crystal Report Checks";
dt = getChecks(); //This function is located below this function
ds.Tables[0].Merge(dt);
// Your .rpt file path will be below
rptCheck.Load(Server.MapPath("checkprt.rpt"));
//set dataset to the report viewer.
rptCheck.SetDataSource(ds);
CrystalReportViewer1.ReportSource = rptCheck;