FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How fastreport print table like xbrowse with jpg column?
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
How fastreport print table like xbrowse with jpg column?
Posted: Fri Apr 22, 2011 02:21 AM

Hi,
in prg
private MyVar := memoread("C:\MyPicture.jpg")
in fr3 ,
1.picture1 defined as selfdefined variable.
2.a masterdata cell edit as [<picture1>]
3.the cell event onbeforeprint as ReportHOnStartReport
4.code as:
procedure ReportHOnStartReport(Sender: TfrxComponent);
begin
LoadImageFromHbVar(Picture1, ‘MyVar’);
end;
begin

end.

Run time error :
undeclared identifiey: picture1

if 4. code as:
procedure ReportHOnStartReport(Sender: TfrxComponent);
begin
LoadImageFromHbVar(<Picture1>, ‘MyVar’);
end;
begin

end.
Run time error :
Could not conert variant of type (null) into type (Interge)
Unkown variable or data field : picture1

TKS!
Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
Re: How fastreport print table like xbrowse with jpg column?
Posted: Sat Apr 30, 2011 09:21 AM

If problem solved, I'll buy a fastreport licence.

TKS!
Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: How fastreport print table like xbrowse with jpg column?
Posted: Sat Apr 30, 2011 10:41 AM

I think you have to pass the path and name of the jpg to FastReport and insert graphic-control into your report then set
properties <Filelink>.
Best regards,
Otto

Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
Re: How fastreport print table like xbrowse with jpg column?
Posted: Sun May 01, 2011 02:46 AM

this pass jpg via
private MyVar := memoread("C:\MyPicture.jpg")
and LoadImageFromHbVar(<Picture1>, ‘MyVar’) call harbour variable via "myvar" .

The Demo and manual from http://www.paritetsoft.ru/frh.htm are too simple , the auther not reply at all.

Regards!
Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: How fastreport print table like xbrowse with jpg column?
Posted: Sun May 01, 2011 06:02 AM

Posts: 474
Joined: Sun Oct 30, 2005 06:37 AM
Re: How fastreport print table like xbrowse with jpg column?
Posted: Sun May 01, 2011 07:14 AM

Last, it works:

if fr3 form
1. create 1 picture object named 'picture1' and place on a cell of masterdata, and close picturex dialog.
2. code area :
procedure Picture1OnBeforePrint(Sender: TfrxComponent);
begin
callhbfunc('myfunc') ; // this selft defined prg function to load current row jpg into private 'myvar'
LoadImageFromHbVar(Picture1,'myvar');
end;

begin

end.

  1. picture1 event :
    onbeforeprint Picture1OnBeforePrint

in prg:
FUNCTION myfunc()
myvar:=memoread("d:\app\sub\"+cvaltochar(odbprn2:id)+".jpg")
return

OK!

Shuming Wang

http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651

Continue the discussion