Focal Point
bizarre bug found (52)

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

September 09, 2005, 11:28 PM
jodye
bizarre bug found (52)
Hi Everyone

We have discovered a crazy bug that I just had to share with you guys. We are using version 5.2.

Look at this code...

FILEDEF RMMRV1 DISK D:\IBI\APPS\TEST\RMMRV1.FEX
-RUN
-WRITE RMMRV1 TYPE=HEADING,HEADALIGN=BODY, IMAGE=whatever.gif,$
-CLOSE RMMRV1

This produces RMMRV1.FEX and the exact contents of this file are the following...

-----------
start RMMRV1.FEX
-----------
TYPE=HEADING,HEADALIGN=BODY* mrcgi RMMRV1 TYPE=HEADING,HEADALIGN=BODY,
IMAGE=whatever.gif,$
-----------
end RMMRV1.FEX
-----------

Where does that extra stuff (* mrcgi etc) come from? If I change it to ..

FILEDEF RMMRV1 DISK D:\IBI\APPS\TEST\RMMRV1.FEX
-RUN
-SET &E='E';
-WRITE RMMRV1 TYPE=HEADING,HEADALIGN=BODY,
IMAG&E=whatever.gif,$
-CLOSE RMMRV1

then the correct file is generated..
----------
start RMMRV1.FEX
-----------
TYPE=HEADING,HEADALIGN=BODY, IMAGE=whatever.gif,$
-----------
end RMMRV1.FEX
-----------

Obviously the word "image" is causing a problem that is fixed by appending the "e" to the end of "image". We are also effected by this bug when we simply try to refer to an image by amper...


-SET &PIC='whatever.gif';
TABLE FILE CAR
HEADING "THIS IS A TEST"
PRINT CAR MODEL SEATS
BY COUNTRY
ON TABLE SET STYLE * TYPE=HEADING,IMAGE=&PIC,$ ENDSTYLE END

This gives me

(FOC295) A VALUE IS MISSING FOR: pic

If I change it to

-SET &E ='E=whatever.gif';

TABLE FILE CAR
HEADING "THIS IS A TEST"
PRINT CAR MODEL SEATS
BY COUNTRY
ON TABLE SET STYLE * TYPE=HEADING,IMAG&E, $
ENDSTYLE END

Then it works.

Pretty crazy huh?

Have a nice weekend everyone.

Jodye
September 10, 2005, 07:28 AM
susannah
Hi Jodye, IMAGE is java reserved word. There are a bunch of them, we had a thread going for a while.
eg: try a statment label -SKIPIMAGE
It'll make Focus go postal. Big Grin
a work around, just break up that image word, as you did, but here's maybe an easier way.
-SET &STUFF = 'TYPE=HEADING,HEADALIGN=BODY,IMAG' | 'E=WHATEVER.GIF,$';
-WRITE filename &STUFF
and it'll work
September 12, 2005, 04:00 PM
jodye
Hi Susannah

The crazy thing is that the exact code listed here does not work...
http://techsupport.informationbuilders.com/sps/92861029.html

Unless we do the IMAG&E thing.

Have a great week.

By the way, I like your "go postal" expression in regards to Focus.

Jodye
September 12, 2005, 04:09 PM
susannah
yep, that answer works for versions 4 and earlier. they havent' updated it for versions 5 and higher. they CLAIM on that help answer that its for 525+, but they didn't check their work. Lots of things on the help site are not updated/checked. so you have to fill in the complaint box at the end of the help answer and ask that they update that for 5+. {And they'll answer that they haven't got any idea what you're talking about)
September 12, 2005, 06:11 PM
BIGBMN
MRE in this case, re-evaluates the string of IMAGE and sends that data to the server. In the 52x releases, it does it incorrectly, and is appending some additional internal data to the string. That is why you see '* mrcgi ....'

In 53x, a correct string is sent to the server, although not what you might expect. If I run the focexec you supplied, the file created contains:
TYPE=HEADING,HEADALIGN=BODY, IMAGE='/ibi_apps/WFServlet?IBIMR_drill=P,whatever.gif,aaaark3w/aaaark3w.htm',$
The reason the IMAGE string is evaluated is because it is a keyword used for a STYLESHEET that indicates where an image is held within MRE.

If all you want is a verbatim copy of your -WRITE
statement, you can do the following:

FILEDEF RMMRV1 DISK D:\IBI\APPS\TEST\RMMRV1.FEX
-RUN
-MRNOEDIT BEGIN
-WRITE RMMRV1 TYPE=HEADING,HEADALIGN=BODY, IMAGE=whatever.gif,$
-MRNOEDIT END
-CLOSE RMMRV1

You would also need the -MRENOEDIT BEGIN/END if you were using a STYLESHEET that indicated a .gif was on the Reporting Server and not within MRE.
September 12, 2005, 06:46 PM
susannah
thanks for the clarification.