Use the code to make the text object of the crystal report, the field is invisible

xiaoxiao2021-03-06  52

For example, the Name of your text object is Text1, then:

try {CrystalReport1 crReportDocument; crReportDocument = new CrystalReport1 (); //crReportDocument.SetDataSource(Class1.ds1.Tables["au1 "]); Binding dataset Dataset crystalReportViewer1.ReportSource = crReportDocument; CrystalDecisions.CrystalReports.Engine.TextObject GetTextObject = crReportDocument.ReportDefinition.ReportObjects [ "Text1"] as TextObject; GetTextObject.Text = textBox1.Text.Trim (); GetTextObject.ObjectFormat.EnableSuppress = true; // hides} catch (Exception ex) {MessageBox.Show (ex. Message, System Tips, MessageboxButtons.ok, MessageBoxicon.Error;

转载请注明原文地址:https://www.9cbs.com/read-116799.html

New Post(0)