kuldeepsharma
12th June 2006, 14:24
Hi,

I am biginer in baan customisation.

I have to write a report which should give me for the month and upto this month sales for a particular item.

I have developed a report which is giving me cumulative figures.

Now I want to add a field which should give me this month figures.

I think i have to give some condition while defining field layout.

What it could be, or may be some thing else

Can some body help me in this. this will be great and thanks in advance.

Kuldeep Sharma

en@frrom
12th June 2006, 15:51
Please give a clearer explanation of your requirement. I coulnd't make up from you rpost what your intention is...

kuldeepsharma
12th June 2006, 17:06
Sir,
I have written a report on tdsls045 table.
having following columns.

Item Group Group Name Delivered Qty upto this month Deliveriverd qty up this month.
-------------------------------------------------------------
tiitm001.citg tcmcs023.dsca tdsls045.dqua tdsls045.dqua


Kindly note that tdsls045.dqua should be printed only when month of tdsls045.invd equal to the current month.

Thanks

darpan
13th June 2006, 09:32
Hi Dear

Can u call me up at 09350203737 , 09313390704

It's not a difficult task u can just give a print Condititon in the Expression

and if need any clarifications pl'z fele free to ask me

Regards and All the best

Darpan

en@frrom
13th June 2006, 10:32
Ok, thanks for clarifying. So basically you want per item, the followinf information:
- item group
- item group descr
- quantity delivered before current month
- quantity delivered during the current month

Correct?

So you declare two variables of the same domain as tdsls045.dqua, you name them let's say hist.dqua and curr.dqua. Don't forget to initialize them before your main selection query.

Also declare another four variables of type long, call them for instance year, month, first.day & dummy. Before the main select (or in the before.program section or whereever you fancy..) you fetch the first day of the current month by using num.to.date(date.num(), year, month, dummy) and then first.day = date.to.num(year, month, 1).

(Hope these date functions work for Baan IV also, since dates work very different in Baan IV, without utc... However these functions are for number of days, so should work for Baan IV..)

The selection on tdsls045 has to be of course ordered by item. Now per selected tdsls045-record, you check the delivery date (in Baan V it is field dldt): if tdsls045.dldt < first.day then hist.dqua = hist.dqua + tdsls045.dqua else curr.dqua = curr.dqua + tdsls045.dqua every time an item changes and you send a report line, you will have to of course again initialize the variables hist.dqua and curr.dqua...

Hope this helps. Let us know please if you managed...

Regards,
En

kuldeepsharma
13th June 2006, 17:11
Thanka a lot sirs

I am able to genrate the desired report by your help

mbdave
19th June 2006, 10:02
u can use a baan function for getting month in report script then add that mnth as long no. in report sorting and add a after field in report layout for that mnth field.duri9ng that also keep track on a year change.

Hi,

I am biginer in baan customisation.

I have to write a report which should give me for the month and upto this month sales for a particular item.

I have developed a report which is giving me cumulative figures.

Now I want to add a field which should give me this month figures.

I think i have to give some condition while defining field layout.

What it could be, or may be some thing else

Can some body help me in this. this will be great and thanks in advance.

Kuldeep Sharma