peterfarouk
28th July 2003, 14:15
I have a dislpay session and I want the user to print the data on it .
The question is should I make a new print session so the user can print the needed data or is it possible to use the print button on a display session.
Note: This is not a baan session , it is a customized one.
Thanks for you help I appreciate it.
baan_fun
28th July 2003, 15:09
Hi
enable choice Print report in the form sgtandard options
link report to your display session
in the program script:
choice.print.data:
on.choice:
if rprt_open then
rprt_send()
endif
after.choice:
rprt_close()
This will print the actual report on display
If more calculations, selection have to be done before rprt_send you have to call the appropriate functions.
You can linl also an already existing report to your display session as long the data sent to the report is what the report expects.
Regards.
peterfarouk
28th July 2003, 15:40
Would you please explain what do you mean by linking report to display session??
And something else ,Do you mean to write this script in the Print Session so both display and print options will be available for me.
thankx alot for your time and paitence I really appreciate it.
baan_fun
28th July 2003, 16:18
Hi,
First, both options are ok in order to print a report : either you print report directly from the display session. Or you create a print session in order to print the report.
The case when you want to print directly from the display session has to be handled as follows:
1. Create your report or find the already existing report that you want to use
2. Link this report to your session. In the first form of the "Maintain sessions" at the button"Reports" (for baan 4) or in the Maintain Sessions, go to specials Reports and choose option "Link report to session".
3. In Maintain forms: enable "Print data"
4. In the session script that is displaying your data you add the code for the choice.print.data section. It is possible to have defined the choice.print.data in a display session.
baan_fun
28th July 2003, 16:23
See the attachment
peterfarouk
29th July 2003, 09:33
Thankx alot baan_fun I made a report and Link it to my display session and enabled the print option and I used the following:
choice.print.data:
on.choice:
if rprt_open then
rprt_send()
endif
after.choice:
rprt_close()
and it is working just fine now.THAAAAAAAANKX:D