Many a times Baan developer comes across a question to print a report / process logic based
on certain enum values only (which may not necessarily in from-to range). At this point of time
developer has to say no to such request (At least in Baan IV) in the absence of clear guidelines
For such a request , if user follows following steps, he/she can accomplish the objective easily.
1. write following function in 1 dll .
function extern return.enum.booleans(long setval, ref domain tcbool enm())
for i = 1 to 32 step 1
enm(i) = setval \ 2
setval = setval / 2
2. The enums for which specific values are desired , need to be copied as a 'set' to another domain
with same enum options. Set allows multiple selection.
3. Convert to runtime.
4. Forms on which specific enum values are desired , this new set field has to be included.
5. In the program , call the funtion written in dll in before choice section of print.data or
return.enum.booleans(etol(setfield) , enm)
6.In the main processing select after selectdo , you need to add following condition before other
if enm(etol(enmfield)) then
|....normal program logic
7.Also Declare enm tcbool with 32 dimensions in the same program
8.Include the dll in step 1 above before compiling the program.
You have accomplished the desired objective.The only disadvantage could be it will select
all records with all enum values . In some case it may lead delayed performance.
Another disadvantage could be that maximum set options could be 32 only (I have not tested beyond 32 but I feel it will not work) whereas enums could be upto more than 32 upto 255 ( as in case of domains tctror,tcfitr etc)
Same instructions are also contained in text file attached.