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

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Image alignment
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Image alignment
 Login/Join
 
Member
posted
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
 
Posts: 25 | Location: Chennai | Registered: August 27, 2008Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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 7 - IE11.
in Focus since 1988
 
Posts: 1960 | Location: Netherlands | Registered: September 25, 2007Reply With QuoteReport This Post
Member
posted Hide Post
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
 
Posts: 18 | Registered: September 01, 2008Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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 7 - IE11.
in Focus since 1988
 
Posts: 1960 | Location: Netherlands | Registered: September 25, 2007Reply With QuoteReport This Post
Member
posted Hide Post
Hi,

Both the solutions works fine.
Thank you.


WebFOCUS 7.1.4,Linux,
HTML,PDF,Excel,CSV
 
Posts: 25 | Location: Chennai | Registered: August 27, 2008Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Image alignment

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