How can i possible sort a report using a variable in my codeunit. The report is suppose to display arrears and also the number of months not paid.. I want the report to be sorted by number of months not pay.
Thank you..
[/code][/quote]
yes, you're right...i am pretty occupied...
create a new table with 2 fieds: "number of months not pay","document no."
PK of the table: "number of months not pay","document no."
i think this one is clear...
declare this table as temporary in your report, and when you calculate the no. of months, fill the table with this number and the document no.
in your rpt, declare a rec variable (temporary = yes) that point to the new table you have just created.
fill this table: field "number of months not pay" becomes the number of months you want to use to order the report.
"document no." becomes the actual document number you're processing.
after filling the table, you have to add a new dataitem(Integer table) and use it to loop into the temporary table: you read the first record e.g.:
field1=1 field2=INV08001
you do a GET on the table you need in your report (e.g. posted sales invoice) using the 'INV08001' and then show all the data you want.
for more info about showing a temporary table in a report, try to search the forum!
-Mirko-
"Never memorize what you can easily find in a book".....Or Mibuso My Blog
Comments
PK of the table: "number of months not pay","document no."
declare this table as temporary in your report, and when you calculate the no. of months, fill the table with this number and the document no.
after that, use the table to get the document nos ordered by "number of months not pay" and show your info in an integer dataitem
hope it's clear
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
Thanks[/quote][/code]
yes, you're right...i am pretty occupied...
i think this one is clear...
in your rpt, declare a rec variable (temporary = yes) that point to the new table you have just created.
fill this table: field "number of months not pay" becomes the number of months you want to use to order the report.
"document no." becomes the actual document number you're processing.
after filling the table, you have to add a new dataitem(Integer table) and use it to loop into the temporary table: you read the first record e.g.:
field1=1 field2=INV08001
you do a GET on the table you need in your report (e.g. posted sales invoice) using the 'INV08001' and then show all the data you want.
for more info about showing a temporary table in a report, try to search the forum!
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog