Skip to Content
author's profile photo Former Member
Former Member

How to get the report query from java

Hi,

I need to get the report query of an rpt file when calling it from java.

Is there any method to do that??

Thanks.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Oct 13, 2008 at 12:03 PM

    Hello Elie,

    -You can get query of a report from SDK point of view using getCommandText() method.

    -Since you have not specified which Java SDK are you using, I will try to explain the steps from JRC SDK.

    -There is no direct method or class to return SQL command at runtime using JRC. However you can use the method from RAS SDK to acheive this functionality in JRC. That is, you need to use latest eclipse jar files to make use of RAS method in JRC.

    -The steps will be as follows :

    //Obtain collection of tables from this database controller.

    Tables tables = databaseController.getDatabase().getTables();

    ITable table = tables.getTable(i);

    ICommandTable ic= (ICommandTable) table;

    // Command can be obtained from the report using getCommandObject() method

    command=ic.getCommandText();

    Thanks,

    Chinmay

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.