/ɪːzɪˈpɪːzɪ/ Reportgenerator for FIVEWIN and mod harbour

Re: /ɪːzɪˈpɪːzɪ/ Reportgenerator for FIVEWIN and mod harbour

Postby Otto » Fri May 21, 2021 11:12 am

Hello Mark,
With my patcher, I can simplify the code.
I know that Harbour can patch the code that is spread over several lines.
But I don't remember the syntax.
Text start / text end or something like that.
Best regards,
Otto

Image

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

Re: /ɪːzɪˈpɪːzɪ/ Reportgenerator for FIVEWIN and mod harbour

Postby elvira » Fri May 21, 2021 12:33 pm

Thank you very much.

But will it work for complex designs, such an Invoice?
elvira
 
Posts: 516
Joined: Fri Jun 29, 2012 12:49 pm

Re: /ɪːzɪˈpɪːzɪ/ Reportgenerator for FIVEWIN and mod harbour

Postby Otto » Fri May 21, 2021 12:49 pm

Hello elvira,

I would say yes.
But please post a design template, and I try and test it.

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: 6337
Joined: Fri Oct 07, 2005 7:07 pm

Re: /ɪːzɪˈpɪːzɪ/ Reportgenerator for FIVEWIN and mod harbour

Postby Marc Venken » Fri May 21, 2021 2:06 pm

Otto,

Can you post the .prg file , the html file so that we can copy them insite the sample folder and hit the build button in order to get a working program.
Than we can see and play with the idea.
Marc Venken
Using: FWH 23.04 with Harbour
User avatar
Marc Venken
 
Posts: 1439
Joined: Tue Jun 14, 2016 7:51 am
Location: Belgium

Re: /ɪːzɪˈpɪːzɪ/ Reportgenerator for FIVEWIN and mod harbour

Postby Otto » Fri May 21, 2021 4:39 pm

Hello Mark,
I think I'll create a few more examples for the time being and test / i zi pi zi / in real use.

Maybe you have some templates that you would like to have solved.

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: 6337
Joined: Fri Oct 07, 2005 7:07 pm

Re: /ɪːzɪˈpɪːzɪ/ Reportgenerator for FIVEWIN and mod harbour

Postby elvira » Sun May 23, 2021 6:11 pm

Thank you.

This is a sample!!!

Image
elvira
 
Posts: 516
Joined: Fri Jun 29, 2012 12:49 pm

Re: /ɪːzɪˈpɪːzɪ/ Reportgenerator for FIVEWIN and mod harbour

Postby Otto » Sun May 23, 2021 9:59 pm

Hello elvira,
A missing printer or problems with the printer queue are reasons why customers call our support.
Working on / i zi pi zi / report engine, I think a check if the default printer is ready is essential.

I started with the attached code.
I included a huge screen with a warning if no default printer or the selected printer is not ready.

Image

I also started to take notes for the HTML report.
https://winhotel.space/izipizi/docu.html
I think page break is key.
Tomorrow I do a test for an invoice report.

BTW the docu is made with my mod harbour project "portobello editor".
Image
Best regards,
Otto
Code: Select all  Expand view  RUN



#include "fivewin.ch"

function main
   local aComboPrn := GetAllEntrys()
   local I := 0
   local hPRN_STATUS :=  {=>}
   local cStatus := ""
   local aPRNCheck := {}
   local oPrn
   local lshowPrinters := .t.
   *----------------------------------------------------------

   hPRN_STATUS["0" ]           := "PRINTER_STATUS_OK"
   hPRN_STATUS["1" ]           := "PRINTER_STATUS_PAUSED"
   hPRN_STATUS["2" ]           := "PRINTER_STATUS_ERROR"
   hPRN_STATUS["4" ]           := "PRINTER_STATUS_PENDING_DELETION"
   hPRN_STATUS["8" ]           := "PRINTER_STATUS_PAPER_JAM"
   hPRN_STATUS["16" ]          := "PRINTER_STATUS_PAPER_OUT"
   hPRN_STATUS["32" ]          := "PRINTER_STATUS_MANUAL_FEED"
   hPRN_STATUS["64" ]          := "PRINTER_STATUS_PAPER_PROBLEM"
   hPRN_STATUS["128" ]         := "PRINTER_STATUS_OFFLINE"
   hPRN_STATUS["256" ]         := "PRINTER_STATUS_IO_ACTIVE"
   hPRN_STATUS["512" ]         := "PRINTER_STATUS_BUSY"
   hPRN_STATUS["1024" ]        := "PRINTER_STATUS_PRINTING"
   hPRN_STATUS["2048" ]        := "PRINTER_STATUS_OUTPUT_BIN_FULL"
   hPRN_STATUS["4096" ]        := "PRINTER_STATUS_NOT_AVAILABLE"
   hPRN_STATUS["8192" ]        := "PRINTER_STATUS_WAITING"
   hPRN_STATUS["16384" ]       := "PRINTER_STATUS_PROCESSING"
   hPRN_STATUS["32768" ]       := "PRINTER_STATUS_INITIALIZING"
   hPRN_STATUS["65536" ]       := "PRINTER_STATUS_WARMING_UP"
   hPRN_STATUS["131072" ]      := "PRINTER_STATUS_TONER_LOW"
   hPRN_STATUS["262144" ]      := "PRINTER_STATUS_NO_TONER"
   hPRN_STATUS["524288" ]      := "PRINTER_STATUS_PAGE_PUNT"
   hPRN_STATUS["1048576" ]     := "PRINTER_STATUS_USER_INTERVENTION"
   hPRN_STATUS["2097152" ]     := "PRINTER_STATUS_OUT_OF_MEMORY"
   hPRN_STATUS["4194304" ]     := "PRINTER_STATUS_DOOR_OPEN"
   hPRN_STATUS["8388608" ]     := "PRINTER_STATUS_SERVER_UNKNOWN"
   hPRN_STATUS["16777216" ]    := "PRINTER_STATUS_POWER_SAVE"

   if lshowPrinters = .t.
      For I:= 1 to len( aComboPrn )
         if PrnStatus( aComboPrn[ I ] ) <> 0
            AADD( aPRNCheck, { aComboPrn[ I ], "Printer error " + cStatus } )
         endif
         cStatus := ALLTRIM ( STR( PrnStatus( aComboPrn[ I ] ) ) )

         TRY
         AADD( aPRNCheck, { aComboPrn[ I ], hPRN_STATUS[ cStatus] } )
         CATCH
         AADD( aPRNCheck, { aComboPrn[ I ], "Status nicht definiert " + cStatus } )
      END
        /*
        ? GetPrintDefault()
        ChangeStandardPrinter( aComboPrn[ I ] )
    ? ud_prngetname()
        Printersetup()
        */

   NEXT

   xbrowse( aPRNCheck, "Printers installed - Status" )
endif


if msgYesNo('Change to printer "notexists"','Select printer' ) = .t.
   ChangeStandardPrinter( "notexists" )
endif

If GetPrintDefault() = 0
   //? "no default printer"
   MetroMsgInfo( "Programmabbruch", "WINDOWS: There is no default printer currently selected" + CRLF +;
      "Go into your Windows Control Panel and choose the Printer settings." + CRLF + CRLF +;
      "Right-click the printer that you want to use, and then click Set as Default Printer."+ CRLF+;
      "A check mark on the printer icon indicates that the printer is now the default printer." + CRLF + CRLF +;
      "If the customer requires help with this they should refer to their IT administrator." )
else
   ? "Default printer " + ud_prngetname()

endif

return nil
//----------------------------------------------------------------------------//

FUNCTION GetAllEntrys()                         //show all printers
   *----------------------------------------
   local aDevices:={}, cAllEntries, cEntry, I, cName, cPrn, cPort, J

   cAllEntries := STRTRAN( GetProfString( "Devices" ), Chr( 0 ), CRLF )

   FOR I:= 1 TO MlCount( cAllEntries )
      cName := MemoLine( cAllEntries,,I)
      cEntry := GetProfString( "Devices",cName,"")
      J := 2
      DO WHILE ! EMPTY(cPort := StrToken(cEntry,J++,","))
         *msginfo( TRIM(cName) )  +" , "+TRIM(cPort)
         AADD(aDevices, TRIM( cName ))
      ENDDO
   NEXT

RETURN aDevices
//----------------------------------------------------------------------------//

function ChangeStandardPrinter( cPrintername )
   local coldprinter := prnGetName()            // default printer
   *----------------------------------------------------------

   if len( ALLTRIM( cPrintername ) )  > 0
      WriteProfString( "windows", "device", cPrintername ) // change to new printer
      SetPrintDefault( cPrintername )
      PrinterInit()
      SysRefresh()

   endif

return( coldprinter )
//------------------------------------------------------------------------------------------//

function ud_PrnGetName()
   local cret, oprn
   PRINTER oPrn
   cRet := oPrn:getmodel()
    endprint
return cret

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

FUNCTION MetroMsgInfo( cTitel, cAnzeige1 )
   local lVar        := .f.
   local oDlg, oGet, oBTNNaviWeiter, oBTNNaviInfo, obtnAbbruch, oCbx
   local cPassword   := Space( 10 )
   local nWidth      := GetSysMetrics( 0 )
   local nHeight     := GetSysMetrics( 1 )
   local nLine       := 0
   local nRowSpace   := 20
   local nRowOffset  := 20
   local cInfo       := ( procname(1) + "   " + str( procline(1) ) )
   local oFntMetroNormal2, oFntMetroMedium2,oFntMetroFLATBTN
   local nRibbonTopClr :=   rgb(227, 162, 26)
   *----------------------------------------------------------
   DEFAULT cTitel := "Infobox"
   *----------------------------------------------------------
   DEFINE FONT oFntMetroNormal2      NAME "TAHOMA"  SIZE 0,-22
   DEFINE FONT oFntMetroMedium2      NAME "TAHOMA"  SIZE 0,-32
   DEFINE FONT oFntMetroFLATBTN      NAME "TAHOMA"  SIZE 0,-18

   oFntMetroSay := TFont():New( "Calibri", 0, -13, .F.,.F.,0,0,,.F.,.F.,.F.,0,3,2,1,,34 )

   //cAnzeige1 := ansiToOem(cAnzeige1)
   nLine := 16
   DEFINE DIALOG oDlg ;
      TITLE "Auswahl" ;
      FROM 0, 5 ;
      TO nHeight*1/2, nWidth + 6 ;
      PIXEL ;
      STYLE nOr( DS_MODALFRAME, WS_POPUP ) ;
      COLOR CLR_WHITE, nRibbonTopClr ;
      FONT oFntMetroFLATBTN

   oDlg:SetFont( oFntMetroNormal2 )

   nLine := 0.5
   @ nRowOffset * nLine , nWidth/5/2.05 ;
      SAY cTitel ;
      OF oDlg ;
      PIXEL ;
      FONT oFntMetroMedium2 ;
      COLOR CLR_WHITE, nRibbonTopClr

   nLine := 2
   @ nRowOffset + nRowSpace * nLine,nWidth/5/2.05 ;
      SAY cAnzeige1 ;
      OF oDlg ;
      PIXEL ;
      FONT oFntMetroMedium2 ;
      COLOR CLR_WHITE, nRibbonTopClr ;
      SIZE 600, 600

   *----------------------------------------------------------

   @ ( nHeight*1/2 - 45 ) / 2.05,nWidth/5/2.05 ;
      FLATBTN oBTNNaviWeiter ;
      PROMPT "OK" ;
      FONT oFntMetroFLATBTN ;
      SIZE 2, ( 32 ) /2.05 ;
      OF oDlg ;
      ACTION ( lVar := .T., oDlg:End() ) ;
      COLOR nRibbonTopClr, RGB( 210, 210, 210 ) ;
      DEFAULT



   @ 0,0 ;
      FLATBTN oBTNNaviInfo ;
      PROMPT "+" ;
      FONT oFntMetroSay ;
      SIZE ( 32) /2.05 , ( 32) /2.05 ;
      OF oDlg ;
      ACTION ( msginfo( cInfo ) ) ;
      COLOR nRibbonTopClr, RGB( 210, 210, 210 )

   oBTNNaviInfo:cTooltip := {"Info"}

   ACTIVATE DIALOG oDlg CENTERED

RETURN NIL
//----------------------------------------------------------------------------//






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

Re: /ɪːzɪˈpɪːzɪ/ Reportgenerator for FIVEWIN and mod harbour

Postby Otto » Mon May 24, 2021 9:10 am

Good morning, elvira,

Thank you for bringing the invoice form into play.
I did a quick test. I took a template from office.com. (https://templates.office.com/en-us/invoice-tm16392525)

It's very similar to your bill. Instead of products, I inserted dummy lines and made a page break.

Before printing, I choose the printer model.

Everything works very well and is easy-peasy.

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: 6337
Joined: Fri Oct 07, 2005 7:07 pm

Re: /ɪːzɪˈpɪːzɪ/ Reportgenerator for FIVEWIN and mod harbour

Postby Otto » Tue May 25, 2021 5:08 am

Hello friends,

I remembered that WORD 97 produced very clean, lean HTML source code.
I searched the internet for "WORD 97 download" and found a download - Microsoft Word 97 (OEM) (ISO) .
WORD 97 is a simple WYSIWYG editor for the report generator.
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: 6337
Joined: Fri Oct 07, 2005 7:07 pm

Re: /ɪːzɪˈpɪːzɪ/ Reportgenerator for FIVEWIN and mod harbour

Postby Otto » Thu Jun 03, 2021 10:02 am

Placeholders
Word template
Image

create placeholders
Image


placeholders
Image

paste placeholders
Image

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

Re: /ɪːzɪˈpɪːzɪ/ Reportgenerator for FIVEWIN and mod harbour

Postby Otto » Thu Jun 03, 2021 10:51 am

Replace placeholder with data:


Image

Image

sourcecode to replace "placeholders"

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

Re: /ɪːzɪˈpɪːzɪ/ Reportgenerator for FIVEWIN and mod harbour

Postby Otto » Thu Jun 03, 2021 11:06 am

Now changing design with WORD

Image

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

Re: /ɪːzɪˈpɪːzɪ/ Reportgenerator for FIVEWIN and mod harbour

Postby Silvio.Falconi » Thu Jun 03, 2021 7:58 pm

Otto,
I not Use Microsoft Office applications, and with me all my clients and friends
we use alternative products, for free
you sell your program to your client but then you tell him that he has to buy office to create reports?
what a beautiful prospect

what would this thing be?
a form for not being autonomous?
Fivewin needs a powerful report designer
if you are drawing with Word then it means that you no longer use ER, but as for you it was more ultra now you do not use it anymore?
you have to be consistent with yourself, you always said you use ER and it works fine for you now you can't use it with mod_harbour?

please move this topic to Mod Harbour forum
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: 7070
Joined: Thu Oct 18, 2012 7:17 pm

Re: /ɪːzɪˈpɪːzɪ/ Reportgenerator for FIVEWIN and mod harbour

Postby Otto » Thu Jun 03, 2021 8:15 pm

Hello Silvio,

/i zi pi zi/ is for FIVEWIN. And yes, you are right, I do no longer use ER.
To create HTML reports is much easier and faster.

You do not need WORD. You can use any editor to create HTML.
BTW, what WORD processor do you use?

Glad you take part in the discussion.
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: 6337
Joined: Fri Oct 07, 2005 7:07 pm

Re: /ɪːzɪˈpɪːzɪ/ Reportgenerator for FIVEWIN and mod harbour

Postby Silvio.Falconi » Thu Jun 03, 2021 8:39 pm

Otto wrote:Hello Silvio,

/i zi pi zi/ is for FIVEWIN. And yes, you are right, I do no longer use ER.
To create HTML reports is much easier and faster.

You do not need WORD. You can use any editor to create HTML.
BTW, what WORD processor do you use?

Glad you take part in the discussion.
Best regards,
Otto


Have you discovered HTML now?
try HTML5 maybe you will find you can do a report designer

https://sourceforge.net/projects/qtrpt/
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: 7070
Joined: Thu Oct 18, 2012 7:17 pm

PreviousNext

Return to FiveWin for Harbour/xHarbour

Who is online

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