staugner
13th November 2002, 19:02
I need to show item issues by date (1999 issues, 2000, issues, etc.) and don't know how to code it. The problem is that when it searches for the 1999 issues, if it does not find the item code it tosses out that record and does not look in 2000, 2001, etc.

If I use an 'or' statement, it will only give me the issues for the 1st year it finds, and not for all of the years.

I am a beginning programmer and would appreciate any help.

Here is what I have tried:

where ttayear.item = tdinv001.item
and ttbyear.item = tdinv001.item
and ttcyear.item = tdinv001.item
and ttdyear.item = dtinv001.item
and ttayear.year = 2002
and ttbyear.year = 2001
and ttcyear.year = 2000
and ttdyear.year = 1999

tjbyfield
13th November 2002, 19:25
Staugner

I am not sure what tables the ttayear, ttbyear etc are. Are they aliases for the same table? If so you could try without the multiple tables something like the following...

where ttayear.item = tdinv001.item
and (ttayear.year = 2002 or ttayear.year = 2001 or
ttayear.year = 2000 or ttayear.year = 1999)
[could also use ttayear.year in (2002, 2001, 200, 1999) ]

If the are different tables you may be better off with separate selets for each one

Hope this helps
Terry

staugner
13th November 2002, 19:28
Thanks - the aliases are all for the same table (tdinv750). I will try your solution.

rupertb
14th November 2002, 08:38
Are you trying to display the item issue per period as in to the screen? Why not set up a display session of type 1? Single Occurence with main-table. Or is the data intended for print output? Why alias the table four times? Are you trying to display four years on one form?
By the way hardcoding variables is not good practice ...

staugner
14th November 2002, 15:04
Yes, I'm trying to display issues by item for four different years on the same form, thus the four aliases. Is this possible? It is to be a printed report...

rupertb
14th November 2002, 15:59
Can I create the report and send you the dumps, that'll start you off and then you can finish it?

staugner
14th November 2002, 16:02
That could be a tremendous help!

rupertb
14th November 2002, 16:04
OK, I'll have it ready in half an hour!

rupertb
14th November 2002, 16:54
Attached please find the dump archive I have created, use winzip (or similar) to extract ftp or file copy to your baan system. In baan go to tools/software distribution/internal import/export/import data dictionary supply the path to the dumps files, overwrite yes/no depending on the session (I've called it tdinvc470m000 - does it exist already? I hope not). At the option "write software to other package VRC" choose your customization VRC.

Click continue - once it's imported you may need to go to "maintain sessions" and change the session status from developing to finished, press save and then change it back to developing again and press save again. (sometimes this is necessary to register the object and session)


Good Luck,
Rupert

Paul P
18th November 2002, 11:29
Dear Sharon,

Just a thought. If you'd like to show such report on your sales goods (ie you'd like summary of sales qty for year 1999, 2000, 2001, and 2002) it can be done easily with Sales Statistics (SST) module. It can produce this timewise column arrangement with no problem.

Rgds,
Paul

staugner
18th November 2002, 15:43
Thanks Paul, but we haven't activated the Sales Statistics module at this time...

Paul P
19th November 2002, 02:55
Sure thing, Sharon :) . It's just a thought :) . By the way, should you decide to implement it in the future, pls be informed that this SST module is a reporting module only. It doesn't have any impact on any other business process. Should the time come and you need assistance, I and many other BB members will surely be happy to help :) . Have a nice day!

Rgds,
Paul

staugner
19th November 2002, 22:16
Thank you Paul, I appreciate it. There are many parts of Baan that I'd like to see implemented!

staugner
20th November 2002, 19:57
Rupert, you are amazing! I just got your dump files into my system and it's as pretty a solution as I've ever seen. Many thanks,

Sharon