virus1002
9th August 2010, 19:40
Hello everyone! I'm having a problem with choice.print.data.
The code inside on.choice is not executing. When I debug this piece of code, the execute(print.data) function isn't doing anything, and the control skips directly to the choice.print.data -> after.choice event, without executing the on.choice.


choice.cont.process:
before.choice:
check.all.input()
after.choice:
execute(print.data)

choice.print.data:
on.choice:
set.report.global.variables()
if not tccom.dll0010.open.report(1, "", 1, g.system.language, 1) then
|* display is not allowed as device
job.process.error = true
choice.again() |* to break this choice.print.data event
endif
if frm.prnt.sel.r = tcyesno.yes then
if not tccom.dll0010.open.report(
2, "", 0, g.system.language, 2) then
|* display is not allowed as device
job.process.error = true
choice.again()
|* to break this choice.print.data event
endif
endif
|* no job statements hereafter, the standard program (BaanERP: 4GL
|* Engine) takes over control and detects the job.process.error
START.DLL.UI(print.prices.via.price.matrix, IFERRNAC, "tccom99997")
#pragma used message tccom99997
|* Printing...

after.choice:
tccom.dll0010.close.reports()



I don't know if i'm missing anything, but I hope someone can help me with this error.

Thanks in advance!

Hitesh Shah
9th August 2010, 20:26
check if
1. print option is available on form
2. any reports are linked to the session and current value of reportgrp
3. user data is converted to rdd.

virus1002
9th August 2010, 21:39
Hi and thanks for answering Hitesh

I checked the three things you mention, but it's still skipping the on.choice section and executing the after.choice section. The session has all the necessary commands activated and a report linked to it.

mark_h
10th August 2010, 16:40
Did you create and convert to runtime data dictionary for the form and session? Is this a new session or an existing session?

virus1002
11th August 2010, 01:10
Hello Mark. It was a session that was copied from another one. The problem is solved now. I guess something went wrong in the session/report copy and somehow LN didn't link the report properly. I copied the session again and re-linked everything again and it worked fine.

Thanks for your answers

rp.chowdary
23rd August 2010, 09:39
Hi,

Just keep the code in before.choice and check.