Focal Point
[SOLVED] Adjusting gap between Across Values and Data

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

April 30, 2010, 01:22 PM
bflemi3
[SOLVED] Adjusting gap between Across Values and Data
Hi All,

I was wondering if it was possible to adjust the gap that is displayed between Across Values and the Data without having to forgo using Across all together and use Defines?

From this:
                 Value1    Value2    Value3
Column1
XXX               123       199       399
YYY               990       488       875

To this:
Column1          Value1    Value2    Value3
XXX               123       199       399
YYY               990       488       875

  



Thanks for any and all help!

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


WebFOCUS 7.7
Windows
All Output (Excel, HTML, PDF)
April 30, 2010, 07:38 PM
Dan Satchell
Here is a technique that removes the unwanted blank line. Depending on the complexity of your report, it may or not provide a workable solution.

TABLE FILE CAR
 SUM SEATS/I5S AS ''
 BY BODYTYPE
 ACROSS COUNTRY
 ON TABLE SET ASNAMES ON
 ON TABLE HOLD AS HOLD1
END
-*
TABLE FILE HOLD1
 PRINT *
END


And here is another option. It replaces all column titles with a SUBHEAD for a dummy field. (This could also be done with HEADING and without the dummy field, but that approach might interfere with other report headings.) The drawback to this approach is that it requires that your output always have the same number of columns in the same order.

DEFINE FILE CAR
 DUMMY/A1 = ' ';
END
-*
TABLE FILE CAR
 SUM SEATS AS ''
 BY DUMMY NOPRINT
 BY BODYTYPE AS ''
 ACROSS COUNTRY NOPRINT
 ON DUMMY SUBHEAD
  "BODYTYPE<+0>ENGLAND<+0>FRANCE<+0>ITALY<+0>JAPAN<+0>W GERMANY"
 ON TABLE SET NODATA ' '
 ON TABLE SET STYLE *
  TYPE=SUBHEAD, HEADALIGN=BODY, $
 ENDSTYLE 
END



WebFOCUS 7.7.05
May 01, 2010, 03:11 AM
<JG>
And the dynamic version

 TABLE FILE CAR
SUM
COMPUTE RHEAD/A25='<+0>'||COUNTRY;
ACROSS COUNTRY NOPRINT
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SAVE
END
-RUN
DEFINE FILE CAR
 DUMMY/A1 = ' ';
END
-*
TABLE FILE CAR
SUM SEATS AS ''
 BY DUMMY NOPRINT
 BY BODYTYPE AS ''
 ACROSS COUNTRY NOPRINT
 ON DUMMY SUBHEAD
"BODYTYPE
-INCLUDE SAVE
"
 ON TABLE SET NODATA ' '
 ON TABLE SET STYLE *
  TYPE=SUBHEAD, HEADALIGN=BODY, $
 ENDSTYLE 
END 

May 01, 2010, 04:03 AM
Dan Satchell
A very nice solution JG.

I did find I had to make two minor changes to get your code to work in my environment. The negative spot marker removes an empty row that appeared below the column titles when I ran the code.

.
.
-MRNOEDIT -INCLUDE SAVE
<-1 "
.
.

This message has been edited. Last edited by: Dan Satchell,


WebFOCUS 7.7.05
May 01, 2010, 05:36 AM
<JG>
quote:
<-1

Thanks Dan that's actually what was wanted.

Yes the -MRNOEDIT is required when running in MRE because the INCLUDE does not physically exist
when the procedure is parsed.

You also get the same problem when running in later versions of Report Caster.

The technique there is to use an & variable

-DEFAULTH &INCLUDE='-INCLUDE SAVE'

.
&INCLUDE.EVAL
.
May 03, 2010, 09:10 AM
bflemi3
quote:
Originally posted by Dan Satchell:
Here is a technique that removes the unwanted blank line. Depending on the complexity of your report, it may or not provide a workable solution.

TABLE FILE CAR
 SUM SEATS/I5S AS ''
 BY BODYTYPE
 ACROSS COUNTRY
 ON TABLE SET ASNAMES ON
 ON TABLE HOLD AS HOLD1
END
-*
TABLE FILE HOLD1
 PRINT *
END


And here is another option. It replaces all column titles with a SUBHEAD for a dummy field. (This could also be done with HEADING and without the dummy field, but that approach might interfere with other report headings.) The drawback to this approach is that it requires that your output always have the same number of columns in the same order.

DEFINE FILE CAR
 DUMMY/A1 = ' ';
END
-*
TABLE FILE CAR
 SUM SEATS AS ''
 BY DUMMY NOPRINT
 BY BODYTYPE AS ''
 ACROSS COUNTRY NOPRINT
 ON DUMMY SUBHEAD
  "BODYTYPE<+0>ENGLAND<+0>FRANCE<+0>ITALY<+0>JAPAN<+0>W GERMANY"
 ON TABLE SET NODATA ' '
 ON TABLE SET STYLE *
  TYPE=SUBHEAD, HEADALIGN=BODY, $
 ENDSTYLE 
END


Thanks Dan,

I really like your first approach, it's so simple I didn't even think of that. My report is not complex so that should do the trick. Thanks again!

B


WebFOCUS 7.7
Windows
All Output (Excel, HTML, PDF)