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

SubReports using columns not printing the entire subreport and one 1 record per band

edited December 2005 in Subreports
Hello, I am having problems with my subreport not printing the entire
subreport.

I have a report, with a subreport in the detail band of the main report. 2
pipelines. 1 pipeline is attached to the main report, the 2nd pipeline is
attached to the subreport.
In the subreport I have 2 columns, column header with text labels on it. In
the detail band I have 4 dbtext components. These dbtext fields are
connected to the 2nd pipeline. Nothing in the column footer. And a summary
band that has dbcalc components 3 of them and they are connected to the 2nd
pipeline. During run time, in the detail band before generate, I assign
something to qry. And then open the qry. This qry contains the data for the
2nd pipeline.

The problem: When the subreport prints, most of the time there should be
more than on row printed. Only one row is being printed. Also the column
headers and summary band is not showing up. I dont understand why they are
not printing?

Can you help. I have attached one page of the report.

Comments

  • edited December 2005

    - Please do not post attachments to the newsgroups and please post to only a
    single newsgroup - do not crosspost. The newsgroup guidelines are listed on
    the following page

    http://www.digital-metaphors.com/support/newsgroups.html

    - The ReportBuilder Developers Guide contains tutorials on building
    master/detail reports. Additional examples are installed to
    RBuilder\Demos\Reports\Demo.dpr.

    - The Tech Tips newsgroups contains a number of useful articles. I have
    posted a relevant article on linking datasets below. This article is from
    the Data Access thread of the tech tips newsgroups. Please use one of the
    techniques listed below to link the data. The technique you are attempting
    will not work properly with the report engine.

    ------------------------------------------------------
    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


    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







    Best regards,

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