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;
}
}
}
}
}
}
预览效果:

博客内容主要用于日常学习记录,内容比较随意,如有问题,还需谅解!!!

浙公网安备 33010602011771号