×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Variable output option Offline Print v. Browser

Variable output option Offline Print v. Browser

Variable output option Offline Print v. Browser

(OP)
I am trying to give my users the choice of running a report to a Mainframe printer (using OFFLINE PRINT) or viewing the report in the browser as a PDF file.

I included a runtime &variable called &OUTPUT.  If the user enters anything in the input box, the report should be directed to an allocated PDS.  Here is sample code:

-IF '&OUTPUT'.EXIST THEN GOTO LABEL1 ELSE GOTO LABEL2;
-LABEL1
OFFLINE CLOSE
-* define output PDS
DYNAM ALLOC F OFFLINE DA DEV.BCMSUMMA.DWLK SHR REU
-RUN
-LABEL2

I have similar code at the end of the report
-IF '&OUTPUT'.EXIST THEN GOTO LABEL3 ELSE GOTO LABEL4;
-LABEL4
ON TABLE PCHOLD FORMAT PDF.
-GOTO LABEL5
-LABEL3
OFFLINE CLOSE
-LABEL5

The problem I am having is checking &OUTPUT for a specific condition and having the branching logic go to the right place in the report.  

Has anyone done something similar to this?  Any and all help will be appreciated.

RE: Variable output option Offline Print v. Browser

Why not use a radio buttons, instead. That way, the user can EITHER check PDF or OFFLINE, and you can set one of them as the default. The HTML looks like:

<INPUT TYPE="RADIO" NAME="variable" [CHECKED] VALUE="value">text

for each button

where:

"variable" is the D.M. variable (in your case, OUTPUT)- use the same value for each of the button choices

CHECKED    is included for the value to be the default

"value"    is the value assigned to the variable (in your case, PDF and OFFLINE)

and text is the text label of the radio button
With this method, you just check for the VALUE of &OUTPUT, which will always exist, and branch accordingly.

RE: Variable output option Offline Print v. Browser

(OP)
Thanks for the idea.  This customer is not yet publishing their reports.  They are running them from MRE and/or ReportCaster.

RE: Variable output option Offline Print v. Browser

from MRE, there is an option on the Reporting objects template... you can also put a HTML page in front of any standard reports in MRE that allow them to select their output destinaiton on the fly.

Laura

Laura
lg@bluebirdsystems.com or
wildpetals@wildpetals.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close