FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour EasyReort and RTF opens much report design options
Posts: 6984
Joined: Fri Oct 07, 2005 07:07 PM
EasyReort and RTF opens much report design options
Posted: Fri Jun 15, 2018 07:56 AM
Hello,
now it is working for me.
Best regards,
Otto
Code (fw): Select all Collapse
function rtfDruck()

   local oWnd, cHeader := "", oHeader
   local cDoc := GetPvProfString( "Setup","RTFTextFile","Dokument.rtf",  "inifile.INI" )
  
    cHeader := MemoRead( cDoc )
  
   DEFINE WINDOW oWnd TITLE "New report" 
   
   @ 0, 0 RICHEDIT oHeader VAR cHeader SIZE oWnd:nWidth, 70 OF oWnd
   
   ACTIVATE WINDOW oWnd ON INIT oWnd:hide()

       
return ( oHeader )   
 //----------------------------------------------------------------------------//
 
 function druckrtf( oVrd, oRtf )
   local aMargins := PageGetMargins()
   local oPrn := oVrd:oPrn
   local nRowPix 

    // should come from PRINTAREA definded for RTF block
    local nTopMargin        := 0
    local nLeftMargin   := 500
    local nRightMargin  := 500
    local nBottomMargin     := 1500
    *----------------------------------------------------------

   nTopMargin := Max( 0, ( oVrd:nNextRow  * oPrn:nVertRes() / oPrn:nVertSize() ) - oPrn:nYoffset )
   
   aMargins := { nTopMargin*2, nBottomMargin, nLeftMargin, nRightMargin }

   if Empty( oPrn:hDC )
      MsgStop( "Printer not ready!" )
      return Self
   endif

   REPrint( oRtf:hWnd, "cName", oPrn:hDCOut, PrnGetPagNums(), PrnGetSelection(), ;
            PrnGetCollate(), PrnGetPages(), PrnGetCopies(), aMargins )

return nil

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


Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: EasyReort and RTF opens much report design options
Posted: Fri Jun 15, 2018 08:35 AM

Wonderful

Regards



G. N. Rao.

Hyderabad, India

Continue the discussion