Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Outline Settings - collapse nodes

edited September 2009 in General
Hi there,

I have two groups: 'Year' & 'Date of meeting' and have enabled Outline
Settings. These work fine except that the whole tree view is extended when
the report is opened. Is there a way to collapse the nodes so that they
would only show, for example, a list of 'Years' initially but the selected
year would expand to show the dates when selected.

Many thanks

--
(\__/)
(='.'=)
(")_(")

Comments

  • edited September 2009
    Hi,

    For future reference, please use your real name when posting to these
    newsgroups.

    You can access the TppOutlineViewer object directly from the report in code
    using the OutlineViewer property of the PreviewForm. (Example below). The
    TppOutlineViewer object descends from the TTreeView class so you can try to
    call FullExpand or FullCollapse as needed in the PreviewFormCreate event.

    uses
    ppPrvDlg;

    procedure TForm1.ppReport1PreviewFormCreate(Sender: TObject);
    begin

    TppPrintPreview(ppReport1.PreviewForm).OutlineViewer.FullCollapse;

    end;

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

  • edited September 2009
    Nico,

    I tried that and it compiles OK but doesn't make any difference. I am using
    RB 11.06 for Delphi 6 Standard. Is it a version issue ?

    Thanks


  • edited September 2009
    Hello,

    Upon further research, the outline is not designed to be manually collapsed
    upon load. This is something we will consider enhancing for a later
    release.

    The main issue is that we do not have an event that fires late enought to
    collapse the outline on load. Currently the only option would be to create
    a custom previewer that perhaps overrides an event that fires after the
    Outline is generated (such as the OnPageChange event). From here you will
    need to perform something similar to what happens inside the
    TppOutlineViewer.OutlineFullCollapseEvent to get the effect you are after.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.