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

Report Explorer - LoadFromDatabase

edited March 2003 in End User
Hi

I have developed a End User Report Explorer.
I have converted the data acess components to DADE
I have saved the report template to the database.
I can run the program and all works well, the Report Explorer Launches, I
can change the report and save it back to the database, I can see the data,
I can add data fields etc. So this aspect works perfectly.

The only problem that I now have is loading and automatically printing the
report that has been saved to the database.
The following is the code that I am using:

EndUserRptExp.ppreport1.Template.DatabaseSettings.Name :=
'Overdue1'; // where overdue1 is the name of the report saved via the Report
Explorer
EndUserRptExp.ppreport1.Template.LoadFromDatabase;
EndUserRptExp.ppreport1.Print;

where EndUserRptExp = Form - where all the tables, datasources, pipelines,
data dictionary etc, for Report Explorer are located.

I realise that I may be doing something basically wrong - but I have been
going in circles for hours.

Any help - greatly appreciated
--
Regards


Trish Lee
Barcode Logic Pty Ltd
P.O. Box 62
Budgewoi 2262
NSW Australia
trish@barcodelogic.com.au
www.barcodelogic.com.au


DISCLAIMER
This e-mail and any attachments thereto may contain information which is
confidential and/or protected by intellectual property rights and are
intended for the use of the recipient(s) named above. Any use of the
information contained herein (including, but not limited to, total or
partial reproduction, communication or distribution in any form) by persons
other than the intended recipient(s) is prohibited. If you have received
this e-mail in error, please notify the sender either by telephone or by
e-mail and delete the material from any computer.


--
Regards


Trish Lee
Barcode Logic Pty Ltd
P.O. Box 62
Budgewoi 2262
NSW Australia
trish@barcodelogic.com.au
www.barcodelogic.com.au


DISCLAIMER
This e-mail and any attachments thereto may contain information which is
confidential and/or protected by intellectual property rights and are
intended for the use of the recipient(s) named above. Any use of the
information contained herein (including, but not limited to, total or
partial reproduction, communication or distribution in any form) by persons
other than the intended recipient(s) is prohibited. If you have received
this e-mail in error, please notify the sender either by telephone or by
e-mail and delete the material from any computer.

Comments

  • edited March 2003
    Trish,

    I tried your code and it seemed to work correctly. By default the print
    device is set to dtScreen. If you would like to go directly to the print
    dialog when you call Report.Print, you need to set the Report.DeviceType to
    dtPrinter. I used our end-user Report Explorer demo attached to the DBDEMOS
    database and added a direct print button with the following code in the
    handler.

    uses
    ppTypes;

    procedure TmyEndUserSolution.btnPrintClick(Sender: TObject);
    begin
    ppReport1.Template.DatabaseSettings.Name := 'Customer List';
    ppReport1.Template.LoadFromDatabase;
    ppReport1.DeviceType := dtPrinter;
    ppReport1.Print;
    end;

    If you can reproduce the problem using our demo, please send us an example
    and we'll take a closer look. (support@digital-metaphors.com).

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.