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     Getting webfocus to respect spacing

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Getting webfocus to respect spacing
 Login/Join
 
Member
posted
Hi all,

I have a small problem with a report, when it completes, regardless of it being pdf, exl2k, or html, it does not respect the spacing layout. This report needs to have a set number of spaces between fields due to automation requirements. This report generates the information and then passes it on to an outside party for auditing purposes and they require the spacing. If I look at the HTML source code it does show the spaces in the source (yes I know HTML doesn't like extra spaces and I suspect that is why pdf and exl2k aren't working either).

The only way we have been able to get the report to print its contents properly is by using ReportCaster and having it send us the file in alpha format. While this does the spacing properly it doesn't send the header and footer information, which is also needed. Does anyone know of a way to force WF to respect the spaces in the report?

Some of the things we have tried are spaces ' ',  , setting spacing variables like -SET &60spaces = ' (then 60 spaces)'; and calling the variable as needed. Our current work around is to have ReportCaster email us the file, and then running a QuickBasic program that creates the header and footer for the file, while this works we (my department) would like a better way of doing this.

Any help on this would be greatly appreciated.
C. Jenks
 
Posts: 11 | Location: Dearborn Mi | Registered: March 07, 2005Report This Post
<Pietro De Santis>
posted
In HTML, multiple spaces shrink down to one - it's the Web browser, not WebFOCUS. If you translated the spaces in a piece of text to
 
then you would have your multiple spaces. I don't believe there is a function in WebFOCUS to replace a one charater string (the space) by a string that's more than one character (the
 
).

In PDF, the multiple spaces are there. If you have not used a mono-spaced font like COURIER, it may not be obvious. If your spaces are at the end of the column and you have SQUEEZE=ON, the multiple spaces will b e truncated.

If the reports are being generated for further processing, they should be OK, because in HTML and PDF they are there.

If this doesn't help, you could try the OVRLAY function to overlay some other non-printable character where the spaces are...
 
Report This Post
Member
posted Hide Post
As I said above we tried the &nbsp; (unfortunately it showed up as a space) and it failed to work. We had a string of 60 no breaking spaces, and it still didn't work. It did give two spaces but that was all. Sorry I didn't think the no breaking space character would have been parsed as code, or I would have did it like above.
 
Posts: 11 | Location: Dearborn Mi | Registered: March 07, 2005Report This Post
<Pietro De Santis>
posted
Are these spaces at the end of the data string or in the middle of it?

What kind of database are you reading?
 
Report This Post
Expert
posted Hide Post
you need to trick the browser
in focus, your space character needs to have an escape character
&|nbsp;&|nbsp; ...etc
But 60 chars is alot.
there are other ways to spread stuff out.
Are you needing spaces in column titles or in header lines, or what?
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Platinum Member
posted Hide Post
Can you make a gif file that has 60 spaces and then embed that gif file into your report?
Just a suggestion....
Vivian
 
Posts: 191 | Location: Henderson, Nevada | Registered: April 29, 2003Report This Post
Member
posted Hide Post
Thanks for all the suggestions; I'll try answering all the questions in one post.

Pietro: The spaces are spread out in multiple spots. Some spaces need to be in the middle some in the end. The total character count for each string (including the header and footer) is 150, which are all alphanumeric. I'm getting all the information from an Oracle DB.

Susanah: Tried the escape character too, still didn't work. I know 60 spaces is a lot, there is another spot in the report where it has to be 96 spaces. The spaces have to be in the header, footer and main body of the report. Spreading the columns out won't help, because the file is rejected if the spacing does not match what is expected.

Vivian: While your suggestion is a wonderful idea, unfortunately its not something I can use. The report has to be text based.

all: In a nutshell this report has to create a file to send to the US Government, concerning Financial Aid for college students. The government will not accept the file unless it matches their spacing layout exactly, and must be transmitted as text. The report generates roughly 6700 lines of text not including the header and footer.

As I said in the start, report caster does a good job for format alpha, but doesn't include the header and footer. Trying to get the header and footer in the report with the rest of the data causes the report to fail. The closest we've came to getting the report to work properly, when it ran from any location (Developer Studio or Dashboard), was when we used format doc. That however put extra spaces in, in other locations.
 
Posts: 11 | Location: Dearborn Mi | Registered: March 07, 2005Report This Post
Member
posted Hide Post
I have created some defined fields to handle similar situation here. Perhaps this can help you.

NBSP/A6 = '&' | 'nbsp;';
NBSP5/A30 = NBSP | NBSP | NBSP| NBSP| NBSP ;
NBSP10/A60 = NBSP5 | NBSP5 ;
NBSP20/A120 = NBSP10 | NBSP10 ;

Good Luck!
 
Posts: 20 | Location: Michigan | Registered: November 23, 2004Report This Post
Member
posted Hide Post
Sorry, I was wrong about the pdf not working. For spacing it works, it has the problem of cutting off over half the text though. It has been a while since I looked at pdf on this report. (I've been fiddling around with it since November and every time I thought it was done, it comes back). To my understanding though the file has to be sent in .txt format and cutting and pasting the text to a text file loses the spacing.
 
Posts: 11 | Location: Dearborn Mi | Registered: March 07, 2005Report This Post
<Pietro De Santis>
posted
This may or most likely will not help. Unfortunately, like you found out, several blanks are inserted between the report columns and the column titles don't line up. But the spaces and headings/footings are respected. The program creates a WP version of the report and then reads that version to create a report without the carriage control characters at the beginning of each line.


FILEDEF REP001 DISK C:\TEMP\REP001.TXT
-RUN
FILEDEF REP002 DISK C:\TEMP\REP002.TXT
-RUN
SET SQUEEZE=OFF
SET PAGE=NOLEAD
SET SPACES=1
-RUN

TABLE FILE CAR
PRINT
COUNTRY
COMPUTE WMODEL/A100 = ' ' | MODEL | ' X ';
COMPUTE WCAR/A75 = ' Z ' | CAR | ' W W W ';
BY COUNTRY NOPRINT SUBFOOT
" --- END OF COUNTRY --- "
WHERE READLIMIT EQ 100
WHERE RECORDLIMIT EQ 100
HEADING CENTER
"THIS IS REPORT 001"
ON TABLE HOLD AS REP001 FORMAT WP
END
-RUN

TABLE FILE REP001
PRINT REPORT_LINE
ON TABLE HOLD AS REP002 FORMAT ALPHA
END
-RUN
The intermediary master (the REPORT_LINE column has to exactly match the length of the actual data)


FILE = REP001, SUFFIX=FIX, $
SEGNAME = SEG1, SEGTYPE=S0, $
FIELD = CARRIAGE_CONTROL, ALIAS=E01, ACTUAL=A2, USAGE=A2, $
FIELD = REPORT_LINE, ALIAS=E02, ACTUAL=A187, USAGE=A187, $

This message has been edited. Last edited by: <Mabel>,
 
Report This Post
Guru
posted Hide Post
Can you use FORMAT alpha for the data and append on the header and footer with -WRITE commands?
 
Posts: 391 | Location: California | Registered: April 14, 2003Report This Post
Master
posted Hide Post
Try CTRAN function to make the space to non-printable hard space.

32 - ASCII code for space
160 - ASCII code for non-printable hard space.

CTRAN(charlen, string, decimal, decvalue, outfield)

FIELD2/A10=CTRAN(10,FIELD1,32,160,FIELD2)
 
Posts: 780 | Location: Florida | Registered: January 09, 2005Report This Post
Member
posted Hide Post
Kamesh,

Gave it a try your way, and it printed back as an �. But thank you for the advice.
 
Posts: 11 | Location: Dearborn Mi | Registered: March 07, 2005Report This Post
Member
posted Hide Post
To try and give everyone a better idea of what I need to do,
in the define section and the table section:


NEWFIRST/A12 = IF FIRST_NAME EQ ' ' OR FIRST_NAME IS MISSING THEN 'NFN '
ELSE EDIT (FIRST_NAME || ' ','999999999999');

NEWLAST/A35 = IF LAST_NAME EQ ' ' OR LAST_NAME IS MISSING THEN 'NLN '
ELSE EDIT(LAST_NAME || ' ','99999999999999999999999999999999999');

RECORD/A150 = '1' | NEWSSN | NEWFIRST | NEWLAST | DOB | ENROLDATE | MONITORDATE | ALERTLIST | SCHOOLCODE | 'T' | '&SPACE59';

TABLE FILE RESHOLD
PRINT
RECORD AS ''
As you can see in the define file, we are taking the first and last name, and setting them to be fields the length of 12 or 35. If the name is not long enough we need to pad it with extra spaces, if it is too long it gets truncated. Those are the only two spots within the data that have to be spaced that way. The rest of the spacing needs to be done as padding at the end.

Here is what the header and footer formats have to look like.


"0TSM/FAH INFORM HEADER &SCHOOLCODE&SERVCODE&YYMD&SEQNUM&E "
"9TSM/FAH INFORM TRAILER

This message has been edited. Last edited by: <Mabel>,
 
Posts: 11 | Location: Dearborn Mi | Registered: March 07, 2005Report This Post
<JG>
posted
If your output file is less than 256 bytes you could use format wp which will maintain your header and footer information.

set page=nopage
set lines=99999

define a dummy field
dummy/a1=' ';

sort your report by dummy noprint
puting your footing in as a subfoot (stops a blank line being inserted)
on dummy subfoot
"footing"

this should generate what you want with the exception that it has 2 leading spaces.
if you need to remove them set up a master with two fields the first being a filler of a2 the other being your data.
Then retable it just printing your data
 
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     Getting webfocus to respect spacing

Copyright © 1996-2020 Information Builders