Hi Axnbie
You will have to run your report via a class. I did an example for you in a project that I attached.
Varden Morris
J. Wray & Nephew Ltd. - Group I.S.
Phone: (876) - 923 - 6141 Ext. 2226
Fax: (876) - 923 - 5372
Cell: (876) - 3833566
Email: [EMAIL PROTECTED]
axnbie <[EMAIL PROTECTED]> wrote:
Report Worked!!!
how do I pass a parameter to the procedure before running the
report? I was wondering, If I could create a form with a control to
enter the parameter and open the report from the form... If this
would work, can you help me with the code to do the same?
"myResult = myStatement.executeQuery("RemoteProc 1234");"
Thnx
Axnbie
--- In Axapta-Knowledge-Village@yahoogroups.com, Varden Morris
<[EMAIL PROTECTED]> wrote:
> 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.
>
>
> Yahoo! Groups SponsorADVERTISEMENT
>
>
> ---------------------------------
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/Axapta-Knowledge-Village/
>
> To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service.
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Small Business - Try our new resources site!
Sharing the knowledge on Axapta.
Do you Yahoo!?
Make Yahoo! your home page
Sharing the knowledge on Axapta.
Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/Axapta-Knowledge-Village/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
BDIS_ParameterExample.xpo
Description: BDIS_ParameterExample.xpo