Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Active Report - How to Create Gap/Padding Between Columns?
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Active Report - How to Create Gap/Padding Between Columns?
 Login/Join
 
Master
posted
My users are seeing an Active Report formatted report from the following code:
TABLE FILE CAR
  PRINT CAR NOPRINT
  COMPUTE FN/A50V = 'IMABROOKE'; AS 'First,Name'
  COMPUTE LN/A50V = 'TROUT';  AS 'Last,Name'
  ON TABLE PCHOLD FORMAT AHTML
  ON TABLE SET STYLE *
   TYPE=REPORT,GRID=OFF,FONT='Arial',SIZE=8,COLOR=RGB(50 50 50),$
   TYPE=REPORT,ALLOW-COMMENTS=OFF,$
   TYPE=REPORT,
    OBJECT=MENU,
    COLOR=RGB(53 78 109),
    HOVER-COLOR=RGB(53 78 109),
    BACKCOLOR=RGB(241 245 249),
    HOVER-BACKCOLOR=RGB(81 215 235),
    $
   TYPE=TITLE, JUSTIFY=CENTER,$
   TYPE=TITLE,SIZE=9,STYLE=-UNDERLINE+BOLD,BACKCOLOR=RGB(220 218 195),COLOR=RGB(134 10 39),
    BORDER-STYLE=OUTSET,BORDER=LIGHT,BORDER-COLOR=RGB(255 255 255),$
   TYPE=DATA,
    BORDER-LEFT-STYLE=NONE,BORDER-LEFT=MEDIUM,BORDER-LEFT-COLOR=RGB(255 255 255),
    BORDER-RIGHT-STYLE=NONE,BORDER-RIGHT=LIGHT,BORDER-RIGHT-COLOR=RGB(255 255 255),
    BORDER-BOTTOM-STYLE=NONE,BORDER-BOTTOM=LIGHT,
    BORDER-BOTTOM-COLOR=RGB(255 255 255),
    BACKCOLOR=( 'WHITE' RGB(227 232 238) ),
    $
   TYPE=REPORT,
    OBJECT=STATUS-AREA,
    JUSTIFY=CENTER,
    PAGE-LOCATION=BOTTOM,
    $
 ENDSTYLE
 END  


The 'E' of the First Name is smack tab too close to the first 'T' in Last Name for my users taste.

I cannot find anyway to put in a 'gap' between the two columns.

I really can't set specific width to one/both of the columns b/c in the next run the values could have more or less letters.

I also can't go to AUTOFIT, since my container is wide, and so then my columns would have too much of a gap. (Goldilocks where are you? :-))

Any/all ideas welcome.

This message has been edited. Last edited by: FP Mod Chuck,




Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2012/Tomcat Standalone Workstation: Windows 7/IE 11 Database: Oracle 12c/Netezza Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer, & ReportCaster

 
Posts: 761 | Registered: April 23, 2003Reply With QuoteReport This Post
Expert
posted Hide Post
Consider the use of TOPGAP, BOTTOMGAP, LEFTGAP, and RIGHTGAP in your stylesheet.

C/O Goldilocks


   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Most recent: 8204 Gen 48 in Test and Production.
   Currently Available. Please contact me.
 
Posts: 2976 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Master
posted Hide Post
Thanks Doug!

I think though those *GAP parms are more for PDF formatted reports, rather than AHTML.

Or at least that is what I think from reading the manual and trying them out.

I guess you can say I am shopping at Old Navy and not the *GAP. :-)




Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2012/Tomcat Standalone Workstation: Windows 7/IE 11 Database: Oracle 12c/Netezza Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer, & ReportCaster

 
Posts: 761 | Registered: April 23, 2003Reply With QuoteReport This Post
Expert
posted Hide Post
David,
Works for me in 7.7.05(Don't laugh too hard!) -
play around with the SQUEEZE value:

TYPE=DATA, COLUMN=N2, SQUEEZE=2, $

hth


Tom Flynn
WebFOCUS 7.7.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1946 | Location: Parker, CO | Registered: January 31, 2006Reply With QuoteReport This Post
Master
posted Hide Post
Thanks Tom.

I don't think I can set width of the 'First Name' column because I don't know necessarily how wide the values will be for any given report run.

So setting SQUEEZE = 2 works for the 'current value' of First Name.

And, as soon as, I have...:
  COMPUTE FN/A150V = 'IMABROOKEIMABROOKEIMABROOKEIMABROOKEIMABROOKEIMABROOKEIMABROOKE'; AS 'First,Name' 

...as the 'incoming value', I again have a teeny weeny gap between the columns.

{No problem still being on 77x, guessing you all have a lot of legacy apps that keep on keeping on, and don't necessarily need the 8x feature set. :-)}
 
Posts: 761 | Registered: April 23, 2003Reply With QuoteReport This Post
Expert
posted Hide Post
Sorry about that David. I used the GAP in "ON TABLE HOLD AS REPORT1 FORMAT HTMTABLE" then did a simple HTMLFORM...

How about DEFINEing a "SPACE/A1 = ''" and placing it between the first and last names?
 
Posts: 2976 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Master
posted Hide Post
Yep, did create a spacer column and place it in between the two displayed columns.

But, with Active, I get the 'upside down triangle' menu thingy, which would raise questions with the users like...Is there a column missing data?...
 
Posts: 761 | Registered: April 23, 2003Reply With QuoteReport This Post
Expert
posted Hide Post
Hi David,
Well, you can find the max of the column length and set SQUEEZE accordingly? Just a thought...

  
DEFINE FILE IBISAMP/CAR
  COL1_LEN/I3 = ARGLEN(10, COUNTRY, COL1_LEN); 
  COL2_LEN/I3 = ARGLEN(16, CAR, COL2_LEN); 
  COL3_LEN/I3 = ARGLEN(24, MODEL, COL3_LEN); 
END
TABLE FILE IBISAMP/CAR
SUM
    MAX.COL1_LEN
    MAX.COL2_LEN
    MAX.COL3_LEN

ON TABLE HOLD FORMAT ALPHA
END
-RUN
-READ HOLD &COL1X.I3 &COL2X.I3 &COL3X.I3
-TYPE COL1 = &COL1X
-TYPE COL2 = &COL2X
-TYPE COL3 = &COL3X

-SET &COL1_SQ = IF &COL1X LE 10 THEN 1 ELSE
-               IF &COL1X GT 10 AND &COL1X LE 30 THEN 2 ELSE 3;
-TYPE Col 1 SQUEEZE Value: &COL1_SQ
-EXIT


Tom Flynn
WebFOCUS 7.7.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1946 | Location: Parker, CO | Registered: January 31, 2006Reply With QuoteReport This Post
Master
posted Hide Post
Thanks Tom!

Yes, running through the dataset in order to support report time code creation is a great technique.

In my scenario though, I am looking for something a little more direct, as I have many columns in my report. And hopefully I can have something that can be applied by other developers, when the need for Active Report padding arises in other reports.

Thanks again.
 
Posts: 761 | Registered: April 23, 2003Reply With QuoteReport This Post
Master
posted Hide Post
Looks like this is what the doctor ordered:
-* File ActiveReportColumnPadding.fex
TABLE FILE CAR
  PRINT CAR NOPRINT
  COMPUTE FN/A50V = 'IMABROOKE'; AS 'First,Name'
  COMPUTE LN/A50V = 'TROUT';     AS 'Last,Name'
  ON TABLE HOLD AS REPORT1 FORMAT AHTMLTAB
  ON TABLE SET STYLE *
   TYPE=REPORT,GRID=OFF,FONT='Arial',SIZE=8,COLOR=RGB(50 50 50),$
   TYPE=REPORT,ALLOW-COMMENTS=OFF,$
   TYPE=REPORT,
    OBJECT=MENU,
    COLOR=RGB(53 78 109),
    HOVER-COLOR=RGB(53 78 109),
    BACKCOLOR=RGB(241 245 249),
    HOVER-BACKCOLOR=RGB(81 215 235),
    $
   TYPE=TITLE, JUSTIFY=CENTER,$
   TYPE=TITLE,SIZE=9,STYLE=-UNDERLINE+BOLD,BACKCOLOR=RGB(220 218 195),COLOR=RGB(134 10 39),
    BORDER-STYLE=OUTSET,BORDER=LIGHT,BORDER-COLOR=RGB(255 255 255),$
   TYPE=DATA,
    BORDER-LEFT-STYLE=NONE,BORDER-LEFT=MEDIUM,BORDER-LEFT-COLOR=RGB(255 255 255),
    BORDER-RIGHT-STYLE=NONE,BORDER-RIGHT=LIGHT,BORDER-RIGHT-COLOR=RGB(255 255 255),
    BORDER-BOTTOM-STYLE=NONE,BORDER-BOTTOM=LIGHT,
    BORDER-BOTTOM-COLOR=RGB(255 255 255),
    BACKCOLOR=( 'WHITE' RGB(227 232 238) ),
    $
   TYPE=REPORT,
    OBJECT=STATUS-AREA,
    JUSTIFY=CENTER,
    PAGE-LOCATION=BOTTOM,
    $
ENDSTYLE
END
-RUN
-HTMLFORM BEGIN
<HTML>
<HEAD>
<TITLE></TITLE>
<style>
td[id^="I0r"] {
    padding-right: 20px !important;
}
</style>
</HEAD>
<BODY>
!IBI.OBJ.ACTIVEREPORTJS;
!IBI.FIL.REPORT1;
</BODY>
</HTML>
-HTMLFORM END   


I use the CSS padding property, and a CSS selector that selects the 'cells' of the Active Report.

I've put the CSS in a -INCLUDE, in case IB changes the identifiers of the cells, and if that is ever the case, I can easily adapt. Or if IB comes up with a StyleSheet attribute for column padding in Active Reports, again I could easily, given the -INCLUDE turn this CSS off.
 
Posts: 761 | Registered: April 23, 2003Reply With QuoteReport This Post
Expert
posted Hide Post
Very Good David! Excellent idea, technique and process.
Well Done!!!


Tom Flynn
WebFOCUS 7.7.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1946 | Location: Parker, CO | Registered: January 31, 2006Reply With QuoteReport This Post
Expert
posted Hide Post
Ditto to Tom's reply...

td[id^="I0r"] {padding-right: 20px !important;}
 
 
Posts: 2976 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
Thanks, I forgot about using "JUSTIFY=CENTER" here:
quote:
TYPE=REPORT, OBJECT=STATUS-AREA, JUSTIFY=CENTER, PAGE-LOCATION=BOTTOM,$
 
Posts: 2976 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Active Report - How to Create Gap/Padding Between Columns?

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.