Focal Point Banner


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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Horizontally Printing

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Horizontally Printing
 Login/Join
 
Member
posted
Hi,

I cannot find an obvious way to horizontally display a comma delimited list of values in the header of my webfocus report... Can someone please provide me some sample code.

Thanks!

-Daniel.,
 
Posts: 20 | Registered: April 05, 2006Report This Post
Expert
posted Hide Post
-SET &MYHEADER1=' FRED, ETHEL, LUCY, RICKY ';
TABLE FILE XXX
HEADING
"&MYHEADER1 "
...
END




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Member
posted Hide Post
Hi Susannah,

Thank you for your quick reply.
The values I wish to list horizontally are actually values of a field from a datasource. Can I somehow loop through them and build a comma delimited string to print out?

Thanks for your help.

-Daniel.,
 
Posts: 20 | Registered: April 05, 2006Report This Post
Master
posted Hide Post
Yes you can do that


TABLE FILE CAR
PRINT CAR
BY COUNTRY NOPRINT
ON TABLE SAVE AS TEST
END
-RUN

-SET &MYHEAD='';
-SET &COMMA='';
-CONTREAD
-READ TEST &CAR.A10
-IF &IORETURN NE 0 THEN GOTO ENDREAD;
-SET &MYHEAD=&MYHEAD | &COMMA | &CAR ;
-SET &COMMA=',';
-GOTO CONTREAD;
-ENDREAD

TABLE FILE CAR
HEADING
" &MYHEAD "
PRINT CAR
END
-EXIT

Hope this helps,


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Member
posted Hide Post
Hi Kamesh,

Thank you for providing the sample code.
I have modified the provided code to work with my datasource. For some strange reason I'm getting the length of each individual String(field value) before the field value when I the print the final &MYHEAD variable in the header... Do you know what's going on? Thanks!

-Daniel.,
 
Posts: 20 | Registered: April 05, 2006Report This Post
Master
posted Hide Post
Can you send me the code? OR you can paste it here.


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Member
posted Hide Post
TABLE FILE METRICS_METRICS_EVENT
PRINT EVENT_TYPE_EN AS ATM
ON TABLE SAVE AS TEST
END
-RUN

-SET &MYHEAD='';
-SET &COMMA='';
-CONTREAD
-READ TEST &ATM.A64
-IF &IORETURN NE 0 THEN GOTO ENDREAD;
-SET &MYHEAD=&MYHEAD | &COMMA | &ATM ;
-SET &COMMA=',';
-GOTO CONTREAD;
-ENDREAD

TABLE FILE METRICS_METRICS_EVENT
HEADING
"bleh: &MYHEAD "
PRINT EVENT_TYPE_EN
END
-EXIT


The field EVENT_TYPE_EN is a varchar of length 64.

Thanks

-Daniel.,
 
Posts: 20 | Registered: April 05, 2006Report This Post
Master
posted Hide Post
I'm not sure why you are not getting the result. Try this first before changing it to your code.

TABLE FILE CAR
PRINT WARRANTY AS ATM
ON TABLE SAVE AS TEST
END
-RUN

-SET &MYHEAD='';
-SET &COMMA='';
-CONTREAD
-READ TEST &ATM.A40
-IF &IORETURN NE 0 THEN GOTO ENDREAD;
-SET &MYHEAD=&MYHEAD | &COMMA | &ATM ;
-SET &COMMA=',';
-GOTO CONTREAD;
-ENDREAD

TABLE FILE CAR
HEADING
"bleh: &MYHEAD "
PRINT WARRANTY
END
-EXIT

If this works fine, your code should work.

If not, send me the output you are getting.

Hope this time you will get it,


WFConsultant

WF 8105M on Win7/Tomcat
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
<JG>
posted
dtrang

if you are getting the length of the field before the value then I bet that you are using VARCAHR from a relational source.

either mod the master to remove the V from the usage or redefine the column.

All should then be well.
 
Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Horizontally Printing

Copyright © 1996-2020 Information Builders