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     forcing carriagereturn linefeed into /A field for pdf

Read-Only Read-Only Topic
Go
Search
Notify
Tools
forcing carriagereturn linefeed into /A field for pdf
 Login/Join
 
Expert
posted
has anyone been able to force a cr/lf into a text field, (not with html br tag), so that it would be respected in a pdf output?
newfield/A200=oldfield1 | ? | oldfield2;
its the value of the ? field i'm looking for.
If i could find an example of one, (they usually show up as a little square box in a txt file), i could copy it and paste into a BYTVAL function to grab the HEXBYT of it, but i can't find one, so i tried to make one, no luck so far.




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
Virtuoso
posted Hide Post
Susannah
I know my colleague has found a solution for this.
He does a replacement of a certain character with the formula STRREP, but the main thing is the cr/lf character.

Something like "\x0d\x0a" ?? or 0x0D and 0x0A ??

I'll let you know tomorrow.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Expert
posted Hide Post
oh...dank u , Amsterdam




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
Virtuoso
posted Hide Post
I think I use CTRAN 10 for a line feed and LINEBREAK=LF in the stylesheet.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Virtuoso
posted Hide Post
Susannah

What Alan does is exactly what we do with some smart remarks.
The code LINEBREAK=LF is removed when you open the report in the GUI (7.1.4)

And we put an empty character before the "10".
PDF seems to have the "functionality" of removing one character before this one.

You can translate the normal charcaters for linefeed wit the CTRAN formula.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Expert
posted Hide Post
Frank, sorry i don't understand. Can you show me an example?




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
Expert
posted Hide Post
That sounded like Dutch to me too Smiler


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Well an example....

Suppose you put an "^#" instead of a normal CRLF in your document then

TEMP_BREAK_1/A2='^#';
TEMP_BREAK_2/A2=CTRAN(2, TEMP_BREAK_1, 35, 10, TEMP_BREAK_2);
PDF_BREAK/A2=CTRAN(2, TEMP_BREAK_2, 94, 0, PDF_BREAK);


This translate that text to a PDF ready formatted field.

The formula TEMP_BREAK_2 translates the "#' to the proper LF character (10) and the secand command puts a non readable character in front of that by changing the "^".
Now together this should do it.
Maybe there is a better way....




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Expert
posted Hide Post
I couldn't get that to work with this code (Win, v765):

SET HOLDLIST=PRINTONLY
SET ASNAMES=ON
TABLE FILE CAR
PRINT

COMPUTE TEMP_BREAK_1/A2='^#'; NOPRINT
COMPUTE TEMP_BREAK_2/A2=CTRAN(2, TEMP_BREAK_1, 35, 10, TEMP_BREAK_2); NOPRINT
COMPUTE PDF_BREAK/A2=CTRAN(2, TEMP_BREAK_2, 94, 0, PDF_BREAK); NOPRINT

COMPUTE TEST1/A100 = EDIT(COUNTRY,'99999$$$$$') | PDF_BREAK | EDIT(COUNTRY,'$$$$$99999');

BY COUNTRY NOPRINT
ON TABLE PCHOLD FORMAT PDF
END





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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Francis

in your country fields there is not something like "^#" you now just put some space in the field.

if you first put the "^#" into the country field it would work. (I hope)

NEWCOUNTRY/A25=EDIT(COUNTRY,'999999')||'^#'||EDIT(COUNTRY,'$$$$$$9999999999999');




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Expert
posted Hide Post
S,

You can also use STRREP as well, which is the method I prefer, I also use a carriage return with the linefeed.

STRREP(100, TEST1, 2, '^#', 2, HEXBYT(13, 'A1')|HEXBYT(10, 'A1'), 100, REAL_LF);

However, it still needs the stylesheet setting LINEBREAK=LF, as per Alan, to actually get the carriage return / linefeed to impact the output.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Expert
posted Hide Post
T, can you put this into a car fex?
i'm just not getting it .
are you saying
create a character/A2 = HEXBYT(13,'A1')|HEXBYT(10,'A1');
stick that intothe middle of my output
new/A10=OLD | character | OLD2;
If so,
then where does the LINEBREAK=LF go?
is it a style sheet attribute like
TYPE=DATA,COLUMN=new,LINEBREAK=LF ??
or am i making this all up?




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
Expert
posted Hide Post
SET HOLDLIST=PRINTONLY
SET ASNAMES=ON
TABLE FILE CAR
PRINT

COMPUTE TEMP_BREAK_1/A2='^#'; NOPRINT
COMPUTE TEMP_BREAK_2/A2=CTRAN(2, TEMP_BREAK_1, 35, 10, TEMP_BREAK_2); NOPRINT
COMPUTE PDF_BREAK/A2=CTRAN(2, TEMP_BREAK_2, 94, 0, PDF_BREAK); NOPRINT

COMPUTE TEST1/A100 = EDIT(COUNTRY,'99999$$$$$') | PDF_BREAK | EDIT(COUNTRY,'$$$$$99999');

BY COUNTRY NOPRINT
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT,LINEBREAK='LF',$
ENDSTYLE
END


This works in 7.6.5.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
DEFINE FILE CAR
  CR/A1 = HEXBYT(13, 'A1');
  LF/A1 = HEXBYT(10, 'A1');
  CRLF/A2 = CR || LF;
 
  ABC5/A30=CAR || CRLF || COUNTRY;
END
TABLE FILE CAR
SUM ABC5 BY CAR BY COUNTRY
      
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
TYPE=REPORT,LINEBREAK='CRLF',$
ENDSTYLE
END

GOT IT!
THANK YOU T, FRANKIE, AMSTERDAM,ALAN!
'Nashville Iced Tea' on me!




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
Virtuoso
posted Hide Post
This works in 7.1.3 too.

all together...! Big Grin




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Expert
posted Hide Post
Thanks for the code Frank. It will come in handy.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
quote:
'Nashville Iced Tea'


Yummy

Nice Thread




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report 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     forcing carriagereturn linefeed into /A field for pdf

Copyright © 1996-2020 Information Builders