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

Repeating Rowes

edited August 2006 in Subreports
Hello !

1. I am using ReportBuilder 7.04 Professional, am I suppose to have a Query
Wizard Component, one does not show up for me ?

2. Why would I only get a single rowe returned in a report printout even
though the query is set to deliver a group of several rowes which is strange
because all the other queries work fine in this group here is the code :


var
Day1,Day2 :tDate;
begin
with dmBooks.qryBooks, Reports do
begin
Day1 := DlgSelectExpenseReport.DateTimePicker1.date;
Day2 := DlgSelectExpenseReport.DateTimePicker2.date;
close;
sql.Clear;
sql.add('SELECT Category, Amount_Paid');
sql.add('from Payments right join Vendors on Vendors.Account_Number =
Payments.Account_Number');
sql.add('WHERE Date_Paid Between :Day1 and :Day2');
sql.add('Group by Category, Amount_Paid');
Params[0].AsDate := Day1;
Params[1].AsDate := Day2;
open;
with qryBooks1, Reports do
begin
close;
sql.Clear;
sql.add('SELECT Deposit_Date, Deposit_Amount');
sql.add('from Income');
sql.add('WHERE Deposit_Date Between :Day1 and :Day2');
sql.add('Group by Deposit_Date, Deposit_Amount');
Params[0].AsDate := Day1;
Params[1].AsDate := Day2;
open;
ppUnRegisterDevice(TppTextFileDevice);
ppUnRegisterDevice(TppReportTextFileDevice);
dmBooks.Reports.devicetype := dtscreen;
template.FileName := ExtractFilePath('Bookkeeper.exe') +
'Reports\P&LDetail2.rtm';
template.LoadFromFile;
Print;
end;
end;

Comments

  • edited August 2006
    Hi Richard,

    The Query Wizard is available in DADE (data tab in the designer) for use in
    the creation of built-in queries within your report. From the data tab, you
    can select File | New from the main menu and are then given the option to
    use the Query Wizard or not.

    1. If you connect a DBGrid in Delpi to your query do you receive more than
    one row?

    2. Be sure your data is properly connected to a datasource and datapipeline
    and that your datapipeline is properly connected to the report object.

    3. Where are your data aware report components (such as DBText, DBMemo,
    etc.) located in the report? In order for ReportBuilder to traverse the
    data properly, they will need to be located in the detail band of the report
    or subreport.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2006
    When the New Items dialog appear I get the following :
    Report Wizard
    Report
    Crosstab Wizard
    Label Templates
    Query Wizard does not appear here.

    To answer your question about the grid, yes all the data appear in the grid
    when connected to the query

    The data is properly connected to the datasource and the pipeline component
    and the dbtext field values point to the proper pipeline

    The dbtext objects are installed in the detail band, I have about 12 reports
    and all work except this one.

    Will subreports have any effect on this problem ?

    Thanks
    Richard





  • edited August 2006
    Hi Richard,

    To see the Query Wizard you will need to select the File | New option from
    the Data tab in the designer. From your discription below you are selecting
    File | New from the Design tab of the designer.

    From the design of the subreport (i.e. selecting the subreport tab at the
    bottom), select the Report | Data menu option from the main menu. Then be
    sure the correct datasource is connected to the subreport.

    I would suggest working through the tutorials located in the ReportBuilder
    Developer's Guide. These tutorials give you a wealth of information about
    how DADE works and what it can be used for as well as how certain report
    components need to be set up such as subreports.

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