Home Subreports

Finding Component On Specific Page Of SubReport

edited March 2006 in Subreports
Hello

I have a Grid Pack DB Grid in my sub report. This grid is used to display
data and will be redrawn on each page until there is no more data.

I need to be able to find the grid that is displayed on the last page of the
report. When I can find this grid (not the 1 that is on the first page if
there is more than 1 page) I will then set some properties on the grid

Cheers

Paul

Comments

  • edited March 2006

    You might be able to check DataPipeline.Eof to try to determine when the
    report is reaching the end.

    Its difficult because the report does not know it is at the end until all
    pages have been generated - so its a timing thing.

    I suspect that the DataPipeline might work the same way. It does not know
    its at the end until you try go forward and it cannot. Not sure about that
    though.




    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited March 2006
    I have a way of working out if I am on the last page of this report the
    problem I have is that if I have a report with 3 pages there are 3 grids. I
    want to modify the bottom row of the grid on page 3

  • edited March 2006

    Do you mean the report layout has 3 subreports?

    The subreport.Report property provides access to the childreport. You could
    iterate over the Report.Bands[].Objects[] structure. There is also a
    FindUserObject method that you could call:

    FindUserObject(aUserName: String): TppCommunicator





    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited March 2006
    hi Nard

    My Report has 1 subreport

    In this sub report is a grid. When the grid fills a page the report goes
    onto the next page. Its the final grid that I want to change

    I use FindUserObject to get the grid but when I then make changes to the
    object returned the grid on the first page is changed not the one on the
    last page

    Cheers

    Paul

  • edited March 2006

    You place one grid on your report/subreport, then there is one Grid object.
    :)

    To conditionally change the properties of an object during report
    generation, you will typically use the detailband BeforePrint event. (Or
    perhaps the object's OnPrint event).

    Have you tried that approach?





    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.