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

ADOConnection and Report Designer!

edited March 2003 in RAP
Hallo,

I have two questions.
1)
How can I read from ADOConnection the DatabaseType and add it to property
from Designer ppDesigner.DataSettings.DatabaseType?
2)
I'm writting PassThrough function to get the AutoSearchDescription from
Report.
The trouble that I get is how to get the access to Report if I don't want to
write function with delivery from Report parameter
(not like "function GetSearchCondition(ppReport: TppReport): String;", but
rather "function GetSearchCondition: String;")
and further problem is, what if I have subreport. How can I differ between
subreport and mainreport in this case.

Greetings,
Stasa

Comments

  • edited March 2003
    1. I would try to parse out the provider entry in the connection string.
    The provider is going to be different for each of the ADO drivers. For
    example on my machine, if I connect to MS SQL Server using the OLE DB
    provider, the provider is called SQLOLEDB. If I connect to Oracle using the
    OLE DB provider it is called MSDAORA.

    2. You can call Report.GetAutosearchDescriptionLines in RAP.

    If you don't want to pass the report as a parameter, then you'll have to
    connect the RAP pass through functions to the report by using a global
    delphi variable that points to the TppReport on the form where the templates
    are loaded. If you only have one TppReport in your application, then there
    should be no problems, otherwise, you have to remember to switch the pass
    through functions (well, switch the report that the global variable is
    pointing to anyway) to use the active TppReport object that the user is
    using.

    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.