Focal Point
[SOLVED] Report Formatting: Row with a border

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

March 30, 2010, 07:38 AM
Stefan
[SOLVED] Report Formatting: Row with a border
Hi there,

I'm want to have a report looking like this::

Country Model Measure_A
A x 100
y 150
z 30
B a 20
b 10
c 100


Now I want a border on all corresponding rows when I have a sort-break:

Country Model Measure_A
-----------------------------|
|A x 100 |
| y 150 |
| z 30 |
-----------------------------|
|B a 20 |
| b 10 |
| c 100 |
-----------------------------|


The "-" and "|" ist intended to mark something like
<TR "border=1">
in HTML.

Unfortunately, I have no clue how to do this in WebFOCUS.

Any ideas are appreciated.

Kind regadrs,

Stefan

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


WF 7.6.9
PMF 5.1.3
BID 7.6.9

Win XP
HTML, PDF, Excel, PowerPoint
March 30, 2010, 08:26 AM
Ram Prasad E
Here is a code for PDF using UNDER-LINE

TABLE FILE CAR
PRINT 
CAR
SALES
BY COUNTRY
ON COUNTRY UNDER-LINE
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET PAGE-NUM OFF
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
TYPE=REPORT, GRID=OFF, $
ENDSTYLE
END 



WebFOCUS 8.1.05
Windows
http://ibiwebfocus.wordpress.com
https://www.facebook.com/groups/ibi.webfocus/
March 30, 2010, 09:27 AM
Stefan
Ram,

thanks for your reply.

Unfortunately, i think I was a little bit misunderstandable.

My original code looks like this:
TABLE FILE CAR
SUM 
     'CAR.BODY.SEATS'
BY 'CAR.ORIGIN.COUNTRY'
BY 'CAR.COMP.CAR'
     
ON TABLE SET PAGE-NUM OFF 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
ENDSTYLE
END  



I want a frame/border drawn in that way, that all cars beloging to a country have one specifif frame to visualize that they belong together.

This means one frame/ border for England, one for France etc...

When I use the code below, I get subtotals with a border on these subtotals. I'm loogink for a border around the whole group....

 TABLE FILE CAR
SUM 
     'CAR.BODY.SEATS'
BY 'CAR.ORIGIN.COUNTRY'
BY 'CAR.COMP.CAR'
     
ON CAR.ORIGIN.COUNTRY SUBTOTAL AS '*TOTAL'
ON TABLE SET PAGE-NUM OFF 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,

$
TYPE=SUBTOTAL,
     BY=1,
     BORDER-TOP=LIGHT,
     BORDER-BOTTOM=LIGHT,
     BORDER-LEFT=LIGHT,
     BORDER-RIGHT=LIGHT,
$
ENDSTYLE
END
 



WF 7.6.9
PMF 5.1.3
BID 7.6.9

Win XP
HTML, PDF, Excel, PowerPoint
March 30, 2010, 09:27 AM
Dan Satchell
This code seems to work for both HTML and PDF output formats.

TABLE FILE CAR
 PRINT CAR
       SALES
 BY COUNTRY
 ON COUNTRY SUBFOOT
  " "
 ON TABLE PCHOLD FORMAT PDF
 ON TABLE SET PAGE-NUM OFF
 ON TABLE SET HTMLCSS ON
 ON TABLE SET STYLE *
  TYPE=REPORT, GRID=OFF, SQUEEZE=ON, $
  TYPE=REPORT, COLUMN=COUNTRY, BORDER-LEFT=LIGHT, $
  TYPE=REPORT, COLUMN=SALES, BORDER-RIGHT=LIGHT, $
  TYPE=SUBFOOT, SIZE=1, BORDER-BOTTOM=LIGHT, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT, $
  TYPE=TITLE, BORDER-TOP=LIGHT, BORDER-BOTTOM=LIGHT, STYLE=-UNDERLINE, $
 ENDSTYLE
END



WebFOCUS 7.7.05
March 30, 2010, 09:42 AM
GinnyJakes
Here is another take on your problem. You can identify the sort groups by color:
TABLE FILE CAR
PRINT SALES
BY COUNTRY
BY CAR
BY MODEL
HEADING CENTER
"CAR SALES REPORT"
ON TABLE SET PAGE NOPAGE
ON TABLE SET STYLE *
TYPE=DATA, BACKCOLOR=(BY=COUNTRY SILVER PINK), $
TYPE=TITLE, STYLE=BOLD, BACKCOLOR='PINK', $
TYPE=HEADING, STYLE=BOLD, BACKCOLOR='SILVER', $
ENDSTYLE
END
This can be done in the Report Painter or code.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
March 30, 2010, 09:54 AM
Stefan
Ginny,

thanks for your idea.

Instead of the colors I want a border on each group.


Best,

Stefan


WF 7.6.9
PMF 5.1.3
BID 7.6.9

Win XP
HTML, PDF, Excel, PowerPoint
March 30, 2010, 03:54 PM
mrguru
The closest I could come to what I think you were looking for.

  
TABLE FILE CAR
SUM 
     SEATS
BY COUNTRY
BY CAR
     
ON COUNTRY SUBTOTAL AS '*TOTAL'
ON TABLE SET PAGE-NUM OFF 
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
     UNITS=IN,
     SQUEEZE=ON,
     ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
     FONT='TIMES NEW ROMAN',
     SIZE=10,
$
TYPE=TITLE,
-*     COLUMN=N2,
     BORDER-BOTTOM=LIGHT,
$
TYPE=DATA,
     COLUMN=N1,
     BORDER-TOP=OFF,
     BORDER-LEFT=LIGHT,
$
TYPE=DATA,
     COLUMN=N3,
     BORDER-TOP=OFF,
     BORDER-RIGHT=LIGHT,
$
-*TYPE=TITLE,
-*     COLUMN=N1,
-*-*     BORDER-TOP=LIGHT,
-*     BORDER-LEFT=LIGHT,
-*$
-*TYPE=TITLE,
-*     COLUMN=N3,
-*-*     BORDER-TOP=LIGHT,
-*     BORDER-RIGHT=LIGHT,
-*$
TYPE=SUBTOTAL,
     BY=1,
     BORDER-BOTTOM=LIGHT,
     BORDER-LEFT=LIGHT,
     BORDER-RIGHT=LIGHT,
$
ENDSTYLE
END




WF 8.2.01M
8.2.01M Reporting Server
Windows 2012 Srvr R2
PDF,Excel, HTML
Graphs - a lot of graphs
March 30, 2010, 06:20 PM
Dan Satchell
TABLE FILE CAR
 SUM SEATS
 BY COUNTRY
 BY CAR
 ON COUNTRY SUBTOTAL AS '*TOTAL'
 ON TABLE PCHOLD FORMAT HTML
 ON TABLE NOTOTAL
 ON TABLE SET PAGE-NUM OFF
 ON TABLE SET HTMLCSS ON
 ON TABLE SET STYLE *
  TYPE=REPORT, GRID=OFF, SQUEEZE=ON, $
  TYPE=REPORT, COLUMN=COUNTRY, BORDER-LEFT=LIGHT, $
  TYPE=REPORT, COLUMN=SEATS, BORDER-RIGHT=LIGHT, $
  TYPE=TITLE, BORDER-TOP=LIGHT, BORDER-BOTTOM=LIGHT, STYLE=-UNDERLINE, $
  TYPE=SUBTOTAL, BORDER-BOTTOM=LIGHT, $
 ENDSTYLE
END



WebFOCUS 7.7.05
March 31, 2010, 03:33 AM
Stefan
Hi there,

thanks all for your ideas.

I think Dan's proposal is closest to what I am thinking of.

The only thing that I would like to skip are the sub-totals, as I do not need them.

I played with it for a while, but when I remove the sub-totals the whole formatting is gone.

Kind regards,

Stefan


WF 7.6.9
PMF 5.1.3
BID 7.6.9

Win XP
HTML, PDF, Excel, PowerPoint
March 31, 2010, 03:51 AM
Dan Satchell
Did you consider my earliest post?


WebFOCUS 7.7.05
March 31, 2010, 05:55 AM
Stefan
Dan,

I considered both of your posts.

Your first one's great, but for some reason I have to use borders instead of frames.

Your second post is, as i mentionend, nearly close to what I am looking for.

I need the border on each group, but I don't want the sub-totals.

Kind regards,

Stefan

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


WF 7.6.9
PMF 5.1.3
BID 7.6.9

Win XP
HTML, PDF, Excel, PowerPoint
March 31, 2010, 06:23 AM
Ram Prasad E
A little workaround. There may be much simpler one than the below.

TABLE FILE CAR
SUM
SEATS
BY COUNTRY
BY CAR
ON TABLE HOLD
END
-RUN
-SET &LNS=&LINES;
TABLE FILE HOLD
 SUM 
   SEATS
   COMPUTE BDR_A/A1=IF COUNTRY EQ LAST COUNTRY THEN 'N' ELSE 'Y'; NOPRINT
   COMPUTE CNTR_A/I2=CNTR+1; NOPRINT
 BY COUNTRY
 BY CAR
 ON TABLE PCHOLD FORMAT HTML
 ON TABLE NOTOTAL
 ON TABLE SET PAGE-NUM OFF
 ON TABLE SET HTMLCSS ON
 ON TABLE SET STYLE *
  TYPE=REPORT, GRID=OFF, SQUEEZE=ON, $
  TYPE=REPORT, COLUMN=COUNTRY, BORDER-LEFT=LIGHT, $
  TYPE=REPORT, COLUMN=SEATS, BORDER-RIGHT=LIGHT, $
  TYPE=TITLE, BORDER-TOP=LIGHT, BORDER-BOTTOM=LIGHT, STYLE=-UNDERLINE, $
  TYPE=DATA, BORDER-TOP=LIGHT, WHEN=BDR_A EQ 'Y',$
  TYPE=DATA, BORDER-BOTTOM=LIGHT, WHEN=CNTR_A EQ &LNS, $
 ENDSTYLE
END



WebFOCUS 8.1.05
Windows
http://ibiwebfocus.wordpress.com
https://www.facebook.com/groups/ibi.webfocus/
March 31, 2010, 08:14 AM
Dan Satchell
quote:
I considered both of your posts.
Your first one's great, but for some reason I have to use borders instead of frames.

Frames? My first post uses borders and a subfoot, and does not have subtotals.


WebFOCUS 7.7.05
March 31, 2010, 08:24 AM
Stefan
@ Dan,
sorry a little typing mistake from my side,
i meant "colours" instead of "frames".

Actually I working with Ram's workaround,
and it seems to work.

I'm trying do make it more simple and I'll post the code as soon as it works.

Kind regards,

Stefan


WF 7.6.9
PMF 5.1.3
BID 7.6.9

Win XP
HTML, PDF, Excel, PowerPoint
March 31, 2010, 08:31 AM
Dan Satchell
quote:
i meant "colours" instead of "frames".

Colours? To avoid any further confusion, here is my first post again:

TABLE FILE CAR
 PRINT CAR
       SALES
 BY COUNTRY
 ON COUNTRY SUBFOOT
  " "
 ON TABLE PCHOLD FORMAT PDF
 ON TABLE SET PAGE-NUM OFF
 ON TABLE SET HTMLCSS ON
 ON TABLE SET STYLE *
  TYPE=REPORT, GRID=OFF, SQUEEZE=ON, $
  TYPE=REPORT, COLUMN=COUNTRY, BORDER-LEFT=LIGHT, $
  TYPE=REPORT, COLUMN=SALES, BORDER-RIGHT=LIGHT, $
  TYPE=SUBFOOT, SIZE=1, BORDER-BOTTOM=LIGHT, BORDER-LEFT=LIGHT, BORDER-RIGHT=LIGHT, $
  TYPE=TITLE, BORDER-TOP=LIGHT, BORDER-BOTTOM=LIGHT, STYLE=-UNDERLINE, $
 ENDSTYLE
END



WebFOCUS 7.7.05
March 31, 2010, 09:40 AM
Ram Prasad E
quote:

ON COUNTRY SUBFOOT
" "

Dan's code is much straight forward. Thanks Dan.


WebFOCUS 8.1.05
Windows
http://ibiwebfocus.wordpress.com
https://www.facebook.com/groups/ibi.webfocus/
April 06, 2010, 05:27 AM
Stefan
Hi there,

Ram's proposal seems to work for me.
Thanks all for your help.

Stefan


WF 7.6.9
PMF 5.1.3
BID 7.6.9

Win XP
HTML, PDF, Excel, PowerPoint