Examples of XGroups


Examples of com.sun.star.report.XGroups

        if (m_aGroupNames == null)
        {
            return;
        }

        final XGroups xGroups = getReportDefinition().getGroups();
        final int nLeftPageIndent = getLeftPageIndent();
        final int nLabelWidth = getMaxLabelWidth(); // 3000;
        final int nUsablePageWidth = getPageWidth() - getLeftPageIndent() - getRightPageIndent() - getLeftGroupIndent(getCountOfGroups());
        final int nFieldWidth = nUsablePageWidth - nLabelWidth;

        // after done with all groups, we need access to the last group, for set property 'KeepTogether' so we remember it.
        XGroup aLastGroup = null;

        for (int i = 0; i < m_aGroupNames.length; i++)
        {
            final XGroup xGroup = xGroups.createGroup();
            aLastGroup = xGroup;

            // TODO: debug what the m_aGroupNames are, "field:[...]" or the "fieldname"
            xGroup.setExpression(m_aGroupNames[i]);
            xGroup.setHeaderOn(true);
            // we don't want any group footer (default off)
            // xGroup.setFooterOn(true);

            try
            {
                // we need to append by hand
                // TODO: documentation is unclear here, that we have to insert by hand
                int nCount = xGroups.getCount();
                xGroups.insertByIndex(nCount, xGroup);

                final XSection xGroupSection = xGroup.getHeader();
                copyGroupProperties(nCount);

                Rectangle aRect = new Rectangle();
View Full Code Here

Examples of com.sun.star.report.XGroups

            XSection xSection = null;
            SectionObject aSO = null;
            if (nGroups == 0)
            {
                // Spezial case, there is no Group.
                final XGroups xGroups = getReportDefinition().getGroups();
                final XGroup xGroup = xGroups.createGroup();
                xGroup.setHeaderOn(true);

                xGroups.insertByIndex(xGroups.getCount(), xGroup);
                xSection = xGroup.getHeader();
                copyGroupProperties(0);
                aSO = getDesignTemplate().getDetailLabel();
                aSO.setFontToBold();
            }
            else
            {
                final XGroups xGroups = getReportDefinition().getGroups();
                // we insert the titles in the last group
                final Object aGroup = xGroups.getByIndex(nGroups - 1);
                final XGroup xGroup = (XGroup) UnoRuntime.queryInterface(XGroup.class, aGroup);
                xSection = xGroup.getHeader();

                // We don't need to copy the GroupProperties, because this is done in the insertGroup() member function
                // copyGroupProperties(0);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.