Home Server

Oracle Demo

edited October 2006 in Server
I am trying to get the Oracle server demo to serve up some content to my
client. Unfortunately I keep getting a ORA-01722 error. I know the
database works as I have got RB to work against and create reports.

What have I forgotten or set incorrectly?

Regards
Charles

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

Comments

  • edited October 2006

    If you have reports that are stored in the report explorer database tables
    (rbFolder, rbItem) and are using DOA, then in the end-user report explorer
    project you will have used a TOracleSession component along with some
    OracleDataSet components.

    The simplest way to configure the ReportExplorerVolume is to use the
    cliboard to copy/paste the relevant components from the end-user form to the
    datamodule that contains ReportExplorerVolume.

    At a minium, when you configure the ReportExplorerVolume component, you will
    want to use a TOracleSession component that has the same Name and other
    property values as the TOracleSession that you used in the end-user report
    explorer project.

    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2006
    I copied the components for the item template information and now the
    client can connect and browse the directories. The problem now is I cannot
    open the report templates. The message I am getting in 'Invalid Template
    Format'.

    I believe the following is the problem. These reports have been created
    using my own inherited version of the QueryDesigner called
    TmyQueryDesigner. (Created this is solution to another problem with the
    help of someone there at Digital Metaphors. I think Nico.) This works well
    in RB. I think I have included it in the server project correctly but I
    believe this is not the case.

    Can you please point me in the right direction?

    The reason I am confused is, I could open reports through the client
    before using the Report Template volume component. Now error!

    (I am using ReportTemplatevolume and ReportExplorerVolume on different
    data modules)

    Regards
    Charles

    --- posted by geoForum on http://delphi.newswhat.com
  • edited October 2006

    Try some incremental tests...

    - test using only the ReportExplorerVolume (remove the ReportTemplateVolume
    datamodule from the project).

    - test using only the ReportTemplateVolume (remove the ReportExplorerVolume
    datamodule from the project).

    - test using both

    The server does not use the query designer, but it will need the
    TdaQueryDataView descendant classes. If you are using DOA, then include
    daDOA.pas in the 'uses' clause. If you created a custom QueryDataView
    descendant class, then include that unit in the 'uses' clause.

    - See the following article...

    ------------------------------------------------------------
    Article: Registering Classes with the Server.
    ------------------------------------------------------------

    In order to minimize the overhead in reporting applications, ReportBuilder
    employs a unit level registration scheme (similar to component registration
    in Delphi.), whereby components and functionality can be added at the
    discretion of the developer. A report server application needs to include
    all of the classes required to execute the reports on the server.


    Unit Name Feature
    ---------- ---------------------------------------------------------------
    daDataModule DADE support. (DataModule related classes.)

    raCodMod RAP support (CodeModule related classes.)

    ppCTMain Crosstab support

    ppChrt TeeChart
    ppChrtDP Data-ware TeeChart

    myChkBox Checkbox components appear on the component palette when this unit
    is
    included.




    ReportBuilder also uses the unit registration scheme to control which
    database connectivity options are provided by the application. The following
    DADE plug-ins are provided with ReportBuilder (for more options see the
    friends | data | DADE Plug-ins section of our web site,
    www.digital-metaphors.com).


    Unit Name Feature
    ---------- ----------
    daDBBDE BDE support

    daADO ADO support

    daIBExpress Interbase Express support

    daDBExpress dbExpress support.

    daADS Advantage support.

    daDOA Oracle support via the Direct Oracle Access components.

    daIBO InterBase support via the InterBase Objects components.

    daDBISAM DBISAM support.


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

    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2006
    >Incremental tests Results...

    Report Displayed

    Invalid Template Format Error

    -ReportTemplateVolume
    Report Displayed
    -ReportExplorerVolume
    Invalid Template Format Error

    daDOA.pas and myQueryDataView.pas declared in the uses section on each
    datamodule.

    I thought I did what the article said but I am still experiencing the error.

    Regards
    Charles

    --- posted by geoForum on http://delphi.newswhat.com
  • edited October 2006

    - the next test should be to create a simple Delphi form application (i.e.
    non-server) that contains some code behind a button OnClick. The code should
    load the same report template as you tested with the ReportTemplateVolume.

    note: create this application from scratch, just as you do the
    ReportTemplateVolume. Add the same supporting components, such as the data
    connection component, and use the same names.


    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2006
    >- the next test should be to create a simple Delphi form application (i.e.

    I don't quite know what you mean by this. Everything I have been doing is
    based on the Demos and tutorials. So does one of these projects step the
    user through doing the code behind the button OnClick?


    PS.
    I worked out what caused the first error, ORA-01722, it was due to
    incorrect mapping between my db tables and the adapted demo mapping. Also
    the SQL in one of the original datasets was incorrect. A column was
    duplicated and item_type was not there at all.

    Regards
    Charles

    --- posted by geoForum on http://delphi.newswhat.com
  • edited October 2006

    Glad to hear you resolved the issues.

    I was recommending that you create a simple test application that can test
    loading the .rtm files and generating to preview. (Without having RB Server
    involved).

    In other words, create a simple test project that contains a single Form. On
    the Form place a TppReport and the data connection component. Also, on the
    Form place a Button and in the Button.OnClick call

    myReport.Template.FileName := 'c:\myOracleTestReport.rtm';
    myReport.Template.LoadFromFile;
    myReport.Print;

    If a report does not generate in the sever environment, then the first step
    to troubleshooting is to test the report in a form based environment.

    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited October 2006
    I am still getting the Invalid Template Format Error.

    I have tried to load a report from a form based environment as requested
    and it loaded. I loaded this report from a file not the database. I took
    one of the reports from within the database and saved it to a file. Does
    that matter?

    So how do I proceed now?

    Regards
    Charles

    --- posted by geoForum on http://delphi.newswhat.com
  • edited October 2006


    - if you have a form based app that can load an .rtm from file and you have
    a server based app (ReportTemplateVolume) that cannot load the same .rtm
    file, then compare the difference between the two.

    - simplify each application as much as possible. So the form based app
    should be have a single form with a single TppReport and data connection
    component. And the server based app should have a main form with a TrsServer
    and a DataModule with a ReportTemplateVolume and data connection component.

    - compare the 'uses' clause between the two, compare the methods (i.e. any
    event-handler code), etc.

    - when the .rtm is loaded on the server, an instance of the datamodule will
    be created in a thread on the server. A TppReport will be created for the
    datamodule and Report.Template.LoadFromFile will be called.

    - make sure that the DataModule provides a thread-safe container.

    You can try running the server app under the Delphi debugger with
    RBuilder\Source in your Delphi library path and the debugger set to break on
    Delphi language exceptions. When the exception occurs, check the call stack.

    If you create a simple example that we can run here, you can email to
    support@digital-metaphors.com and we can check it out here. Use only
    standard Delphi components and RB (and perhaps DOA if that is what you are
    using to connect to Oracle).



    --
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

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