using System; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Windows.Forms; using System.Drawing; using System.Data; using FastReport; using FastReport.Data; using FastReport.Dialog; using FastReport.Barcode; using FastReport.Table; using FastReport.Utils; namespace FastReport { public class ReportScript { private void Data1_AfterData(object sender, EventArgs e) { String str ="001_true;002|false;003_true;004_true;"; string[] temp = str.Split(';'); if (temp.Length > 0) { for (int i = 0; i < temp.Length; i++) { string[] obj = temp[i].Split('_'); if(obj[0] =="001" && obj[1] == "true") { CheckBox1.Checked=true; } if(obj[0] =="002" && obj[1] == "true") { CheckBox2.Checked=true; } if(obj[0] =="003" && obj[1] == "true") { CheckBox3.Checked=true; } if(obj[0] =="004" && obj[1] == "true") { CheckBox4.Checked=true; } } } } } }
预览效果:
标签:obj,示例,System,FastReport,复选框,&&,using,true From: https://www.cnblogs.com/YYkun/p/17295100.html