Пример #1
0
        internal static void createStandarSections(cReport report, Rectangle tr)
        {
            report.getHeaders().add(null, C_KEY_HEADER);
            report.getFooters().add(null, C_KEY_FOOTER);
            report.getDetails().add(null, C_KEY_DETAIL);

            //
            // main header
            //
            cReportSection sec = report.getHeaders().item(C_KEY_HEADER);

            sec.setName("Main header");

            cReportAspect aspect = sec.getAspect();

            aspect.setTop(0);
            aspect.setHeight(tr.height * 0.25f);
            aspect.setWidth(tr.width);
            cReportSectionLine secLn = sec.getSectionLines().item(0);

            secLn.setSectionName("Main header");
            aspect = secLn.getAspect();
            aspect.setTop(0);
            aspect.setHeight(tr.height * 0.25f);
            aspect.setWidth(tr.width);

            //
            // detail
            //
            sec = report.getDetails().item(C_KEY_DETAIL);
            sec.setName("Detail");

            aspect = sec.getAspect();
            aspect.setTop(tr.height * 0.25f);
            aspect.setHeight(tr.height * 0.25f);
            aspect.setWidth(tr.width);
            secLn = sec.getSectionLines().item(0);
            secLn.setSectionName("Detail");
            aspect = secLn.getAspect();
            aspect.setTop(tr.height * 0.25f);
            aspect.setHeight(tr.height * 0.25f);
            aspect.setWidth(tr.width);

            //
            // main footer
            //
            sec = report.getFooters().item(C_KEY_FOOTER);
            sec.setName("Main footer");

            aspect = sec.getAspect();
            aspect.setTop(tr.height * 0.75f);
            aspect.setHeight(tr.height * 0.25f);
            aspect.setWidth(tr.width);
            secLn = sec.getSectionLines().item(0);
            secLn.setSectionName("Main footer");
            aspect = secLn.getAspect();
            aspect.setTop(tr.height * 0.75f);
            aspect.setHeight(tr.height * 0.25f);
            aspect.setWidth(tr.width);
        }
Пример #2
0
        public static void addCtrls(
            cReport report, TreeView tv_controls,
            int C_IMG_FOLDER, int C_IMG_FORMULA,
            int C_IMG_CONTROL, int C_IMG_DATBASE_FIELD)
        {
            tv_controls.Nodes.Clear();

            TreeNode nodeGroup;
            TreeNode nodeRoot = tv_controls.Nodes.Add(report.getName());

            nodeRoot.ImageIndex = C_IMG_FOLDER;

            nodeGroup            = nodeRoot.Nodes.Add("Headers");
            nodeGroup.ImageIndex = C_IMG_FOLDER;
            pAddCtrlsAux(report.getHeaders(), nodeGroup, C_IMG_FOLDER, C_IMG_FORMULA, C_IMG_CONTROL, C_IMG_DATBASE_FIELD);

            nodeGroup            = nodeRoot.Nodes.Add("Group Header");
            nodeGroup.ImageIndex = C_IMG_FOLDER;
            pAddCtrlsAux(report.getGroupsHeaders(), nodeGroup, C_IMG_FOLDER, C_IMG_FORMULA, C_IMG_CONTROL, C_IMG_DATBASE_FIELD);

            nodeGroup            = nodeRoot.Nodes.Add("Details");
            nodeGroup.ImageIndex = C_IMG_FOLDER;
            pAddCtrlsAux(report.getDetails(), nodeGroup, C_IMG_FOLDER, C_IMG_FORMULA, C_IMG_CONTROL, C_IMG_DATBASE_FIELD);

            nodeGroup            = nodeRoot.Nodes.Add("Group Footer");
            nodeGroup.ImageIndex = C_IMG_FOLDER;
            pAddCtrlsAux(report.getGroupsFooters(), nodeGroup, C_IMG_FOLDER, C_IMG_FORMULA, C_IMG_CONTROL, C_IMG_DATBASE_FIELD);

            nodeGroup            = nodeRoot.Nodes.Add("Footers");
            nodeGroup.ImageIndex = C_IMG_FOLDER;
            pAddCtrlsAux(report.getFooters(), nodeGroup, C_IMG_FOLDER, C_IMG_FORMULA, C_IMG_CONTROL, C_IMG_DATBASE_FIELD);

            nodeRoot.ExpandAll();
        }
Пример #3
0
 private void cmd_search_Click(object sender, EventArgs e)
 {
     if (tx_toSearch.Text.Trim() == "")
     {
         cWindow.msgInfo("You must input some text to search");
     }
     else
     {
         cReport report = m_editor.getReport();
         searchInSections(report.getHeaders(), csObjType.iTypeSec);
         searchInSections(report.getGroupsHeaders(), csObjType.iTypeSecG);
         searchInSections(report.getDetails(), csObjType.iTypeSec);
         searchInSections(report.getGroupsFooters(), csObjType.iTypeSecG);
         searchInSections(report.getFooters(), csObjType.iTypeSec);
     }
 }