Focal Point
[solved] Header Variables Not Showing

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2757086036

May 08, 2013, 01:33 PM
TomS.
[solved] Header Variables Not Showing
Hi All,

I have a report that has a header with variables that are assigned during the define. For some reason they are not showing up on every page of the report. Sometimes they'll show up on the first page and other times they wont, they'll just show as a '.'.

Here's an example of the code...


DEFINE FILE XXXX
DATE/A10 = TODAY(DATE);
REPORTHEADER/A250 = IF ('&SECTIONHEAD' EQ '1') THEN 'Total Clients'
ELSE IF ('&SECTIONHEAD' EQ '2') THEN 'Clients With No Insurance'
ELSE IF ('&SECTIONHEAD' EQ '3') THEN 'Clients With Insurance'
ELSE IF ('&SECTIONHEAD' EQ '4') THEN 'Clients With Coverage'
ELSE IF ('&SECTIONHEAD' EQ '5') THEN 'All Other';
RANGETYPE/A20 = IF ('&RANGE' EQ 'A_A') THEN '0 - 10'
ELSE IF ('&RANGE' EQ 'A_B') THEN '11 - 20'
ELSE IF ('&RANGE' EQ 'A_C') THEN '31 - 40'
ELSE IF ('&RANGE' EQ 'A_D') THEN '41 - 50';
end
TABLE FILE XXXX
PRINT
ID AS 'ID'
Manager AS 'MANAGER'
Provider AS 'PROVIDER'
HEADING
"Client Services"
"Report Generated: <DATE"
"<REPORTHEADER"
"that exceed the total by <RANGETYPE"
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET HTMLCSS ON
END

*i'm in 7.7 on this project

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


WebFOCUS 8.0.07 and 8.2.01M
UNIX, WINDOWS, ORACLE
PDF, CSV, Excel, TXT, XML, HTML
May 08, 2013, 02:01 PM
TomS.
To add to this... there is a join to a hold file before the define. It appears the carrot values are only showing on pages where the first record is located in the hold file. On pages where the first record is not in the hold file but is in the xxxx table the carrot values are showing as a period.


WebFOCUS 8.0.07 and 8.2.01M
UNIX, WINDOWS, ORACLE
PDF, CSV, Excel, TXT, XML, HTML
May 08, 2013, 03:23 PM
eric.woerle
Tom,

First wrap your code in the code tags. Some of your stuff isn't showing up properly.

I would try a few things.

1) I would put -set &ECHO=ALL at the beginning of your fex and see how the variables are resolving. This should tell you right away what your issue is.

2) I would use &SECTIONHEAD.QUOTEDSTRING instead of '&SECTIONHEAD'. because your variable is in quotes it may not be resolving properly. (probably not this, but I like to use that anyways)

3) I would look at whatever resolves the &SECTIONHEAD variable. Since you don't have that piece listed here, I can't help you on that one.

4) you don't finish your Define for REPORTHEADER or RANGETYPE. It should have a final ELSE statement for what to do when it doesn't find one of those values.

5) I would put a page break on your REPORTHEADER field. The header values that will be displayed are whatever the first value of the internal table for the data being shown on the page.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
May 08, 2013, 03:48 PM
Francis Mariani
You're DEFINEing a REPORTHEADER column based on some conditions. To see different ones on different pages, you need to add a BY REPORTHEADER NOPRINT PAGE-BREAK to ensure the proper value appears in the header.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
May 08, 2013, 04:10 PM
TomS.
Eric, I'm not useing &variables...I fixed my post to be accurate. The defines are finished, I just cut everything down to provide a smaller sample.(sorry)

Francis, The report should have the same header on every page. The REPORTHEADER is not a column used and sorting by it has no impact.

Thanks guys, this is so bizarre..

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


WebFOCUS 8.0.07 and 8.2.01M
UNIX, WINDOWS, ORACLE
PDF, CSV, Excel, TXT, XML, HTML
May 08, 2013, 05:47 PM
Francis Mariani
How can the heading be the same on every page when you're displaying a virtual (DEFINE) field in the heading

REPORTHEADER/A250 = IF ('&SECTIONHEAD' EQ '1') THEN 'Total Clients'
ELSE IF ('&SECTIONHEAD' EQ '2') THEN 'Clients With No Insurance'
ELSE IF ('&SECTIONHEAD' EQ '3') THEN 'Clients With Insurance'
ELSE IF ('&SECTIONHEAD' EQ '4') THEN 'Clients With Coverage'
ELSE IF ('&SECTIONHEAD' EQ '5') THEN 'All Other';
RANGETYPE/A20 = IF ('&RANGE' EQ 'A_A') THEN '0 - 10'
ELSE IF ('&RANGE' EQ 'A_B') THEN '11 - 20'
ELSE IF ('&RANGE' EQ 'A_C') THEN '31 - 40'
ELSE IF ('&RANGE' EQ 'A_D') THEN '41 - 50';


and

HEADING
"Client Services"
"Report Generated: <DATE"
"<REPORTHEADER"



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
May 09, 2013, 01:47 AM
Danny-SRL
Francis,

The DEFINE is based on a &variable which means that the field REPORTHEADER is a constant.
I wonder if this has to do that the REPORTHEADER field is not attached to a databse field.

However, Tom, why do you not use Dialog Manager and create a variable &REPORTHEADER:
  
-SET &REPORTHEADER = IF ('&SECTIONHEAD' EQ '1') THEN 'Total Clients'
- ELSE IF ('&SECTIONHEAD' EQ '2') THEN 'Clients With No Insurance'
- ELSE IF ('&SECTIONHEAD' EQ '3') THEN 'Clients With Insurance'
- ELSE IF ('&SECTIONHEAD' EQ '4') THEN 'Clients With Coverage'
- ELSE IF ('&SECTIONHEAD' EQ '5') THEN 'All Other';
...
HEADING
"Client Services"
"Report Generated: <DATE"
"&REPORTHEADER "



Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

May 09, 2013, 07:04 AM
TomS.
Correct Danny, the &variable is user defined earlier in the procedure so it is constant.

I had tried using DM to set &REPORTHEADER but was having issues...After seeing your post I realized I was missing the '-' before each line(doh). I went that route and all is working correctly.

It's still pretty strange that the header was acting the way it was though. I'll have to fiddle around with it during some down time.

Thank you all!


WebFOCUS 8.0.07 and 8.2.01M
UNIX, WINDOWS, ORACLE
PDF, CSV, Excel, TXT, XML, HTML