BaBernd
15th March 2015, 16:15
Hello to all,

I'm new in developing Baan reports for Infor LN. So I wonder if it is possible to add a "question" within a Report to get a Yes/No-answer from the user in advance of executing the Report itself.

I found some remark that executing a "message" out of reports is possible but not a "question". But from a message I've get no Yes/No-decision.

Is there another methode possible? Or can I execute a "question" out of reports and how I have to do the coding?

Best Regards
Bernd

bhushanchanda
15th March 2015, 22:17
Hi,

Yes. It is possible.

You can use ask.enum() function in your report script's before.program section.

You can create your question with tcyesno type of domain and provide a default answer. Now all you need to do is, code your logic in your report script and its done.

e.g.

ret = seq.open( filename, "w" )
while ( ret <= 0 )
if ( ask.enum( "tccom00001", tcyesno.yes, ret, filename )
= tcyesno.no) then
return
endif
ret = seq.open( filename, "w" )
endwhile


OR

before.program:
if ( ask.enum( "my_question_code", tcyesno.yes)
= tcyesno.no) then
|...Do what you want to do here..if user presses NO
endif
endwhile

BaBernd
16th March 2015, 10:58
Hello Bhushan,

I've took your second solution, but without the "endwhile" ;-).
It works very fine. Thanks a lot.

Best Regards
Bernd