public void setTypeSection(csRptSectionType rhs) { m_typeSection = rhs; }
private String paintSection(cReportAspect aspect, String sKey, csRptSectionType rptType, String text, bool isSecLn) { cReportPaintObject paintObj = null; paintObj = m_paint.getNewSection(csRptPaintObjType.CSRPTPAINTOBJBOX); cReportAspect w_aspect = paintObj.getAspect(); // we only draw the bottom line of the sections // w_aspect.setLeft(0); w_aspect.setTop(aspect.getTop() + aspect.getHeight() - cGlobals.C_HEIGHT_BAR_SECTION); w_aspect.setWidth(aspect.getWidth()); w_aspect.setHeight(cGlobals.C_HEIGHT_BAR_SECTION); w_aspect.setBorderType(csReportBorderType.CSRPTBSFIXED); w_aspect.setBorderWidth(1); if (isSecLn) { w_aspect.setBackColor(0xffcc99); w_aspect.setBorderColor(Color.Red.ToArgb()); } else { const int innerColor = 0x99ccff; if (rptType == csRptSectionType.GROUP_FOOTER || rptType == csRptSectionType.GROUP_HEADER) { w_aspect.setBackColor(innerColor); w_aspect.setBorderColor(0xC0C000); } else { w_aspect.setBackColor(innerColor); w_aspect.setBorderColor(0x0066cc); } } if (rptType == csRptSectionType.MAIN_FOOTER || rptType == csRptSectionType.FOOTER) { w_aspect.setOffset(m_offSet); } paintObj.setIsSection(!isSecLn); paintObj.setRptType(rptType); paintObj.setTag(sKey); paintObj.setText(text); return paintObj.getKey(); }
private void pAddPaintSetcionForSecLn( cReportSection sec, csRptSectionType typeSecLn) { cReportPaintObject paintSec = null; if (sec.getSectionLines().count() > 1) { for (int i = 0; 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 // cReportPaintObject po = m_paint.getPaintSections().item(sec.getKeyPaint()); po.setTextLine(C_SECTIONLINE + (sec.getSectionLines().count() - 1).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() - 1).getAspect().getHeight()); }
internal void setMainTypeSection(csRptSectionType rhs) { m_mainTypeSection = rhs; }
public void addSection(csRptSectionType typeSection) { if (!m_editor.Visible) return; cReportSection rptSection = null; cReportSection topSec = null; cReportAspect w_aspect = null; cReportAspect aspect = null; cReportPaintObject paintObj = null; float maxBottom = 0; float minBottom = 0; float y = 0; switch (typeSection) { case csRptSectionType.HEADER: cReportSections w_headers = m_report.getHeaders(); rptSection = w_headers.add(); rptSection.setName("H_" + rptSection.getIndex().ToString()); aspect = w_headers.item(w_headers.count() - 2).getAspect(); rptSection.getAspect().setWidth(aspect.getWidth()); rptSection.getAspect().setHeight(0); rptSection.getAspect().setTop(aspect.getTop() + aspect.getHeight()); rptSection.setKeyPaint(paintSection(rptSection.getAspect(), rptSection.getKey(), csRptSectionType.HEADER, rptSection.getName(), false)); w_aspect = rptSection.getAspect(); moveSection(m_paint.getPaintObject(rptSection.getKeyPaint()), 0, w_aspect.getTop(), w_aspect.getTop() + cGlobals.C_HEIGHT_NEW_SECTION, w_aspect.getTop() + rptSection.getAspect().getHeight(), rptSection, true); break; case csRptSectionType.DETAIL: break; case csRptSectionType.GROUP_HEADER: cIReportGroupSections w_groupsHeaders = m_report.getGroupsHeaders(); rptSection = w_groupsHeaders.item(w_groupsHeaders.count() - 1); rptSection.setName("G_" + rptSection.getIndex().ToString()); // the first group is next to the last header // if (w_groupsHeaders.count() == 1) { topSec = m_report.getHeaders().item(m_report.getHeaders().count() - 1); } else { topSec = w_groupsHeaders.item(w_groupsHeaders.count() - 2); } w_aspect = topSec.getAspect(); rptSection.getAspect().setWidth(w_aspect.getWidth()); rptSection.getAspect().setHeight(0); rptSection.getAspect().setTop(w_aspect.getTop() + w_aspect.getHeight()); rptSection.setKeyPaint(paintSection(rptSection.getAspect(), rptSection.getKey(), csRptSectionType.GROUP_HEADER, rptSection.getName(), false)); w_aspect = rptSection.getAspect(); moveSection(m_paint.getPaintObject(rptSection.getKeyPaint()), 0, w_aspect.getTop() + cGlobals.C_HEIGHT_NEW_SECTION, w_aspect.getTop(), w_aspect.getTop() + cGlobals.C_HEIGHT_NEW_SECTION, rptSection, true); break; case csRptSectionType.GROUP_FOOTER: cIReportGroupSections w_groupsFooters = m_report.getGroupsFooters(); rptSection = w_groupsFooters.item(0); rptSection.setName("G_" + rptSection.getIndex().ToString()); // all group footers are added to the top so at the // beginning they are next to the detail section // topSec = m_report.getDetails().item(m_report.getDetails().count() - 1); w_aspect = topSec.getAspect(); rptSection.getAspect().setWidth(w_aspect.getWidth()); rptSection.getAspect().setHeight(cGlobals.C_HEIGHT_NEW_SECTION); rptSection.getAspect().setTop(w_aspect.getTop() + w_aspect.getHeight()); rptSection.setKeyPaint(paintSection(rptSection.getAspect(), rptSection.getKey(), csRptSectionType.GROUP_FOOTER, rptSection.getName(), false)); paintObj = m_paint.getPaintObject(rptSection.getKeyPaint()); pMoveGroupFooter(rptSection.getKey(), out minBottom, out maxBottom); m_offY = 0; w_aspect = rptSection.getAspect(); y = w_aspect.getHeight() + w_aspect.getTop() - cGlobals.C_HEIGHT_BAR_SECTION; moveSection(paintObj, 0, y, minBottom, maxBottom, rptSection, true); break; case csRptSectionType.FOOTER: cReportSections w_footers = m_report.getFooters(); // all footers are added to the beginning of the collection // rptSection = w_footers.add(null, "" , 0); rptSection.setName("F_" + rptSection.getIndex().ToString()); aspect = w_footers.item(1).getAspect(); rptSection.getAspect().setWidth(aspect.getWidth()); rptSection.getAspect().setHeight(cGlobals.C_HEIGHT_NEW_SECTION); rptSection.getAspect().setTop(aspect.getTop()); rptSection.setKeyPaint(paintSection(rptSection.getAspect(), rptSection.getKey(), csRptSectionType.FOOTER, rptSection.getName(), false)); paintObj = m_paint.getPaintObject(rptSection.getKeyPaint()); pMoveFooter(rptSection.getKey(), out minBottom, out maxBottom); m_offY = 0; w_aspect = rptSection.getAspect(); y = w_aspect.getHeight() + w_aspect.getTop() - m_offSet - cGlobals.C_HEIGHT_BAR_SECTION; moveSection(paintObj, 0, y, minBottom, maxBottom, rptSection, true); break; } // every section we add has a section line // and we need to set his width // aspect = rptSection.getSectionLines().item(0).getAspect(); aspect.setWidth(rptSection.getAspect().getWidth()); refreshBody(); refreshRule(); }
public void setTypeSection(csRptSectionType rhs) { m_sectionLines.setTypeSection(rhs); }
public void setRptType(csRptSectionType rhs) { m_rptType = rhs; }
public void setTypeSection(csRptSectionType rhs) { m_controls.setTypeSection(rhs); }