Skip to Content
avatar image
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 comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    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 comment
    10|10000 characters needed characters exceeded