Declare price in classdeclaration
Add a display method to your report, that returns price
Make a programmablesection that prints your display method, you could name it printPrice and set autodeclaration to yes
in your loop, you call element.executesection(printPrice)
I don't know where you get the idea that return shouldn't break your loop, a return statement stops executing the method and returns to caller.
Regards
Jan S Dahlsgaard
Fujitsu DK
________________________________
Fra: [email protected] [mailto:[EMAIL PROTECTED] På vegne af Vanessa kajtaz
Sendt: 7. december 2005 08:56
Til: [email protected]
Emne: SV: Re: [development-axapta] return break my while loop
Thanks for your answar
I want to print a field value to the report.
I think I need send method , but I do not know how to use send method , this is my code ,and I want to print a field value to the raport , but it works only one time. return break funktion.
//code
PriceDiscTable _PriceDiscTable;
while select *from _PriceDiscTable where _PriceDiscTable.AccountCode == 0 &&
_PriceDiscTable.ItemCode == 0 {
if(_PriceDiscTable.PriceUnit <1){
price = num2str(_PriceDiscTable.PriceUnit,0,3,1,0);
return price; //function breaks hear
else{
price = num2str(_PricediscTable.PriceUnit);
return price;
}
}
//code
kbi kbi <[EMAIL PROTECTED]> skrev:
Hi Vanessa,
Well, the return will end your function.
I am not sure what you want do, but if you want to print the string to screen, you should use Info(strFmt("This is the string:%1", yourStr));
If you want to print a field value to the report, you can use send(DatasourceName) method.
If you want to print to a UNBOUND control, you may have to create a programmable section then call the method execute() on your fetch() method
Vanessa kajtaz <[EMAIL PROTECTED]> wrote:
Hi,
I work with raport and I want to print out more then one string, but if I use
return strfmt(), than while loop breaks. I dont want to break while loop , there is more then one return ; If I use print it works and it prints in the print window, but I want to print in the raport. It works only one time and return break while loop.
If anyone knows?
[Non-text portions of this message have been removed]
SPONSORED LINKS
Computer part Programming languages Microsoft axapta Support exchange
---------------------------------
YAHOO! GROUPS LINKS
Visit your group "development-axapta" on the web.
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
---------------------------------
Yahoo! Personals
Single? There's someone we'd like you to meet.
Lots of someones, actually. Try Yahoo! Personals
---------------------------------
Yahoo! Personals
Single? There's someone we'd like you to meet.
Lots of someones, actually. Yahoo! Personals
[Non-text portions of this message have been removed]
SPONSORED LINKS
Computer part Programming languages Microsoft axapta Support exchange
---------------------------------
YAHOO! GROUPS LINKS
Visit your group "development-axapta" on the web.
To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
---------------------------------
[Non-text portions of this message have been removed]
SPONSORED LINKS
Computer part <http://groups.yahoo.com/gads?t=ms&k=Computer+part&w1=Computer+part&w2=Programming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=yLpvcLTIDJ5FTkRJGsO11w> Programming languages <http://groups.yahoo.com/gads?t=ms&k=Programming+languages&w1=Computer+part&w2=Programming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=cuhEClK4dU4wapXFmKisbQ> Microsoft axapta <http://groups.yahoo.com/gads?t=ms&k=Microsoft+axapta&w1=Computer+part&w2=Programming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=yfeG_U6QaLfPOZZIud02Fg>
Support exchange <http://groups.yahoo.com/gads?t=ms&k=Support+exchange&w1=Computer+part&w2=Programming+languages&w3=Microsoft+axapta&w4=Support+exchange&c=4&s=90&.sig=hy8yRGMzrmxdphyITTUeqA>
________________________________
YAHOO! GROUPS LINKS
* Visit your group "development-axapta <http://groups.yahoo.com/group/development-axapta> " on the web.
* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
* Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> .
________________________________
[Non-text portions of this message have been removed]
YAHOO! GROUPS LINKS
- Visit your group "development-axapta" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

