private void pAddPaintSetcionForSecLn( cReportSection sec, csRptTypeSection typeSecLn) { int i = 0; cReportPaintObject paintSec = null; if (sec.getSectionLines().count() > 1) { for (i = 1; i <= sec.getSectionLines().count() - 1; i++) { cReportSectionLine secLine = sec.getSectionLines().item(i); secLine.setKeyPaint( paintSection( secLine.getAspect(), secLine.getKey(), sec.getTypeSection(), C_SECTIONLINE + i.ToString(), true)); // we set the height of every section line // paintSec = m_paint.getPaintSections().item(secLine.getKeyPaint()); paintSec.setHeightSecLine(secLine.getAspect().getHeight()); paintSec.setRptType(typeSecLn); paintSec.setRptKeySec(sec.getKey()); } // if there is more than one section we use // textLine to show the name of the last line // CSReportPaint.cReportPaintObject po = m_paint.getPaintSections().item(sec.getKeyPaint()); po.setTextLine(C_SECTIONLINE + sec.getSectionLines().count().ToString()); } // we set the height of the last section line // paintSec = m_paint.getPaintSections().item(sec.getKeyPaint()); cReportSectionLines secLines = sec.getSectionLines(); paintSec.setHeightSecLine(secLines.item(secLines.count()).getAspect().getHeight()); }
private void pAddSectionLinesAux( cReportSection sec, CSReportPaint.cReportPaintObject paintObj) { csRptTypeSection typeSecLn = csRptTypeSection.CONTROL; cReportAspect aspect = null; int maxBottom = 0; int minBottom = 0; int index = 0; float y = 0; switch (sec.getTypeSection()) { case csRptTypeSection.CSRPTTPSCHEADER: case csRptTypeSection.CSRPTTPMAINSECTIONHEADER: pMoveHeader(sec.getKey(), minBottom, maxBottom, false); aspect = sec.getAspect(); y = aspect.getHeight() + aspect.getTop(); typeSecLn = csRptTypeSection.C_KEY_SECLN_HEADER; index = sec.getSectionLines().count() - 1; break; case csRptTypeSection.CSRPTTPSCDETAIL: case csRptTypeSection.CSRPTTPMAINSECTIONDETAIL: pMoveDetails(sec.getKey(), minBottom, maxBottom, false); aspect = sec.getAspect(); y = aspect.getHeight() + aspect.getTop(); typeSecLn = csRptTypeSection.C_KEY_SECLN_DETAIL; index = sec.getSectionLines().count() - 1; break; case csRptTypeSection.CSRPTTPGROUPHEADER: pMoveGroupHeader(sec.getKey(), minBottom, maxBottom, false); aspect = sec.getAspect(); y = aspect.getHeight() + aspect.getTop(); typeSecLn = csRptTypeSection.C_KEY_SECLN_GROUPH; index = sec.getSectionLines().count() - 1; break; case csRptTypeSection.CSRPTTPGROUPFOOTER: pMoveGroupFooter(sec.getKey(), minBottom, maxBottom, false); aspect = sec.getAspect(); y = aspect.getHeight() + aspect.getTop(); typeSecLn = csRptTypeSection.C_KEY_SECLN_GROUPF; index = sec.getSectionLines().count() - 1; break; case csRptTypeSection.CSRPTTPSCFOOTER: case csRptTypeSection.CSRPTTPMAINSECTIONFOOTER: aspect = sec.getAspect(); aspect.setTop(aspect.getTop() - cGlobals.C_HEIGHT_NEW_SECTION); pMoveFooter(sec.getKey(), minBottom, maxBottom, false); m_offY = 0; y = aspect.getHeight() + aspect.getTop() - m_offSet - cGlobals.C_HEIGHT_BAR_SECTION; typeSecLn = csRptTypeSection.C_KEY_SECLN_FOOTER; index = 1; break; } // we add a paint object to all sectionlines except the last one // the last sectionline uses the paint object of the section // cReportSectionLine secL = sec.getSectionLines().item(index); secL.setKeyPaint( paintSection(secL.getAspect(), secL.getKey(), sec.getTypeSection(), C_SECTIONLINE + (sec.getSectionLines().count() - 1).ToString(), true)); // section line CSReportPaint.cReportPaintObject po = m_paint.getPaintSections().item(secL.getKeyPaint()); po.setRptType(typeSecLn); po.setRptKeySec(sec.getKey()); // section po = m_paint.getPaintSections().item(sec.getKeyPaint()); po.setTextLine(C_SECTIONLINE + sec.getSectionLines().count().ToString()); moveSection(paintObj, 0, y, minBottom, maxBottom, sec, false); refreshBody(); refreshRule(); }