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

Report showing only one line

edited January 2008 in General
Hello!

1. Why does the report only show one record when several were selected in a
query.

2. During Drag and Drop of data fields double fields are being added to the
report designer.


begin
with rptQuery Do
begin
close;
sql.clear;
Sql.Add('Select *');
Sql.Add('from Payments');
sql.Add('Where Date_Paid between "11/1/2007" and "11/15/2007"');
open;
rptBooks.devicetype := dtscreen;
rptBooks.template.FileName := 'C:\Test\Payments.rtm';
rptBooks.template.LoadFromFile;
rptBooks.Print;
end;
end;

Delphi 2007 win 32
ReportBuilder 10.07
Windows Vista Ultimate;

Comments

  • edited January 2008
    Hi Richard,

    1. Be sure the report is connected to the proper datapipeline. You can do
    this at runtime after the template has loaded in the Template.OnLoadEnd
    event...

    Report.Datapipeline := myDataPipeline;

    Another option is to connect the datapipeline at designtime when the
    template is loaded and resave the template to file.

    2. Try connecting a DBGrid to the query you created and see if the proper
    data is being displayed. ReportBuilder simply traverses the data it is
    given. Also be sure you are placing the DBText objects in the detail band
    of the report.

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