Focal Point
[CLOSED] Field Alignment using Spot Markers in Footings using InfoAssist+

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

September 04, 2018, 03:51 PM
Doug
[CLOSED] Field Alignment using Spot Markers in Footings using InfoAssist+
How do we align fields in the FOOTING of an InfoAssist+ report formatted for HTML or AHTML when the Spot Markers don't make it into the stylesheet?

Notice that the Spot Markers are in the FOOTING line and they are not in the TYPE=FOOTING lines.

Notes:
  1) This is using 8202M Gen 60.
  2) 'POSITION' doesn't work in HTML or AHTML. Should't it? Didn't it ever work?
  3) 'POSITION' works in PDF.
  4) I need this in either HTML or AHTML for use in a Portal.
-*Do not delete or modify the comments below
-* I deleted these lines for the sake of Focal Point.
-*Do not delete or modify the comments above

ENGINE INT CACHE SET ON
SET PAGE-NUM=NOLEAD
SET SQUEEZE=ON
-DEFAULTH &WF_HTMLENCODE=ON;
SET HTMLENCODE=&WF_HTMLENCODE

SET HTMLCSS=ON
-DEFAULTH &WF_EMPTYREPORT=ON;
SET EMPTYREPORT=&WF_EMPTYREPORT

-DEFAULTH &WF_SUMMARY='Summary';
-DEFAULTH &WF_TITLE='WebFOCUS Report';
-* This is a totally bogus report.
TABLE FILE baseapp/car
SUM CAR.BODY.DEALER_COST
CAR.BODY.RETAIL_COST
-* These are totally bogus computes.
COMPUTE Compute_1/D12=CAR.BODY.RETAIL_COST / CAR.SPECS.WHEELBASE ; NOPRINT
COMPUTE Compute_2/D12=CAR.BODY.DEALER_COST / CAR.SPECS.MPG ; NOPRINT
BY CAR.SPECS.WHEELBASE
BY CAR.ORIGIN.COUNTRY
BY CAR.COMP.CAR
BY CAR.CARREC.MODEL
FOOTING
"<0><Compute_1><+0> <Compute_2><+0> <DEALER_COST><+0> <RETAIL_COST>"
ON TABLE PCHOLD FORMAT HTML
ON TABLE NOTOTAL
ON TABLE SET CACHELINES 100
ON TABLE SET GRWIDTH 1
ON TABLE SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$
TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, SUMMARY=&WF_SUMMARY.QUOTEDSTRING, ORIENTATION=LANDSCAPE, $
TYPE=FOOTING, LINE=1, JUSTIFY=LEFT, $
TYPE=FOOTING, LINE=1, ITEM=1, OBJECT=FIELD, SIZE=10, STYLE=NORMAL, $
TYPE=FOOTING, LINE=1, ITEM=1, OBJECT=TEXT, SIZE=10, STYLE=NORMAL, $
TYPE=FOOTING, LINE=1, ITEM=2, OBJECT=FIELD, SIZE=10, STYLE=NORMAL, $
TYPE=FOOTING, LINE=1, ITEM=2, OBJECT=TEXT, SIZE=10, STYLE=NORMAL, $
TYPE=FOOTING, LINE=1, ITEM=3, OBJECT=FIELD, SIZE=10, STYLE=NORMAL, $
TYPE=FOOTING, LINE=1, ITEM=3, OBJECT=TEXT, SIZE=10, STYLE=NORMAL, $
TYPE=FOOTING, LINE=1, ITEM=4, OBJECT=FIELD, SIZE=10, STYLE=NORMAL, $
ENDSTYLE
END

-RUN

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




   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Current: WebFOCUS Administrator at FIS Worldpay | 8204, 8206
September 04, 2018, 04:42 PM
BabakNYC
I doubt InfoAssist will ever give you that kind of development capability. It's meant to be a Power User authoring tool, not a development UI which is why there's App Studio.


WebFOCUS 8206, Unix, Windows
September 04, 2018, 05:25 PM
Doug
I hear you... But, it's disappointing when a user needs to convert an Excel report which has two 'footing' lines at the end of a report which are 'computes' on above cells in the same column. Here's a sample of what they need to replicate, this is totally bogus data BTW. B15:H15 and B16:H16 are calculated using the above columns.

This message has been edited. Last edited by: Doug,
September 05, 2018, 03:18 AM
Tony A
Hi Doug,

You're not going to like this, but .....

Simply educate your IA users to edit in the text editor to set the footing and also add HEADALIGN=BODY, within the style for TYPE=REPORT and save.

They will get the "modified outside of IA" warning but they can continue to open it within the GUI and their FOOTING changes will remain in place. Try it.

Don't forget to advise on the correct spot marker syntax though to ensure they get it right!!! e.g. using <+0> and not <0>


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
September 05, 2018, 08:02 AM
S.J. Kadish
Also, please post the InfoAssist items in the new InfoAssist forum.

Sandy


Sandy Kadish
Dev: 8.2.04- PostgreSQL
Test: 8.2.04 - PostgreSQL
Prod: 8.2.04 - PostgreSQL
September 05, 2018, 08:50 AM
Doug
Thanks Tony,

I know we can do it in WebFOCUS, just not all in the GUI (yet?). 8202M G60

Not there yet. Consider / what's wrong with the the following code. It 'skips' columns. Let me know your release / gen if this works for you.
DEFINE FILE CAR
 AMT_ENGLAND/D12C =IF COUNTRY EQ 'ENGLAND'   THEN DCOST ELSE 0 ;
 AMT_FRANCE/D12C  =IF COUNTRY EQ 'FRANCE'    THEN DCOST ELSE 0 ;
 AMT_ITALY/D12C   =IF COUNTRY EQ 'ITALY'     THEN DCOST ELSE 0 ;
 AMT_JAPAN/D12C   =IF COUNTRY EQ 'JAPAN'     THEN DCOST ELSE 0 ;
 AMT_WGERMANY/D12C=IF COUNTRY EQ 'W GERMANY' THEN DCOST ELSE 0 ;
END
TABLE FILE CAR
SUM AMT_ENGLAND  AS 'England'
    AMT_FRANCE   AS 'France'
    AMT_ITALY    AS 'Italy'
    AMT_JAPAN    AS 'Japan'
    AMT_WGERMANY AS 'W Germany'
BY  COUNTRY BY CAR BY MODEL
FOOTING
"<+0> <+0> <+0> <TOT.AMT_ENGLAND><+0><TOT.AMT_FRANCE><+0><TOT.AMT_ITALY><+0><TOT.AMT_JAPAN><+0><TOT.AMT_WGERMANY>"
"<+0> <+0> <+0> <TOT.AMT_ENGLAND><0><TOT.AMT_FRANCE><0><TOT.AMT_ITALY><0><TOT.AMT_JAPAN><0><TOT.AMT_WGERMANY>"
"<+0> <+0> <+0> <TOT.AMT_ENGLAND><TOT.AMT_FRANCE><TOT.AMT_ITALY><TOT.AMT_JAPAN><TOT.AMT_WGERMANY>"
ON TABLE SET GRWIDTH 1
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET WEBVIEWER OFF
ON TABLE SET WEBVIEWTARG OFF
ON TABLE SET CACHELINES 100
ON TABLE SET HTMLEMBEDIMG ON
ON TABLE SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/combine_templates/ENBlue_Light1.sty,$
TYPE=REPORT, HEADALIGN=BODY, PAGESIZE=LEGAL, ORIENTATION=LANDSCAPE, SIZE=12,$
TYPE=DATA, JUSTIFY=RIGHT, WRAP=1.0,$
TYPE=TITLE,JUSTIFY=CENTER,$
TYPE=FOOTING, JUSTIFY=LEFT, SIZE=11, COLOR=BLACK,$
TYPE=FOOTING, ITEM=1, OBJECT=FIELD, JUSTIFY=RIGHT, $
TYPE=FOOTING, ITEM=2, OBJECT=FIELD, JUSTIFY=RIGHT, $
TYPE=FOOTING, ITEM=3, OBJECT=FIELD, JUSTIFY=RIGHT, $
ENDSTYLE
END
-RUN

~ Doug

This message has been edited. Last edited by: Doug,
September 05, 2018, 06:15 PM
Doug
I did this. However, ARG, I needed to do it in two reports (compound).The first report is the top part, rows 1-14, the lower report is rows 15 and 16. Row 15 is just the calculations needed for that row, values from row 14 - row 2. Row 16 is row 15 / row 2. A lot of code went into making that happen.


So, about this:
"It's meant to be a Power User authoring tool"

If that's what the Power User needs, that's what they should be able to do, imho.



~ Doug
September 06, 2018, 03:08 AM
Tony A
Doug,

It's all down to the use of fields, spot markers and experience. I don't think this particular usage is documented and it hasn't changed over the years.

However, I do not believe <0> is a spot marker.

Use the following and get rid of the TYPE=FOOTING lines as they are doing nothing here.

FOOTING
"<+0> <+0> <+0> <TOT.AMT_ENGLAND<TOT.AMT_FRANCE<TOT.AMT_ITALY<TOT.AMT_JAPAN<TOT.AMT_WGERMANY"


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
September 06, 2018, 04:55 AM
Tony A
quote:
2) 'POSITION' doesn't work in HTML or AHTML. Should't it? Didn't it ever work?
3) 'POSITION' works in PDF.

Apologies, I forgot these two points!

Check out the documentation

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
September 06, 2018, 09:14 AM
Doug
Thanks for the
FOOTING
"<+0> <+0> <+0> <TOT.AMT_ENGLAND<TOT.AMT_FRANCE<TOT.AMT_ITALY<TOT.AMT_JAPAN<TOT.AMT_WGERMANY"
Too many spot markers aren'e good to have.

Apologies accepted.

Run that code with and without the following lines. I get either right aligned or not for those fields.
TYPE=TITLE,JUSTIFY=CENTER,$
TYPE=FOOTING, JUSTIFY=LEFT, SIZE=11, COLOR=BLACK,$
TYPE=FOOTING, ITEM=1, OBJECT=FIELD, JUSTIFY=RIGHT, $
TYPE=FOOTING, ITEM=2, OBJECT=FIELD, JUSTIFY=RIGHT, $
TYPE=FOOTING, ITEM=3, OBJECT=FIELD, JUSTIFY=RIGHT, $
The other two fields remain the same. Perhaps a version / gen difference?
September 06, 2018, 10:47 AM
Tony A
No version/gen difference as this is running perfectly on 8.2.01 through 8.2.04.


Knowing what you can manipulate to encourage the output how you need it is always key. This is another way of achieving the output -

DEFINE FILE CAR
 AMT_ENGLAND/D12C =IF COUNTRY EQ 'ENGLAND'   THEN DCOST ELSE 0 ;
 AMT_FRANCE/D12C  =IF COUNTRY EQ 'FRANCE'    THEN DCOST ELSE 0 ;
 AMT_ITALY/D12C   =IF COUNTRY EQ 'ITALY'     THEN DCOST ELSE 0 ;
 AMT_JAPAN/D12C   =IF COUNTRY EQ 'JAPAN'     THEN DCOST ELSE 0 ;
 AMT_WGERMANY/D12C=IF COUNTRY EQ 'W GERMANY' THEN DCOST ELSE 0 ;
END
TABLE FILE CAR
SUM AMT_ENGLAND  AS 'England'
    AMT_FRANCE   AS 'France'
    AMT_ITALY    AS 'Italy'
    AMT_JAPAN    AS 'Japan'
    AMT_WGERMANY AS 'W Germany'
BY  COUNTRY BY CAR BY MODEL
FOOTING
-* Here, just use the column names prefixed with the left carat but not suffixed with the right carat.
-* No need for additional spot markers as the fieldname is considered a spot marker in its own right.
"<TOT.AMT_ENGLAND<TOT.AMT_FRANCE<TOT.AMT_ITALY<TOT.AMT_JAPAN<TOT.AMT_WGERMANY"
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
INCLUDE=IBFS:/FILE/IBI_HTML_DIR/javaassist/intl/EN/combine_templates/ENBlue_Light1.sty,$
TYPE=REPORT, HEADALIGN=BODY, PAGESIZE=LEGAL, ORIENTATION=LANDSCAPE, SIZE=12,  $
TYPE=DATA, JUSTIFY=RIGHT, WRAP=1.0, $
TYPE=TITLE, JUSTIFY=CENTER, $
-* Set global footing styling including justification
TYPE=FOOTING, JUSTIFY=RIGHT, SIZE=11, COLOR=BLACK, $
-* By setting the colspan for item 1, you are essentially positioning the value
-* under the AMT_ENGLAND column with right justification.
-* All other columns will fall below subsequent columns due to the HEADALIGN
TYPE=FOOTING, LINE=1, ITEM=1, COLSPAN=4, $
ENDSTYLE
END
-RUN


T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
September 26, 2018, 12:03 PM
Doug
So, the following statement is TRUE, right?
An InfoAssist User cannot COMPUTE a field, hide that COMPUTEd field, and display that COMPUTEd field in the REPORT FOOTING aligned under a specific SUMmed or PRINTed column.

September 26, 2018, 12:21 PM
BabakNYC
All signs point to yes.


WebFOCUS 8206, Unix, Windows
September 26, 2018, 12:29 PM
Doug
Arg... Is there any optimism in this ever becoming available? in 8x.x.x?

In the meantime checking for alternatives, two reports in one. All of which Must be done in IA!

This message has been edited. Last edited by: Doug,
September 26, 2018, 12:39 PM
BabakNYC
All signs point to no! Frowner

InfoAssist isn't meant for this type of stuff. It's a power user, browser based authoring tool. I doubt it'll ever get to the point where users will be able to do this type of development.


WebFOCUS 8206, Unix, Windows
September 26, 2018, 02:55 PM
Doug
So, with "InfoAssist isn't meant for this type of stuff." in mind. I'll add spot markers and "HEADALIGN=BODY", and whatever else they need that IA doesn't handle, in text even though that'll obviate IA editing. They'll need some IT work to setup style sheets... which we need as corporate standards anyway...

This message has been edited. Last edited by: Doug,
September 26, 2018, 03:02 PM
BabakNYC
So, I think of InfoAssist as a tool I can provide an ad hoc/power user so s/he can create content on his/her own. Anything beyond the basic stuff is application development. They can certainly get pretty far with InfoAssist but if they need to go beyond those features, then they should let me know and I'll pick it up from there. Maybe even take their InfoAssist code as a starting point. You can make things a lot more flexible like you suggest by giving them style sheets and computes and defines in the master file.


WebFOCUS 8206, Unix, Windows
September 26, 2018, 03:18 PM
Doug
Thanks BabkNYC, That'll work in the meantime. But, two things:

1) My task is to Mentor Them, teach them to fish. But not just to fish, but to 'catch' all of what they need / duplicate what they already have been using without any IT Assistance.
    Case in point: duplicate a lot of reports and charts which are currently done in several Excel spreadsheets with several tabs in each.
2) Limit the work needed to be done by IT once they learn to fish. In this case, with some limitations. They're not going to be able to get the great white shark even if I can.

So, That's it for now...
September 27, 2018, 04:39 PM
Doug

Quote, Tony A: Simply educate your IA users to edit in the text editor... Tony A
Therein lies the problem. Do I really want them to go there. Confused I'm thinking: Yep, gotta do what we gotta do to get it done. Music