I have a report that that users can select data up to five levels deep. The top line of the header reflects their selection criteria. I contatenate the selection description and show it centered on one line in the header. I have the HTML and Excel 2K versions working by using HTML code to format the headers. However, I cannot get the PDF version to work correctly. It looks at my contatenated report description and treats it as up to five separate fields, and therefore the formatting in not correct. I create the contatentated field as follows:
For some reason &HEAD2TEXT, which is build similarly to &HEAD1TEXT works as intended, but &HEAD1TEXT formats only the first part of the contatenation (the What am I doing wrong? Thanks.This message has been edited. Last edited by: <Maryellen>,
PROD: WebFOCUS 7.1.4 on Win 2003/Microsoft-IIS 6.0/ServletExec 4.2/JAVA version 1.5.0_09 DEV: WebFOCUS 7.6.1 on Win 2003/Microsoft-IIS 6.0/ServletExec 4.2/JAVA version 1.5.0_09 LOCAL: WebFOCUS 7.6.2 on Win XP SP2/Apache Tomcat 5.5.17/JAVA version 1.5.0_09
September 13, 2005, 07:32 PM
k.lane
It appears to me that after each & is evaluated, you end up with two fields in
I tried adding the OBJECT=FIELD .... I get the same results as before.
September 13, 2005, 08:25 PM
k.lane
Interesting. My data bolded, but I still did end up with the spacing issue.
Part of your problem is with the way PDF displays data in headings when using concatenation. Even though the content of the data column could be one character, if the field is defined with 20 characters, you get the full 20 characters displayed.
For example, if you do the following:
TABLE FILE CAR SUM SALES BY CAR ON CAR PAGE-BREAK HEADING "L1" "L2 <CAR <+0 <CAR" " " ON TABLE PCHOLD FORMAT PDF ON TABLE SET STYLE * TYPE=REPORT, ORIENTATION=LANDSCAPE, $ DEFMACRO=h-nml-bold-center, STYLE=BOLD, WIDTH=7.00, JUSTIFY=CENTER,$ TYPE=HEADING,LINE=2, OBJECT=FIELD, MACRO=h-nml-bold-center, $ ENDSTYLE END
You will see the two values of CAR spread out across the report. Now, if you do the following:
TABLE FILE CAR SUM SALES COMPUTE NEWCAR/A40 = {{ CAR || ' '} | CAR } ; NOPRINT BY CAR ON CAR PAGE-BREAK
HEADING "L1" "L2 <NEWCAR" " "
ON TABLE PCHOLD FORMAT PDF ON TABLE SET STYLE * TYPE=REPORT, ORIENTATION=LANDSCAPE, $ DEFMACRO=h-nml-bold-center, STYLE=BOLD, WIDTH=7.00, JUSTIFY=CENTER,$ TYPE=HEADING,LINE=2, OBJECT=FIELD, MACRO=h-nml-bold-center, $ ENDSTYLE END
The two values for car are near each other.
It is along these lines that you need to be thinking.
Ken
September 13, 2005, 09:23 PM
reFOCUSing
Matthew,
Is this the same problem you are getting?
-SET &CNTRYCAR = -SET &CNTRYCARBODY = -SET &COUNTRY = '-SET &CAR = '-SET &BODYTYPE = '-SET &HEADING01 = 'LEFT<+0>-SET &HEADING02 = 'RIGTH<+0>-SET &HEADING03 = 'CENTER<+0> TABLE FILE CAR PRINT RETAIL_COST AS '' DEALER_COST AS '' BY COUNTRY NOPRINT BY CAR NOPRINT BY BODYTYPE NOPRINT ON BODYTYPE SUBHEAD "LEFT<+0>&COUNTRY.EVAL" "RIGTH<+0>&CNTRYCAR.EVAL" "CENTER<+0>&CNTRYCARBODY.EVAL" -*"LEFT<+0>&COUNTRY.EVAL" -*"RIGTH<+0>&COUNTRY.EVAL<+0>&CAR.EVAL" -*"CENTER<+0>&COUNTRY.EVAL<+0>&CAR.EVAL<+0>&BODYTYPE.EVAL" -*"&HEADING01" -*"&HEADING02" -*"&HEADING03" -*"LEFT<+0>-*"RIGTH<+0>-*"CENTER<+0>ON TABLE PCHOLD FORMAT PDF ON TABLE SET STYLE * UNITS=IN,PAGESIZE='LEGAL',SQUEEZE=ON,ORIENTATION=LANDSCAPE,$
This message has been edited. Last edited by: <Maryellen>,
September 13, 2005, 09:48 PM
reFOCUSing
If I was correct in recreating your problem here is the reason why it happened.
When using I'm guessing this is what you want.
-SET &COUNTRY = -SET &CNTRYCAR = -SET &CNTRYCARBODY = DEFINE FILE CAR FIELD1/A100 = COUNTRY; FIELD2/A100 = COUNTRY || ' - ' || CAR; FIELD3/A100 = COUNTRY || ' - ' || CAR || ' - ' || BODYTYPE; END
TABLE FILE CAR PRINT RETAIL_COST AS '' DEALER_COST AS '' BY COUNTRY NOPRINT BY CAR NOPRINT BY BODYTYPE NOPRINT HEADING "LEFT<+0>"RIGTH<+0>"CENTER<+0>-*"LEFT<+0>&COUNTRY.EVAL" -*"RIGTH<+0>&CNTRYCAR.EVAL" -*"CENTER<+0>&CNTRYCARBODY.EVAL" ON TABLE PCHOLD FORMAT PDF ON TABLE SET STYLE * UNITS=IN,PAGESIZE='LEGAL',SQUEEZE=ON,ORIENTATION=LANDSCAPE,$