2013年2月10日星期日

How to using x++ code create report

  QueryRun                qr;
  ProdTable               _pt;
  ReportDesign            reportDesign;
  ReportAutoDesignSpecs   reportAutoDesignSpecs;
  ReportSection           RS1,RS2,RS3;
  ReportStringControl     RSC,RSC2;
  ReportTextControl       RTC;
  FormDataSource          ProdTable_ds;
  ProdTable               PD;
  ;
  reportDesign                = element.design();
  reportAutoDesignSpecs       = reportDesign.autoDesignSpecs();
  reportDesign.orientation(2);//Landscape    //info( int2str(reportDesign.orientation()));
  qr                          = new QueryRun(this);
  ProdTable_ds                = element.args().record().dataSource();
  RS1                         = reportAutoDesignSpecs.addProgrammableSection(1);
  RSC                         = RS1.addStringDisplayControl("method2");
  RSC.left(40,Units::Char);
  RTC =   RS1.addTextControl("HELO");
  RS2                         = reportAutoDesignSpecs.addProgrammableSection(2);
  RSC2                         = RS2.addStringDisplayControl("method2");
  RSC2.left(40,Units::Char);
  RTC = RS2.addTextControl("HELO2");
  this.execute(1);
  this.newPage();
  this.execute(2);
  RTC.text("HELO3");

没有评论:

发表评论