Hi everyone,
I'm having trouble doing a report in QAD. I am programming a report to make a sum of the ammounts in a group of accounts, and I give it as input to a function inside this program a range of dates (date0 and date1) to make the sum from date0 to date1.
How can I do to use the gr_ctrl table to take the range of dates from an specific month? For example, the user see this form:
Year: Period:
Date from: To:
The idea is that if the user puts in there year: 2009 and period: 9, the program automagically puts the dates from: 01-09-2009 to:30-09-2009.
It can be made using if-then-else logic, but I know/suppose there is a more elegant way to do this. I know that with gr_year and gr_per I can get the current year and period, but I don't know how to use this in my program.
Thanks a lot,
greetings!
I'm having trouble doing a report in QAD. I am programming a report to make a sum of the ammounts in a group of accounts, and I give it as input to a function inside this program a range of dates (date0 and date1) to make the sum from date0 to date1.
How can I do to use the gr_ctrl table to take the range of dates from an specific month? For example, the user see this form:
Year: Period:
Date from: To:
The idea is that if the user puts in there year: 2009 and period: 9, the program automagically puts the dates from: 01-09-2009 to:30-09-2009.
It can be made using if-then-else logic, but I know/suppose there is a more elegant way to do this. I know that with gr_year and gr_per I can get the current year and period, but I don't know how to use this in my program.
Thanks a lot,
greetings!