As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I wanna do the following and I do a lot of tries but it has been impossible:
Example:
I have the next code: … TABLE FILE SQLOUT NAME COMPUTE PAG/P20CS = PAGE; NOPRINT COMPUTE VIS1/A7 = IF (IMOD(PAG,2,'I2') NE 0) THEN ' ' ELSE 'NOPRINT'; NOPRINT COMPUTE VIS2/A7 = IF (IMOD(PAG,2,'I2') EQ 0) THEN ' ' ELSE 'NOPRINT'; NOPRINT IMP1 AS ‘Value1’ IMP2 AS ‘Value2’ ON TABLE PCHOLD FORMAT PDF … … END
What I want to do is to print NAME in both pages, IMP1 in odd pages and IMP2 in even pages. That is:
Page 1: NAME IMP1 Xxxxx 25 Aaaaaa 56
Page 2: NAME IMP2 Xxxxx 57 Aaaaaa 89
PAGE gives me the page number. The field VIS1 or VIS2 gives me the information whether I need to print or not. But if I put IMP1 AS ‘Value1’ VIS1, logically VIS1 appears like another field because it isn’t a variable.
I have also tried to define the variable VIS1 in the DEFINE but the field PAGE takes always the first value, that is, the value 1 and I don’t want that because PAGE has different values. Like that:
DEFINE SQLOUT PAG/P20CS = PAGE; NOPRINT -SET &VIS1 = IF (IMOD(PAG,2,'I2') NE 0) THEN ' ' ELSE 'NOPRINT'; END
Any ideas?
Thank you!!!This message has been edited. Last edited by: Kerry,
I'm not sure what you are trying to do. Is this example even close?
TABLE FILE CAR
PRINT SALES
COMPUTE PAG/P2CS = TABPAGENO;
COMPUTE VIS/A7 = IF (IMOD(PAG,2,'I2') NE 0) THEN 'IMP1 ' ELSE 'IMP2'; BY COUNTRY PAGE-BREAK
BY CAR
BY MODEL
BY BODYTYPE
ON TABLE SET ONLINE-FMT PDF
ON TABLE SET STYLE *
ORIENTATION=LANDSCAPE,$
ENDSTYLE
END
Your approach is wrong, you cannot conditionally suppress a column with NOPRINT Because NOPRINT can not be dynamic.
Make your data and heading dynamic and display your headings in a subhead
TABLE FILE CAR
PRINT
MODEL AS ''
COMPUTE PAG/P2CS = TABPAGENO; NOPRINT
COMPUTE VIS_DATA/A50 = IF ( IMOD(PAG, 2, 'I2') NE 0 ) THEN MODEL ELSE BODYTYPE;
AS ''
COMPUTE VIS_HEAD/A50 = IF ( IMOD(PAG, 2, 'I2') NE 0 ) THEN 'MODEL' ELSE 'BODYTYPE'; NOPRINT
AS ''
BY CAR AS ''
ON CAR SUBHEAD
"CAR <+0> MODEL <VIS_HEAD"
ON CAR PAGE-BREAK
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=LANDSCAPE,
$
TYPE=REPORT,
GRID=OFF,
FONT='TIMES NEW ROMAN',
SIZE=10,
$
TYPE=SUBHEAD,
BY=1,
LINE=1,
OBJECT=TEXT,
ITEM=1,
JUSTIFY=LEFT,
WIDTH=1.08,
$
TYPE=SUBHEAD,
BY=1,
LINE=1,
OBJECT=TEXT,
ITEM=2,
JUSTIFY=LEFT,
WIDTH=2.10,
$
TYPE=SUBHEAD,
BY=1,
LINE=1,
OBJECT=FIELD,
ITEM=1,
JUSTIFY=LEFT,
WIDTH=3.625,
$
ENDSTYLE
END
That is correct. Anything with the '-' (all Dialogue Manager commands) is executed in the order encountered and before any FOCUS code is run. That is the reason that you can't mix the two (i.e. -SET a variable equal to a field value.)
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, 2007