FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour EasyReport printing bmp files
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

EasyReport printing bmp files

Posted: Fri Sep 11, 2015 09:35 PM
Hello,

I had problems printing larger bmp-files with EasyReport.
Now I check if the image is a bmp file and if yes I use method SayBitmap.
Now it is working fine.
I changed method PrintItem in VRD.prg like this:
Code (fw): Select all Collapse
if UPPER( cFileExt( cText ) ) = "BMP"
        ::oPrn:SayBitmap( ::ToPix( nItemTop, .T. ), ;
                     ::ToPix( ::nLeftMargin + oItem:nLeft, .F. ), ;
                     cText, ;
                     ::ToPix( oItem:nWidth, .F. ), ;
                     ::ToPix( oItem:nHeight, .T. ) )

else
        oImg:LoadImage( IIF( AT( "RES:", UPPER( cText ) ) <> 0, ;
                           SUBSTR( ALLTRIM( cText ), 5 ), NIL ), ;
                      VRD_LF2SF( cText ) )

      //oImg:LoadBmp( VRD_LF2SF( IIF( cValue = NIL, cText, ALLTRIM( cValue ) ) ) )

      ::oPrn:SayImage( ::ToPix( nItemTop, .T. ), ;
                     ::ToPix( ::nLeftMargin + oItem:nLeft, .F. ), ;
                     oImg, ;
                     ::ToPix( oItem:nWidth, .F. ), ;
                     ::ToPix( oItem:nHeight, .T. ) )
      
      oImg:End()
endif

Best regards,
Otto
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM

Re: EasyReport printing bmp files

Posted: Sat Sep 12, 2015 12:25 AM

Otto:

Thanks for the tip, are you using the Timm's versión or newest FW versión?.

Regards

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

Re: EasyReport printing bmp files

Posted: Sat Sep 12, 2015 08:15 AM

Hello Armando,

the changes are made in vrd.prg.
I don’t think there are more versions of vrd.prg.
I searched the original FWH directory and there is no vrd.prg.
So maybe I am still working with Timms.

As fare as I know forking was only done on the VRD-designer not on the print engine (vrd.prg).

Antonio

Where is the Fivewin distribution of EasyReport for download.

Best regards,
Otto

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM

Re: EasyReport printing bmp files

Posted: Sat Sep 12, 2015 08:31 AM
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

Re: EasyReport printing bmp files

Posted: Sat Sep 12, 2015 10:28 AM

Hello Armando,
My vrd.prg is more or less the same.
At line 994
oImg:LoadImage( IIF( AT( "RES:", UPPER( cText ) ) <> 0, ;
SUBSTR( ALLTRIM( cText ), 5 ), NIL ), ;
VRD_LF2SF( cText ) )

  //oImg:LoadBmp( VRD_LF2SF( IIF( cValue = NIL, cText, ALLTRIM( cValue ) ) ) )

  ::oPrn:SayImage( ::ToPix( nItemTop, .T. ), ;
                 ::ToPix( ::nLeftMargin + oItem:nLeft, .F. ), ;
                 oImg, ;
                 ::ToPix( oItem:nWidth, .F. ), ;
                 ::ToPix( oItem:nHeight, .T. ) )
  oImg:End()

I changed to:

if UPPER( cFileExt( cText ) ) = "BMP"
::oPrn:SayBitmap( ::ToPix( nItemTop, .T. ), ;
::ToPix( ::nLeftMargin + oItem:nLeft, .F. ), ;
cText, ;
::ToPix( oItem:nWidth, .F. ), ;
::ToPix( oItem:nHeight, .T. ) )

else
oImg:LoadImage( IIF( AT( "RES:", UPPER( cText ) ) <> 0, ;
SUBSTR( ALLTRIM( cText ), 5 ), NIL ), ;
VRD_LF2SF( cText ) )

  //oImg:LoadBmp( VRD_LF2SF( IIF( cValue = NIL, cText, ALLTRIM( cValue ) ) ) )

  ::oPrn:SayImage( ::ToPix( nItemTop, .T. ), ;
                 ::ToPix( ::nLeftMargin + oItem:nLeft, .F. ), ;
                 oImg, ;
                 ::ToPix( oItem:nWidth, .F. ), ;
                 ::ToPix( oItem:nHeight, .T. ) )

  oImg:End()

endif

Another change I made is:

Line 2819
aFiles := DIRECTORY( VRD_LF2SF( cPath ) + "*." + cExt, "D" )

I changed to
aFiles := DIRECTORY( VRD_LF2SF( cPath ) + "*." + cExt,"DHS")

Best regards,
Otto

Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM

Re: EasyReport printing bmp files

Posted: Sat Sep 12, 2015 02:46 PM

Otto:

Thanks a lot.

Best regards

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

Re: EasyReport printing bmp files

Posted: Sat Sep 12, 2015 04:37 PM

Hello Armando ,

my old fileedit.exe does not work under 64 bit.

Now I tried to compile fileedit.prg but I can’t find FILEEDIT.DLL.

Have you been able to compile fileedit?

Best regards,
Otto

Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM

Re: EasyReport printing bmp files

Posted: Sat Sep 12, 2015 04:55 PM

Hello Otto:

Where can I find FileEdit.Prg?

I have't it, or you mean FiveEdit?

Regards

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

Re: EasyReport printing bmp files

Posted: Sat Sep 12, 2015 06:05 PM
Hello Armando,
it is inside the download.zip.
https://bitbucket.org/fivetech/easyreport
Best regards,
Otto


Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM

Re: EasyReport printing bmp files

Posted: Sat Sep 12, 2015 07:01 PM

Otto:

I'm so sorry, I never use FileEdit, I always use the designer.

Sorry, again

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

Re: EasyReport printing bmp files

Posted: Sat Sep 12, 2015 08:01 PM

Hallo Armando,
I will search on my old HD maybe I find the dll.
Best regards,
Otto

Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM

Re: EasyReport printing bmp files

Posted: Sat Sep 12, 2015 08:11 PM

INCLUDE "C5GRID.CH"

Armando,
I found the dll but now C5Grid is missing.
I think we should change from C5Grid to xBrowse.

Best regards,
Otto

Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM

Re: EasyReport printing bmp files

Posted: Sun Sep 13, 2015 05:00 PM

Otto:

Yes, I think so.

Best regards

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero

Continue the discussion