cancel
Showing results for 
Search instead for 
Did you mean: 

Value pass to Smartform when Print/Preview

Former Member
0 Kudos

Hi,

I've a custom print program and smartform. All my selecting data codes are in Smartform. How do I let Smartform knows whether I'm doing a preview or print? What values should I pass into Smartform?

I'd like to achieve something as follows:-

IF print preview.

DO a.

ELSE.

DO b.

ENDIF.

Please share your thoughts.

Accepted Solutions (1)

Accepted Solutions (1)

NAeda
Contributor
0 Kudos

hi,

Ofter you click on preview or Print(Any user action), smartform FM will export some parameters

like JOB_OUTPUT_OPTIONS.

if preview is selected JOB_OUTPUT_OPTIONS-TDPREVIEW = 'X'.

hope this helps you.

Rgds

Aeda

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks Aeda! Your solution works. Really appreciate it.

brad_bohn
Active Contributor
0 Kudos

Your driver program identifies the print preview (or lack of it) in the Smartform call. Why does the actual data selected for form output determine whether or not a print preview is performed?

Former Member
0 Kudos

Hi Brad,

Actually it is not the data selected that determines the print preview. Let me give a clearer scenario.

When user clicks Print Preview, user able to see a preview of the form. However, when user clicks Print, form is printed and some data is saved to a custom table.

Currently, both print preview and print will save the data to the custom table. So I'd like to know how to prevent data being saved into the custom table when user performs a print preview.

Thanks.