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

Facebook Twitter LinkedIn YouTube
Go
New
Search
Notify
Tools
Reply
  
Heading alignment
 Login/Join
 
<Pietro De Santis>
posted
Has anyone figured out an elegant way to align heading elements to the body without using HEADALIGN=BODY?

Here's the problem.

I have a report with several Heading lines that I do not want to be affected by HEADALIGN=BODY. Elements in the last line of the Heading need to be aligned to columns in the body. This seems like it would be a classic type of report to style, but I can't get it to work. I've illustrated my problem with the image below. The line with "Fruit" and "Vegetables" needs to be aligned as shown.

The other Heading lines are made up of text and data columns, hence they would get lined up with columns in the body, which I do not want.

Ideally, WebFOCUS should allow HEADALIGN=BODY for specific Heading lines.

Any ideas?

Thanks,

Pietro.

 
Reply With QuoteReport This Post
Expert
posted Hide Post
your colors are gorgeous. You didn't like making fruits and vegetables the values of a variable named, say, FOODTYPE, and then using ACROSS FOODTYPE AS ''
and then messing with the ACROSSVALUE. ??
or making that headerline its own &var which you set to a '< table>< tr>< td width=xx>< td width=yy align=center>fruits< td width=zz align=center>veggies< /table>'
and then header line 4 is
'&MYHEAD4'
and then messing with your alignments that way??
or..
how about the sledge hammer way:
< DIV STYLE="position:absolute;top:55;left:55;font-size:12pt;font-weight:700;z-index:1"> &MYHEAD4 < /div>
maybe make it a little gif so you can get that gorgeous green bkg.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
<Pietro De Santis>
posted
Susannah,

Unfortunately, the report does not lend itself to ACROSS, it's more complex than the example.

I tried to fiddle about with the &VAR idea, but then the problem is that I would need to set the width of each of the report columns so I could figure out the width of the heading elements.

It seems strange it isn't easy to do with the WF style sheet.

Thanks for your suggestions. I may yet use the &VAR idea.

Regards,

Pietro.
 
Reply With QuoteReport This Post
<Grzegorz>
posted
Pietro,

You can also create artificial sort fields for each of the line (group of lines) in your HEADING. Then you can use SUBHEAD instead of HEADING with the BY=sortfield selection in the stylesheet. It will allow you to assign HEADALIGN option independently for each of the "heading" line.

The simple example:


DEFINE FILE CAR
BYHEAD1/I1 = 1;
BYHEAD2/I1 = 2;
BYHEAD3/I1 = 3;
COLTITLE/I1 = 4;
END
-RUN
TABLE FILE CAR
SUM SALES AS ''
BY BYHEAD1 NOPRINT
BY BYHEAD2 NOPRINT
BY BYHEAD3 NOPRINT
BY COLTITLE NOPRINT
BY COUNTRY AS ''
BY MODEL AS ''
BY CAR AS ''
ON BYHEAD1 SUBHEAD
"ITEM11<>ITEM12<>ITEM13"
ON BYHEAD2 SUBHEAD
"ITEM21<>ITEM22<>ITEM23"
ON BYHEAD3 SUBHEAD
"ITEM31<>ITEM32<>ITEM33"
ON COLTITLE SUBHEAD
"Country<>Model<>Car<>Sales"
ON TABLE SET PAGE-NUM OFF
ON TABLE SET STYLE *
TYPE=REPORT, HEADALIGN=INTERNAL,$
TYPE=SUBHEAD, BY=BYHEAD1, HEADALIGN=BODY,$
TYPE=SUBHEAD, BY=BYHEAD2, HEADALIGN=INTERNAL,$
TYPE=SUBHEAD, BY=BYHEAD3, HEADALIGN=NONE,$
TYPE=SUBHEAD, BY=COLTITLE, HEADALIGN=BODY,$
ENDSTYLE
END

Hope this helps
Grzegorz

This message has been edited. Last edited by: <Mabel>,
 
Reply With QuoteReport This Post
Expert
posted Hide Post
that's cool gregorz.
I remember that in mainframe there was a way to do exactly what you want. sort of column-super-headers, and the syntax was something OVER 3 WITH '_'
and that would center your FRUITS over 3 columns using the WITH character as the underline of the entire span. I don't know how to make this work in web, because i can't remember the exact syntax anyway. It wasn't a HEADING technique, but rather a columnheader-related thing; Maybe Chris Boylan, if you've got your ears on, will weigh in on this technique.
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Reply With QuoteReport This Post
Expert
posted Hide Post
Pietro,

As Susannah intimated above, you can always use a combination of defines to enable you to dice your fruits (sorry) as required.

Try the following example on the CAR file -



DEFINE FILE CAR
D_AUTO/D12 = IF MODEL CONTAINS 'AUTO' THEN DCOST ELSE 0 ;
R_AUTO/D12 = IF MODEL CONTAINS 'AUTO' THEN RCOST ELSE 0 ;
D_MANL/D12 = IF MODEL NOT CONTAINS 'AUTO' THEN DCOST ELSE 0 ;
R_MANL/D12 = IF MODEL NOT CONTAINS 'AUTO' THEN RCOST ELSE 0 ;
END

TABLE FILE CAR
SUM D_AUTO AS 'Dealer Cost,Automatics'
D_MANL AS 'Dealer Cost,Manuals'
R_AUTO AS 'Retail Cost,Automatics'
R_MANL AS 'Retail Cost,Manuals'
BY CAR AS ''
ACROSS COUNTRY AS ''
WHERE COUNTRY EQ 'ENGLAND'
OR COUNTRY EQ 'W GERMANY'
END

This message has been edited. Last edited by: <Mabel>,
 
Posts: 5608 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
  Powered by Social Strata  
 


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