Hi Axnbie
 
Try the following:
 

ClassDeclaration

 

Str Var1

Str Var2

…..

 

 

Add a programmable section to the report and create display method for the variables:

 

Display str Var1()

{

            Return var1;

}

 

Display str Var2()

{

            Return var2;

}

 

Drag and drop the methods on the programmable section.

 

 

Fetch

…..

 

while (myResult.next())

{
    Var1 = myResult.getString(1);
    Var2 = myResult.getString(2);

Elment.execute(1);  //execute the programmable section with //ControlNumer property = 1     

}

 

Varden Morris

 

J. Wray & Nephew Ltd. - Group I.S.

234 Spanish Town Road

Kingston 11, Jamaica, W.I.

 

Phone:  (876) - 923 - 6141 Ext. 2226
Fax:      (876) - 923 - 5372

Cell:      (876) - 3833566
Email:   [EMAIL PROTECTED]

            [EMAIL PROTECTED]    



axnbie <[EMAIL PROTECTED]> wrote:


I have the following code to retrieve information from another SQL
instance from axapta. I am looking for help to display the
information returned in a report.

static void Job1(Args _args)
{

    LoginProperty LP = new LoginProperty();
    OdbcConnection myConnection;
    Statement myStatement;
    ResultSet myResult;
    LP.setDSN("SQLFIS1");
    try
        {        myConnection = new OdbcConnection(LP);
    }
    catch
      {        info("Check username/password.");
    return;
    }
    myStatement = myConnection.createStatement();
    myResult = myStatement.executeQuery("RemoteProc");
     while (myResult.next())
     print myResult.getString(1);
     Pause;
}








Sharing the knowledge on Axapta.



Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!

Sharing the knowledge on Axapta.


Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to