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

RBServer, DOA and multiple table spaces error.

edited May 2006 in Server
In the ReportBuilder server application I am working on, we connect to
an Oracle database, let's call it DATABASE1, via DOA and daDade. Within
that database, there is a table space, call it TS1, prefaces the
RB_FOLDER and RB_ITEM so that that the qryFolder and qryItem queries
look like:

select R.*, R.rowid
from TS1.RB_Folder

and

select R.*, R.rowid
from TS1.RB_Item

When I try to run a report in that table space, I get the following error:

Processing request for Report Report Explorer
Database\Busn_PropReleaseForm EDataError, TdaSession.GetDatabaseForName:
No TOracleSession object found for specified name, DATABASE1. A seperate
database connection is required for each thread.

I *MUST* use table spaces and DOA for this particular project as the
reports were created using ReportBuilder and DOA.

daODAC handles the table space okay, but then the reports fail because
they were written using DOA.

What must I do to get this to work properly?

I am using ReportBuilder Server 10.2. The client and servers are based
off the demos provided with RBS.

Thanks,

Charles

Comments

  • edited May 2006

    - In your example, is there a TOracleSession component named DATABASE1 that
    resides on the datamodule that contains the report volume?

    - As a first incremental step, test runing these reports in a standard RB
    EndUser application, like the one installed to RBuilder\Demos\EndUser
    Databases\Oracle\DOA. Does that work correctly? If yes, then you should be
    able to configure the report volume to do the same.

    - When the reports were created, DOA was used and the Designer.DataSettiings
    were used to create the DOAQueryDataViews. The Datasettings are saved as
    part of the query definition. When the report loads, there needs to be a
    TOracleSession that resides on the report volume container (the
    datamodule)and with the correct database name.

    - We have customers using both DOA and ODAC successfully. If you prefer ODAC
    and want to migrate to that, the following article discusses how to convert
    templates from type of plug-in to another. The example uses BDE to ADO, but
    the same concepts apply.

    -------------------------------------------------
    Tech Tip: Convert BDE Template Dataviews To ADO
    -------------------------------------------------

    Currently when DADE is used to create dataviews, the DatabaseName is stored
    as part of the query definition. (This is consistent with Delphi's approach
    to specifying a database connection for a Query object).

    When you created the reports originally, the daDBBDE.pas BDE DADE plugin was
    used. Now you want to use ADO. You've already changed the
    Designer.Datasettings but this had no effect on the old reports. They still
    try to use the BDE connection. Changing the Designer.DAtaSettings only works
    for new dataviews that are created, because the new query dataviews are
    using the daADO.pas ADO DADE plugin.

    In order to convert the templates from BDE to ADO, at the minimum you have
    to change the database name and the DADE plugin class names that are stored
    in the templates. When a BDE dataview is created, its class type is a
    TdaBDEQueryDataview. When an ADO dataview is created, its class type is
    TdaADOQueryDataview. These class types are stored in the template. These
    have to be changed before the template is loaded into a report.

    First, compare a BDE report template to an ADO report template which both
    connect to the same database table. Save a BDE and an ADO based report
    template to separate ASCII text files. Now compare the dataview definitions.
    Change the TdaBDEQueryDataview class name to TdaADOQueryDataview in the BDE
    template. Change the BDE alias to your ADOConnection object. Then compare
    the table name and field names of the BDE template to the ADO template and
    change them accordingly, removing the .db extension on the table name is
    necessary. Now load the converted BDE template in your ADO end user
    application.

    The first step is to make a backup of all your templates before continuing
    with a programatic approach. You can convert the templates programatically
    by loading the ASCII template files to a TStringList object. Then loop
    through the lines of the list and change the text programatically. You can
    loop through the files in a directory using ppFileUtils.pas calling the
    GetFileNamesForDirectory procedure to load the file names.

    If you have binary report templates, you'll also be able to convert these
    with an extra couple of steps. You can load the binary template file into
    ASCII format, modify it, and then save it back to binary as shown in the
    example links below. Keep in mind the conversion is performed without
    loading the report template into a TppReport.


    This example shows how to load reports stored to the ReportExplorer database
    tables and convert them to ascii text.

    http://www.digital-metaphors.com/tips/EditTemplatesAsText.zip


    This example shows how to convert an .rtm file to asii text


    http://www.digital-metaphors.com/tips/ConvertBinaryTemplateToASCII.zip



    --
    Tech Support mailto:support@digital-metaphors.com
    Digital Metaphors http://www.digital-metaphors.com




    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.