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

DefaultADOConnection login prompt.

edited November 2006 in End User
Dear all,

I am using Report Builder 10.4 Professional with SQL Server and Delphi
2005:

1) We implemented an End User Report application where user can design a
report (a membership card with name, member expiry date and photo...).
This report is then saved to a template RTM file on disk.

2) There is another Main application that maintains membership records.
There are ppReport1, ppDBpipeline, datasource components on the Main
application that are responsible for running the membership card report
described ealier.

3) Every time the Main application loads a member record from database
we try to load the appropriate RTM file from disk to display a
membership card:

ppReport1.Template.FileName := 'C:\temp\Photo Template1.rtm'
ppReport1.Template.LoadFromFile;
filename := 'MemberPhoto.jpg';
ppImage1.Picture.LoadFromFile(filename);
ppViewer1.Report := ppReport1;
ppReport1.PrintToDevices;

4) But this is my problem: there is a DefaultADOConnection login dialog
prompted when ppReport1.PrintToDevices statement is executed. How do I
disable the login prompt in this instance? I understand there were 2 ADO
connections hence the login dialog is prompted. Maybe I should pass the
Main's ADO connection to the End User Report application?

5) Are there a better way than what I am doing now?


Thank you in advance on your support.

Regards,

Victor



--- posted by geoForum on http://delphi.newswhat.com

Comments

  • edited November 2006
    Hi Victor,

    Are you using DADE to access you data from the report? By default, if a
    connection is not defined in DADE, the daADO plugin will try to connect to
    the default connection and retrieve your data. If you are using DADE, be
    sure you have defined the proper ADOConnection component in the Data
    Settings before you load the template.

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