|
@@ -42,26 +42,26 @@ namespace OTSIncAReportTemplate
|
|
|
{
|
|
|
InitializeComponent();
|
|
|
|
|
|
- if (args.Length == 0)
|
|
|
- {
|
|
|
- MessageBox.Show("请使用报告程序打开模板程序!");
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
- if (args.Length != 5)
|
|
|
- {
|
|
|
- string str = "";
|
|
|
- for (int i = 0; i < args.Length; i++)
|
|
|
- {
|
|
|
- str = str + "参数" + (i + 1).ToString() + ":" + args[i].ToString() + Environment.NewLine;
|
|
|
- }
|
|
|
-
|
|
|
- MessageBox.Show("传入的参数数量不正确,应为5个参数:" + Environment.NewLine + str);
|
|
|
- return;
|
|
|
- }
|
|
|
+ //if (args.Length == 0)
|
|
|
+ //{
|
|
|
+ // MessageBox.Show("请使用报告程序打开模板程序!");
|
|
|
+ // return;
|
|
|
+ //}
|
|
|
+
|
|
|
+ //if (args.Length != 5)
|
|
|
+ //{
|
|
|
+ // string str = "";
|
|
|
+ // for (int i = 0; i < args.Length; i++)
|
|
|
+ // {
|
|
|
+ // str = str + "参数" + (i + 1).ToString() + ":" + args[i].ToString() + Environment.NewLine;
|
|
|
+ // }
|
|
|
+
|
|
|
+ // MessageBox.Show("传入的参数数量不正确,应为5个参数:" + Environment.NewLine + str);
|
|
|
+ // return;
|
|
|
+ //}
|
|
|
|
|
|
//方便测试代码分岐
|
|
|
- bool bDebug = false;
|
|
|
+ bool bDebug = true;
|
|
|
if (bDebug == false)
|
|
|
{
|
|
|
m_arg1 = args[0].Replace("^", " ");
|
|
@@ -85,10 +85,10 @@ namespace OTSIncAReportTemplate
|
|
|
//m_arg4 = "0-983";
|
|
|
//m_arg5 = "";
|
|
|
|
|
|
- m_arg1 = "E:\\ResultFile\\beijing20201217\\1-18\\Sample1\\ReportTemplateDB.db";
|
|
|
+ m_arg1 = "E:\\ResultFile\\beijing20210708\\Sample4\\ReportTemplateDB.db";
|
|
|
m_arg2 = "./Config/ProData/ReportTemplateConfig.xml";
|
|
|
m_arg3 = "MainReport";
|
|
|
- m_arg4 = "1031";
|
|
|
+ m_arg4 = "100";
|
|
|
m_arg5 = "0-100";
|
|
|
}
|
|
|
|
|
@@ -143,6 +143,7 @@ namespace OTSIncAReportTemplate
|
|
|
|
|
|
//关闭查看报告,则退出进程
|
|
|
this.Close();
|
|
|
+ Application.Exit();
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
@@ -368,7 +369,7 @@ namespace OTSIncAReportTemplate
|
|
|
|
|
|
ds.Tables.Add(ls_dt_fielddt);
|
|
|
ds.Tables.Add(ls_dt_frame);
|
|
|
- myRela1 = new DataRelation("Rela1", ls_dt_fielddt.Columns["FieldId"], ls_dt_frame.Columns["FieldId"]);
|
|
|
+ myRela1 = new DataRelation("Rela1", ls_dt_fielddt.Columns["FieldId"], ls_dt_frame.Columns["FieldId"],false);
|
|
|
ds.Relations.Add(myRela1);
|
|
|
rmReport1.AddDataSet(ls_dt_fielddt, "CustomersDS");
|
|
|
rmReport1.AddDetailDataSet(ls_dt_frame, "OrdersDS", "CustomersDS", myRela1);
|