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

Resetting of Outline nodes from current page.

edited February 2004 in General
Hi,

I have created a report that allow the user to edit the data fields
behind a memo field and redraw the page in the preview screen and now I
have come to the next issue.

In the Outline tree in the preview screen, if the user enters data
within the field that causes a change in the pagination, the data in the
outline field does not get updated with the new information so the
outline becomes useless for all the subsequent pages.

Is there any way around this? I would accept have the '..more..' button
put back on the outline and all subsequent {offending) nodes removed.

Mark Davis
Elite Practise Solutions.

Comments

  • edited February 2004
    Hi Mark,

    How are you re-drawing the page? If you call Report.Reset, this should
    reset the report engine as well as the report outline. If you are not
    already, try calling Report.Reset after changing the fields in the report.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2004
    Nico Cizik (Digital Metaphors) wrote:

    Hi Nico,


    My code for redrawing the page is as follows.


    I have included the Reset but it seems as if I have to reset the engine
    rather then reset the report. The outline is updated but only when you
    scroll through all the pages in the report.

    Mark Davis
    Elite Practice Solutions.


    procedure TForm2.RedrawThePage(aReport: TppReport; aResetPageNo: Integer);
    var
    lScreenDevice : TppScreenDevice;
    lViewer : TppViewer;
    begin

    lViewer := TppViewer(aReport.PreviewForm.Viewer);
    lScreenDevice := lViewer.ScreenDevice;

    aReport.ResetFromPageNo(aResetPageNo);

    lScreenDevice.PageRequest.PageSetting := psSinglePage;
    lScreenDevice.PageRequest.PageRequested := aResetPageNo;
    lScreenDevice.MakePageRequest;
    lScreenDevice.RenderPage;

    lViewer.RefreshPage;

    // aReport.Reset;
    aReport.Engine.Reset;
    // aReport.Outline.Initialize;

    end;
  • edited February 2004
    Hi Mark,

    Unfortunately, this is the way the outline works when you reset a report, or
    first load the report. You will see that the outline is not present in it's
    entirety until you browse to the last page of the report. Try setting the
    Report.PassSetting to psTwoPass so the pagination will be calculated before
    the report is displayed and the outline will be able to calculate itself
    before displaying as well.

    --
    Best Regards,

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