mod harbour PDF and PRINT

mod harbour PDF and PRINT

Postby Otto » Fri Aug 30, 2019 10:07 pm

Hello,
today I made a report modul for my DOS Clipper Fibu (Accounting System) in mod Harbour.

Best regards
Otto

Image

Image

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

Re: mod harbour PDF and PRINT

Postby Otto » Fri Aug 30, 2019 10:08 pm

Code: Select all  Expand view  RUN

/*
****************************************************************************
*   Aplicacion: Test jQuery DataTable con Ajax para mod_harbour            *
*       Fuente: data1.prg                                                  *
*        Autor: Joaquim Ferrer Godoy                                       *
*       Inicio: 06-08-2019                                                 *
****************************************************************************
*/

function main()
   
    local   hData := {=>}  
    local hItem
   
    USE ( hb_GetEnv( "PRGPATH" ) + "/../data/aj.dbf" ) ALIAS "data" SHARED
    set order to tag ktonr
    hData['data'] := {}
   
    if rlock()
       
        do while !eof()
            hItem := {=>}  
            hItem['beldat']         := data->beldat
            hItem['konto']          :=  rtrim(data->ktonr)
            hItem['text']           := convertXML( data->text )
            if data->S_H = 1
                hItem['soll']       := data->betrag
                hItem['haben']      := 0
            else
                hItem['soll']       := 0
                hItem['haben']      := data->betrag
            endif
            hItem['gg_ktonr']       := data->gg_ktonr
           
            aadd( hData['data'], hItem )
            dbskip()
        enddo
        dbunlock()
    endif  
    CLOSE
   
    AP_SetContentType( "application/json" )
   
    ?? hb_jsonEncode( hData, .T. )  // T=pretty
   
return NIL

function convertXML( cVData )
    local I := 0
    *----------------------------------------------------------
   
    cVData  :=  STRTRAN(cVData, chr(228), "ä"   )
    cVData  :=  STRTRAN(cVData, chr(246), "ö"   )
    cVData  :=  STRTRAN(cVData, chr(252), "ü"   )
   
   
    cVData  :=  STRTRAN(cVData, chr(142), "Ä"   )
    cVData  :=  STRTRAN(cVData, chr(153), "Ö"   )
    cVData  :=  STRTRAN(cVData, chr(154), "Ü" )
   
    cVData  :=  STRTRAN(cVData, chr(223), "ß" )
   
return (cVData)




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

Re: mod harbour PDF and PRINT

Postby Armando » Sat Aug 31, 2019 12:12 am

Otto:

Nice job, Congratulations ! :shock:

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: 3231
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 46 guests