hi Ryan
find this as ur solution
static void Job1(Args _args)
{
str sql;
accountNum acno1;
salesId s;
int i;
str k;
real r2;
Connection Con = new Connection();
Statement Stmt = Con.createStatement();
Statement Stmt2 = Con.createStatement();
ResultSet R,R1;
sql = " SELECT
Sum(SalesLine.RemainSalesPhysical*SalesLine.SalesPrice),SalesLine.salesID
FROM SalesLine GROUP BY SalesLine.salesID";
R=Stmt.executeQuery(sql);
while (R.next())
{
r2 = r.getReal(1);
s = r.getString(2);
Print acno1;
print num2str(r2,14,2,0,0) + " " + s;
}
pause;
}
regards
Nitesh
----- Original Message -----
From: "rzillmer" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, March 11, 2005 9:16 PM
Subject: [development-axapta] using group by and calculated fields
>
>
>
> Hello, I am new to Axapta so please forgive me if this is an easy
> question.
>
> I am trying to make a calculated field and a group by in the same
> query. This is the query I'm trying to reproduce in Axapta:
>
> SELECT Sum(SalesLine.RemainSalesPhysical*SalesLine.SalesPrice),
> SalesLine.salesID FROM SalesLine GROUP BY SalesLine.salesID;
>
> If you don't understand that, I'm trying to retrieve the total
> amount for all the physical remaining on each sales order. I am
> open to an easier way to do this if anyone knows of one.
>
> I am trying to use as little code as possible in my reports but am
> willing to use code if that is the only way to accomplish this.
>
> Thanks in advance for any help!
> Ryan
>
>
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

