jroberts
24th March 2003, 20:52
Hello,
In the Baan standard menu, there is a 'print' icon, and it is grey'ed out in most maintain sessions.

It does work in sessions like 'Maintain Table Definitions'

Does anyone know how to program a script so that this icon activates a print, either a selection screen, or print the current record ?

NPRao
24th March 2003, 21:26
Robert,

You have to enable the print option in the form standard commands and then add a form command with the print session with reports attached to it or program using spool or brp functions in the same session.

robertvg
25th March 2003, 13:45
In BaaN IV, this would be the choice.print.data command I assume ?

regards,
Robert

suhas-mahajan
25th March 2003, 13:58
I think, the way which Respected Prashant suggested available in BaaNERP.
In BaaN IV, I am doing like this:
1. Execute "maintain forms" session for your session.
2. Click on Standard Options which will open ttadv3110s000
3. Here you will find Check Box clear in front of "Print"
4. Just mark it (unclear it) by clicking on.
5. Dump it.
6. In the script write following lines in choice section:

choice.print.data:
on.choice:
if rprt_open() then
read.main.table()
rprt_close()
else
choice.again()
endif
7. In read.main.table() function you can write your expected query.

Hope this helps, if you get some prob. please reply.

-Suhas

jack786
26th July 2004, 14:13
Dont we need to create any print session??
and no need to generate any report??

lakoon
26th July 2004, 14:25
Hi,

You do not have to create an extra session. But you have to connect a report to the session you would like to use.
If you have a session type 1,2,3 the you should be able to print all the information from the main table and all the fields wiche are declared as "extern". In the report you have to define these fields as input fields.

You can actually create somthing like a "Print Screen" if your reportlayout looks like the form layout.


choice.print.data:
on.choice:
if rprt_open() then
rprt_send()
rprt_close()
else
choice.again()
endif


/lakoon

SriksAdi
26th July 2004, 15:33
Hi,
Opening a new session or printing a report depends on the requirement.

An example:
We have customised a functionality for Gate Entry where in the maintain session to enter the Gate Entry has the "Print" button enabled. On clicking this button, the report is printed for the current Gate Entry Number.

Script of print.data
choice.print.data:
on.choice:
if rprt_open() then
read.main.table()
rprt_close()
else
choice.again()
endif


At the same time, we have another session Insurance Master, where in on clicking the "Print" button, opens a new Print Session to print range of Insurance details.
Script of print.data
choice.print.data:
on.choice:
zoom.to$(...)


regards
Sriks

jack786
26th July 2004, 16:44
Does it work for Baan IV also?

günther
26th July 2004, 17:51
Don't forget to add the report(s) to ttadv2112s000 Maintain Reports by Session (usually started from the "Reports ..." Button on Form 1 of ttaad2100m000 Maintain Sessions.

Günther

günther
26th July 2004, 17:52
Does it work for Baan IV also?
I used that since IVb2, now I'm on IVc4 and it works fine.