Пример #1
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();
        }
Пример #2
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);
     }
 }