Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Conditional Report Header
Go
New
Search
Notify
Tools
Reply
  
Conditional Report Header
 Login/Join
 
Platinum Member
posted
I have a standard report header that I use for my WebFOCUS reports (7.1.3). I am trying to update this header so that certain rows of the header are "conditional" based on the values in global variables.

Right now I have:

TABLE FILE JOB
HEADING
"Proprietary Information"
"Report Name"
"Data Source: "
"Data As Of: "
"Date Prepared: "
"Prepared By: "
PRINT

What I would like to do is use a global variable such as:

-SET &USEPI = 1;

When the value of USEPI equals 1, then the "Proprietary Information" line of the header would be used, other wise, the top line of the report header would be "Report Name".

Does anyone have a sample of code to do this, or can you make any suggestions?

Thank you.

This message has been edited. Last edited by: ColdWhiteMilk,
 
Posts: 241 | Location: Bethesda, MD | Registered: August 14, 2007Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Have you considered the use of
ON TABLE SUBHEAD
"informantion here line"

which would only print on the first page and then have your HEADING always be what you wish to have.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Reply With QuoteReport This Post
Platinum Member
posted Hide Post
I don't understand. Will that allow me to do conditional lines of the report header?

Do you have a sample?


Production - 7.6.4
Sandbox - 7.6.4
 
Posts: 241 | Location: Bethesda, MD | Registered: August 14, 2007Reply With QuoteReport This Post
Expert
posted Hide Post
quote:


TABLE FILE JOB
HEADING

-IF &USEPI NE 1 GOTO SKIP_THIS;
"Proprietary Information"
-GOTO NEXT_1
-SKIP_THIS
"Report Name"
-NEXT_1

"Data Source: "
"Data As Of: "
"Date Prepared: "
"Prepared By: "
PRINT



Tom Flynn
WebFOCUS 7.7.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1946 | Location: Parker, CO | Registered: January 31, 2006Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Woohoo!

You guys rock!

Thank you for the help.


Production - 7.6.4
Sandbox - 7.6.4
 
Posts: 241 | Location: Bethesda, MD | Registered: August 14, 2007Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Did a quick one against IB COURSE file
  
TABLE FILE COURSE
PRINT 
     COURSECODE
     CTITLE
BY SOURCE
     
ON SOURCE PAGE-BREAK 
ON TABLE SUBHEAD
"This is the report heading"
HEADING
"This is the page heading"
FOOTING
"<TABPAGENO of  <TABLASTPAGE"
ON TABLE SET PAGE-NUM OFF 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     LEFTMARGIN=0.500000,
     RIGHTMARGIN=0.500000,
     TOPMARGIN=0.500000,
     BOTTOMMARGIN=0.500000,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     GRID=OFF,
     FONT='ARIAL',
     SIZE=9,
     TOPGAP=0.013889,
     BOTTOMGAP=0.027778,
$
TYPE=TITLE,
     STYLE=BOLD,
$
TYPE=TABHEADING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=TABFOOTING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=HEADING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=FOOTING,
     SIZE=12,
     STYLE=BOLD,
$
TYPE=SUBHEAD,
     SIZE=10,
     STYLE=BOLD,
$
TYPE=SUBFOOT,
     SIZE=10,
     STYLE=BOLD,
$
TYPE=SUBTOTAL,
     BACKCOLOR=RGB(210 210 210),
$
TYPE=ACROSSVALUE,
     SIZE=9,
$
TYPE=ACROSSTITLE,
     STYLE=BOLD,
$
TYPE=GRANDTOTAL,
     BACKCOLOR=RGB(210 210 210),
     STYLE=BOLD,
$
ENDSTYLE
END

Gives this, but it probably won't look to pretty here

This is the report heading

This is the page heading

SOURCE COURSECODE CTITLE
AMERICAN MANAGEMENT ASSOCIATION AMA130 HOW TO WRITE USERS MANUAL
AMA680 BUSINESS TO BUSINESS MKTG STRATEGY
AMA800 INTERVIEWING: A STRATEGIC APPROACH

1 of 14


This is the page heading

SOURCE COURSECODE CTITLE
BUSINESS INSTITUTE OF TECHNOLOGY BIT420 EXECUTIVE COMMUNICATION
BIT640 NEGOT AND ADMIN THE LABOR CONTRACT
BIT650 IMPROVING INTERNAL CONSULTING SKILL

2 of 14


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Another variation on Tom's Dialogue Manager idea that we use:
-SET &HEAD1=IF &USEPI NE 1 THEN '"'|'Heading Line 1'|'''' ELSE '';
TABLE FILE JOB
HEADING
&HEAD1.EVAL
"Data Source"
.
PRINT

IMO, it requires less DM and is a litte more readable inside the TABLE request. For Clarification, the tick marks are single, double, single which would produce the value "Heading Line 1"


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Darin-

I think that your approach works well also. I think that it might be a little cleaner to read as well rather than all the goto statements.

Thank you all!

This message has been edited. Last edited by: ColdWhiteMilk,


Production - 7.6.4
Sandbox - 7.6.4
 
Posts: 241 | Location: Bethesda, MD | Registered: August 14, 2007Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Conditional Report Header

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.