EasyReport printing bmp files

EasyReport printing bmp files

Postby Otto » Fri Sep 11, 2015 9: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: Select all  Expand view

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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6322
Joined: Fri Oct 07, 2005 7:07 pm

Re: EasyReport printing bmp files

Postby Armando » 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
User avatar
Armando
 
Posts: 3209
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: EasyReport printing bmp files

Postby Otto » Sat Sep 12, 2015 8: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6322
Joined: Fri Oct 07, 2005 7:07 pm

Re: EasyReport printing bmp files

Postby cnavarro » Sat Sep 12, 2015 8: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
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: EasyReport printing bmp files

Postby Otto » 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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6322
Joined: Fri Oct 07, 2005 7:07 pm

Re: EasyReport printing bmp files

Postby Armando » Sat Sep 12, 2015 2: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
User avatar
Armando
 
Posts: 3209
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: EasyReport printing bmp files

Postby Otto » Sat Sep 12, 2015 4: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6322
Joined: Fri Oct 07, 2005 7:07 pm

Re: EasyReport printing bmp files

Postby Armando » Sat Sep 12, 2015 4: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
User avatar
Armando
 
Posts: 3209
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: EasyReport printing bmp files

Postby Otto » Sat Sep 12, 2015 6:05 pm

Hello Armando,
it is inside the download.zip.
https://bitbucket.org/fivetech/easyreport
Best regards,
Otto


Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6322
Joined: Fri Oct 07, 2005 7:07 pm

Re: EasyReport printing bmp files

Postby Armando » Sat Sep 12, 2015 7: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
User avatar
Armando
 
Posts: 3209
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: EasyReport printing bmp files

Postby Otto » Sat Sep 12, 2015 8:01 pm

Hallo Armando,
I will search on my old HD maybe I find the dll.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6322
Joined: Fri Oct 07, 2005 7:07 pm

Re: EasyReport printing bmp files

Postby Otto » Sat Sep 12, 2015 8: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6322
Joined: Fri Oct 07, 2005 7:07 pm

Re: EasyReport printing bmp files

Postby Armando » Sun Sep 13, 2015 5: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
User avatar
Armando
 
Posts: 3209
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 91 guests