Focal Point
[SOLVED] Image alignment

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

May 25, 2009, 08:30 AM
Ajai
[SOLVED] Image alignment
Hi,

I am trying to place images in my report and i am using the below code to achieve that.

  DEFINE FILE CAR
AMPER/A1=HEXBYT(38,AMPER);
SEMI/A1=HEXBYT(59,SEMI);
NBSP/A6=AMPER | 'nbsp' |SEMI;
GAPH/A36=NBSP | NBSP | NBSP | NBSP | NBSP;
END

TABLE FILE CAR
PRINT 
CAR
COUNTRY
MODEL

ON TABLE SUBHEAD
"<GAPH PDF<GAPH EXCEL<GAPH PRINT"

ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE-NUM OFF
ON TABLE SET BYDISPLAY OFF
ON TABLE SET ONLINE-FMT HTML
ON TABLE SET STYLE *
TYPE=TABHEADING,LINE=1,JUSTIFY=RIGHT,SIZE=9,$
TYPE=TABHEADING,IMAGE=&IMAGE_URL/static/images/pdf.gif,POSITION=(+0.03000 +0.000000),SIZE=(0.170556 0.170556),$
TYPE=TABHEADING,IMAGE=&IMAGE_URL/static/images/xls.gif,POSITION=(+.50000 +0.000000),SIZE=(0.170556 0.170556),$
TYPE=TABHEADING,IMAGE=&IMAGE_URL/static/images/printer_icon.gif,POSITION=(+1.1400 +0.000000),SIZE=(0.170656 0.170556),$

ENDSTYLE
END


The above code works well for HTML format. However when i change the format to AHTML (ON TABLE SET ONLINE-FMT AHTML ), the images are aligned in an entirely different fashion.

Please let me know if i have missed something

Thanks,
Ajai

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


WebFOCUS 7.1.4,Linux,
HTML,PDF,Excel,CSV
May 26, 2009, 04:15 AM
GamP
Ajai,

I think you'd best open a call for this with IB. This really seems to be a bug.
But, that won't get it fixed soon. You can tweak this a little bit. Look at the following code:
(I did not have your images, so I 'borrowed' some from IB)
 -SET &IMAGE_URL='http://yourserver/ibi_html/javaassist/images/applaunch';
-SET &IM1 = &IMAGE_URL | '/procedure.gif\" ' | 'style=\"position:absolute;top:23pt;left:112pt;width:19pt;height:17pt\"';
-SET &IM2 = &IMAGE_URL | '/webappclose.gif\" ' | 'style=\"position:absolute;top:23pt;left:162pt;width:19pt;height:17pt\"';
-SET &IM3 = &IMAGE_URL | '/webappopen.gif\" ' | 'style=\"position:absolute;top:23pt;left:218pt;width:19pt;height:17pt\"';

DEFINE FILE CAR
NBSP/A6= '&' | 'nbsp;';
GAPH/A36=NBSP | NBSP | NBSP | NBSP | NBSP;
END

TABLE FILE CAR
PRINT 
CAR
COUNTRY
MODEL

ON TABLE SUBHEAD
"<GAPH PDF<GAPH EXCEL<GAPH PRINT"

ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE-NUM OFF
ON TABLE SET BYDISPLAY OFF
ON TABLE SET ONLINE-FMT AHTML
ON TABLE SET STYLE *
TYPE=TABHEADING,LINE=1,JUSTIFY=RIGHT,SIZE=9,$
TYPE=TABHEADING,IMAGE=&IM1,$
TYPE=TABHEADING,IMAGE=&IM2,$
TYPE=TABHEADING,IMAGE=&IM3,$

ENDSTYLE
END 

Mind you, this will ONLY work with AHTML, not with normal html output. For the normal html output, you'd have to refer back to the original way of placing your images.

Hope this helps...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
May 26, 2009, 05:22 AM
Devi C
Hi,

Use the following code to rectify ur issue.


 DEFINE FILE CAR
PDFIMG/A100 = '<img src=approot/baseapp/pdf.gif > </img> ';
EXLIMG/A100 = '<img src=approot/baseapp/excel.gif > </img> ';
PRINTIMG/A100 = '<img src=approot/baseapp/printer_icon.gif > </img> ';
END

TABLE FILE CAR
PRINT 
CAR
COUNTRY
MODEL

ON TABLE SUBHEAD
" <PDFIMG PDF <EXLIMG EXCEL <PRINTIMG PRINT"

ON TABLE SET HTMLCSS ON
ON TABLE SET PAGE-NUM OFF
ON TABLE SET BYDISPLAY OFF
ON TABLE SET ONLINE-FMT AHTML
ON TABLE SET STYLE *
TYPE=TABHEADING,LINE=1,JUSTIFY=RIGHT,SIZE=9,$

ENDSTYLE
END
 



WebFOCUS 7.6.4,7.6.9
OS: Windows XP
HTML,EXCEL,PDF
May 26, 2009, 06:01 AM
GamP
And the Devi-C solution is much better since this will also work for HTML output.
Good One


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
June 02, 2009, 08:24 AM
Ajai
Hi,

Both the solutions works fine.
Thank you.


WebFOCUS 7.1.4,Linux,
HTML,PDF,Excel,CSV