To Gurus and To Charles : Also for MyRpt

To Gurus and To Charles : Also for MyRpt

Postby Silvio.Falconi » Sun Oct 27, 2013 2:23 pm

someone can help me to use MyRpt on Windows Seven ?

I explain you

When I use Myrpt on Win Xp run good : I tried to create order document with lines, boxes and Emf ( from PPT)

When I use Myrpt using the same rpt into Windows Seven the says are moved ( on height and left )

the methos to print says is on rptrun.prg file and the method is

METHOD PrintSay( oItem ) CLASS RptRun

it run good on winXP but wrong on Win 7


here you can see the print with Win Seven


Image


Image
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: To Gurus and To Charles : Also for MyRpt

Postby Carles » Mon Oct 28, 2013 8:34 am

Silvio,

I just think of two possibilities:

1. - The method ::PrintSay() function runs only standard oPrn:Say(). Can u create a test to see if you print prn:say() the same way in XP and Seven?

2.- Perhaps the error may be in the printing of EMF and not alike in XP than in Seven. I also use the standard function oPrn:ImportWMF(). Can you create a test print with oPrn:ImportWMF() to see if it printed the same way?
Salutacions, saludos, regards

"...programar es fácil, hacer programas es difícil..."

UT Page -> https://carles9000.github.io/
Forum UT -> https://discord.gg/bq8a9yGMWh
Skype -> https://join.skype.com/cnzQg3Kr1dnk
User avatar
Carles
 
Posts: 1135
Joined: Fri Feb 10, 2006 2:34 pm
Location: Barcelona

Re: To Gurus and To Charles : Also for MyRpt

Postby Silvio.Falconi » Tue Oct 29, 2013 7:46 pm

Sorry Carles,
I made a test with xp professional and Windows Seven
I use corel,prg and insert your printsay method as function


the result is this

Win xp it seem good ...


Image



Win Seven there's some errors

Image


the code


Code: Select all  Expand view


// Using CorelDraw to generate printing templates!!!

#include "FiveWin.ch"

//----------------------------------------------------------------------------//

function Main()

   LOCAL oPrn, oFont, oIni, oPrinter


   Local cDescri:= "article description line here test"
   Local nprice := 12.00
   Local nTax   := 20
   Local nRowFirst := 11
   Local nTotal:= 0

   Local nTotalRow:=0

   PRINTER oPrn PREVIEW

      DEFINE FONT oFont NAME "Times New Roman" SIZE 0,-12 OF oPrn

      PAGE
         oPrn:ImportWMF( "fattura.emf" )



oItem_nTop=240.23
oItem_nLeft=161.87
oItem_nHeight=5.62
oItem_nWidth=32.71


      say_myRpt(oPrn, oItem_nTop,oItem_nLeft,oItem_nHeight,oItem_nWidth,Transform(nTotal, "999,999.99"),ofont,1)


oItem_nTop=66.41
oItem_nLeft=129.39
oItem_nHeight=5.86
oItem_nWidth=17.09


    say_myRpt(oPrn, oItem_nTop,oItem_nLeft,oItem_nHeight,oItem_nWidth,"09876",ofont,1)


oItem_nTop=66.41
oItem_nLeft=147.71
oItem_nHeight=5.86
oItem_nWidth=22.22

 say_myRpt(oPrn, oItem_nTop,oItem_nLeft,oItem_nHeight,oItem_nWidth,dtoc(date()),ofont,1)


oItem_nTop=271.48
oItem_nLeft=138.67
oItem_nHeight=3.91
oItem_nWidth=50.05

say_myRpt(oPrn, oItem_nTop,oItem_nLeft,oItem_nHeight,oItem_nWidth,dtoc(date())+time(),ofont,1)





      ENDPAGE



   ENDPRINT

   oFont:End()


return nil

//----------------------------------------------------------------------------//


       Function say_myRpt(oPrn, oItem_nTop,oItem_nLeft,oItem_nHeight,oItem_nWidth,ctext,ofont,nPad)
          Local nTop,nLeft
          Local nWidth   := oItem_nWidth
               oPrn:Mmtr2Pix( 0, @nWidth )
             nWidth += oPrn:nYOffset

       nTop    := Max( 0, ( oItem_nTop   * oPrn:nVertRes() / oPrn:nVertSize() ) )
       nLeft   := Max( 0, ( oItem_nLeft  * oPrn:nHorzRes() / oPrn:nHorzSize() ) )

         oPrn:Say(nTop,nLeft,cText , oFont, nWidth, , , npad )

        return nil





 
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: To Gurus and To Charles : Also for MyRpt

Postby Silvio.Falconi » Wed Oct 30, 2013 4:35 pm

Any solution please ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 95 guests