Home Subreports

Endless page

edited January 2008 in Subreports
Does someone know why I have an endless page
My report looks like:

Detail band with subreport. In this subreport (srPosition) i have some
DBMEmo, TDBtext components and another subreport (srPositionDetails)
In srPositionDetails I have DbMemo and DBText but if i have only label
is the sam. All subreports have DynamicHeight
Everything is ok when i have small number of PositionDetails. But I have
for example one position with 130 PositionDetails I get endlesspage.
I try increase margin, change BottomOffset, stopPosition, OverFlowOffset
on srPositionDetails but i haven't any result.


I have Report builder Professional Edition 7,92

Maciej Majewski

Comments

  • edited January 2008

    RB 7.04 was the last produced release for RB 7.x. Check the Help | About box
    of the report designer to determine what version you are using.

    Check the detailband.PrintHeight is set to phDynamic for all subreport.

    As a test try commenting out all event-handler code associated with the
    report. Make sure there is no code that manipulates the dataset in any
    manner while the report is generating - this can cause the report engine to
    get lost.

    One troubleshooting technique is to save a copy of the report and then start
    simplifying it incrementally until it starts working properly - then go
    forward from there incrementally so that you can isolate the issue.

    If you are using D6 or later, then try downoading a trial version of RB
    10.07 and perform the same test.

    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited January 2008
    Nard Moseley (Digital Metaphors) napisal(a):
    Thank You. I spend couple hours on this problem but I found. On
    aftrescroll query my position there was opening and closing position
    details query. I have changed it.Now On aftrescroll event I only
    filter query and it works. :)
  • edited January 2008

    Below is an artice on linking queries. (Do not use the AfterScroll event).


    ------------------------------------------------------
    Tech Tip: Linking SQL Queries for Master/Detail Data
    ------------------------------------------------------

    The following example shows two options for linking SQL queries to create a
    master/detail relationship.

    In this example, we are using Delphi's DBDemos data to create a
    Customer/Order relationship. Thus we wish to link the Orders detail to the
    Customer master.

    I. Delphi Query Linking
    ------------------------

    a. Set the detail TQuery.DataSource property to point to the master
    query's TDataSource component.

    b. In the SQL "Where" clause for the detail query use a ':' followed by
    the linking field name from the master:

    example
    select *
    from orders
    where orders.CustNo = :CustNo

    Now each time the master record position changes, the detail query will
    automatically be refreshed with the correct result set.


    II. RB DataPipeline Linking
    -----------------------------

    a. Set the detail DataPipeline.MasterDataPipeline to point to the master
    DataPipeline.

    b. Use the detail DataPipeline.MasterFieldLinks property to define the
    linking relationship

    c. In the SQL for the detail, retrieve all records and sort them by the
    linking master field:

    select *
    from Orders
    order by CustNo


    III. Manual filtering
    ---------------------

    use the master datapipeline.OnRecordPositionChange event to filter the
    detail data.

    example:

    detaildatapipeline.Close;
    detailDataPipeline.SQL.Text :=
    detailDataPipeline.Open;



    Notes:

    1. Using RB DataPipeline, each query is executed only a single time - thus
    performance is much faster.

    2. RB Professional and Enterprise Editions include a visual Data environment
    for creating SQL queries, defining linking relationships, and creating
    Ask-At-Runtime parameters. Using the RB tools you could create the above
    linked queries in about 10 seconds.


    --
    Tech Support mailto:support@digital-metaphors.com
    Digital Metaphors http://www.digital-metaphors.com


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

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