Focal Point
[Solved]shift to new line

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

April 30, 2010, 02:31 PM
subhash
[Solved]shift to new line
Hello Everyone,

I have the below code snippet where I'm trying to get Hello in one line and John in another line. I'm using CTran function where "," is being replace to "/n"(new Line). But when I'm running this, I'm getting some weired error. Can someone help with this?

Thanks,

-SET &ECHO=ON;
-SET &COMMENTS = 'Hello,john';
-SET &ALT_ADDR = CTRAN(50, &COMMENTS, 44, 10, 'A50');
-TYPE &ALT_ADDR;

TABLE FILE CAR
PRINT COUNTRY AS 'Country,Name'
END

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


7.6.4,unix
all output
April 30, 2010, 03:19 PM
njsden
quote:
I'm trying to get Hello in one line and John in another line

Where exactly do you want that to appear? In a column title? in a heading? as the value of an actual field?

You have some Dialog Manager conversion operating in &variables but your actual report makes no use of them so it is not clear what your goal is.



Prod/Dev: WF Server 8008/Win 2008 - WF Client 8008/Win 2008 - Dev. Studio: 8008/Windows 7 - DBMS: Oracle 11g Rel 2
Test: Dev. Studio 8008 /Windows 7 (Local) Output:HTML, EXL2K.
April 30, 2010, 03:22 PM
subhash
I want that to be displayed on the Header.


7.6.4,unix
all output
April 30, 2010, 06:14 PM
Darin Lee
So first off, you've got to have a line that displays some sort of heading such as

HEADING
"&ALT_ADDR "

However this isn't really the way to handle splitting the line into multiple lines. Probably best to use GETTOK to create multiples and then

HEADING
"&LINE1"
"&LINE2"

If the report output is html only you can simply replace any comma in the string with a
 <br> 

and you get the same result.

You can reference this post for use in PDF output.

This message has been edited. Last edited by: Darin Lee,


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
May 02, 2010, 05:45 PM
Waz
Darin I think you missed the code tag for
<br>
above.



You can also use the
<br>
with MARKUP=ON in the stylesheet, but not knowing the layout of the report, it may cause problems.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!