FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour print a array
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
print a array
Posted: Thu Jul 08, 2021 09:27 PM
I saw print01.prg I wish print an array
How converte my adata into this format

I take thea data with

aRighe:= oRigheInvoice:DbfToArray( cItemFlds, { || FIELD->Invoice ==alltrim(nInvoice) } )
for n= 1 to len(arighe)
aadd( aItems,aRighe[n])
next
aData:= aItems

@ 13.0, 2.0 PRINT TO oPrn TABLE aData SIZE 7.0, 4.0 CM TITLE "Services" BORDER

I have this error
Code (fw): Select all Collapse
   Args:
     [   1] = N   1

Stack Calls
===========
   Called from:  => LEN( 0 )
   Called from: .\source\classes\TARRDATA.PRG => (b)AUTOSTRUCT( 2425 )
   Called from:  => AEVAL( 0 )
   Called from: .\source\classes\TARRDATA.PRG => AUTOSTRUCT( 2425 )
   Called from: .\source\classes\TARRDATA.PRG => STR2STRUCT( 2372 )
   Called from: .\source\classes\TARRDATA.PRG => TARRAYDATA:NEW( 244 )
   Called from: .\source\classes\PRINTER.PRG => TPRINTER:PRINTTABLE( 1277 )
   Called from: test.prg => STAMPA_RICEVUTA( 253 )
   Called from: test.prg => MAIN( 32 )
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: print a array
Posted: Fri Jul 09, 2021 11:31 PM
This happens when all items in a column of the array are not of the same type.
Try
Code (fw): Select all Collapse
@ 13.0, 2.0 PRINT TO oPrn TABLE aRighe SIZE 7.0, 4.0 CM TITLE "Services" BORDER

and see if this works correctly.
Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: print a array
Posted: Sat Jul 10, 2021 10:19 AM
yes it run
I must make it on hand

I need this


I made it on hand @x,y
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: print a array
Posted: Sat Jul 10, 2021 03:08 PM
Silvio,

Best regards,
Otto



Code (fw): Select all Collapse
 AADD( aReport , {  "Clip2.jpg",    "Ombrellone 0006","1", "9.00",  "9.00", "08-Lug-2021",  "08-Lug-2021","" , "0.00",  "0.00"  } )
        AADD( aReport , {  "Clip3.jpg", "Lettino",          "1", "5.00", "5.00", "08-Lug-2021", "08-Lug-2021","" , "0.00",  "0.00" } )
        AADD( aReport , {  "Clip4.jpg", "Sdraio",           "2", "6.00", "6.00", "08-Lug-2021", "08-Lug-2021","" , "0.00",  "0.00" } )

        cHtml += cTextIni
        cText += "<table style='width:100%'>" + CRLF
        cText += "<tr>" + CRLF
        cText += check4prn( 1,"<th>Ico</th>" + CRLF )
        cText += check4prn( 2,"<th>Descrizione</th>" + CRLF )
        cText += check4prn( 3,"<th>Qt.</th>" + CRLF )
        cText += check4prn( 4,"<th>Unit.</th>" + CRLF )
        cText += check4prn( 5,"<th>ToxQt</th>" + CRLF )
        cText += check4prn( 6,"<th>Dal</th>" + CRLF )
        cText += check4prn( 7,"<th>Al</th>" + CRLF )
        cText += check4prn( 8,"<th>Giorni</th>" + CRLF )
        cText += check4prn( 9,"<th>Sconto</th>" + CRLF )
        cText += check4prn( 10,"<th>Totale riga</th>" + CRLF )
        cText += "</tr>" + CRLF

        cHtml += cText
        FOR I := 1 to len(aReport)                           
            cText := "<tr>" + CRLF
            cText   += check4prn( 1,"<td class='mytd'><IMG SRC='beach/" + aReport[I,1] +  "' NAME='Grafik1' ALIGN=BOTTOM WIDTH=37 HEIGHT=37 BORDER=0></td>" + CRLF )
            cText   += check4prn( 2,"<td class='mytd'>" + aReport[I,2]  + "</td>" + CRLF )
            cText   += check4prn( 3,"<td class='mytd'>" + aReport[I,3] + "</td>" + CRLF )
            cText   += check4prn( 4,"<td class='mytd'>" + aReport[I,4] + "</td>" + CRLF )
            cText   += check4prn( 5,"<td class='mytd'>" + aReport[I,5] + "</td>" + CRLF )
            cText   += check4prn( 6,"<td class='mytd'>" + aReport[I,6] + "</td>" + CRLF )
            cText   += check4prn( 7,"<td class='mytd'>" + aReport[I,7] + "</td>" + CRLF )
            cText   += check4prn( 8,"<td class='mytd'>" + aReport[I,8] + "</td>" + CRLF )            
            cText   += check4prn( 9,"<td class='mytd'>" + aReport[I,9] + "</td>" + CRLF )            
            cText   += check4prn( 10,"<td class='mytd'>" + aReport[I,10] + "</td>" + CRLF )            
            cText += "</tr>" + CRLF
            cHtml += cText
        next                              
        cHtml += "</table> "
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: print a array
Posted: Sat Jul 10, 2021 03:17 PM
Otto wrote:Silvio,

Best regards,
Otto



Code (fw): Select all Collapse
 AADD( aReport , {  "Clip2.jpg",    "Ombrellone 0006","1", "9.00",  "9.00", "08-Lug-2021",  "08-Lug-2021","" , "0.00",  "0.00"  } )
        AADD( aReport , {  "Clip3.jpg", "Lettino",          "1", "5.00", "5.00", "08-Lug-2021", "08-Lug-2021","" , "0.00",  "0.00" } )
        AADD( aReport , {  "Clip4.jpg", "Sdraio",           "2", "6.00", "6.00", "08-Lug-2021", "08-Lug-2021","" , "0.00",  "0.00" } )

        cHtml += cTextIni
        cText += "<table style='width:100%'>" + CRLF
        cText += "<tr>" + CRLF
        cText += check4prn( 1,"<th>Ico</th>" + CRLF )
        cText += check4prn( 2,"<th>Descrizione</th>" + CRLF )
        cText += check4prn( 3,"<th>Qt.</th>" + CRLF )
        cText += check4prn( 4,"<th>Unit.</th>" + CRLF )
        cText += check4prn( 5,"<th>ToxQt</th>" + CRLF )
        cText += check4prn( 6,"<th>Dal</th>" + CRLF )
        cText += check4prn( 7,"<th>Al</th>" + CRLF )
        cText += check4prn( 8,"<th>Giorni</th>" + CRLF )
        cText += check4prn( 9,"<th>Sconto</th>" + CRLF )
        cText += check4prn( 10,"<th>Totale riga</th>" + CRLF )
        cText += "</tr>" + CRLF

        cHtml += cText
        FOR I := 1 to len(aReport)                           
            cText := "<tr>" + CRLF
            cText   += check4prn( 1,"<td class='mytd'><IMG SRC='beach/" + aReport[I,1] +  "' NAME='Grafik1' ALIGN=BOTTOM WIDTH=37 HEIGHT=37 BORDER=0></td>" + CRLF )
            cText   += check4prn( 2,"<td class='mytd'>" + aReport[I,2]  + "</td>" + CRLF )
            cText   += check4prn( 3,"<td class='mytd'>" + aReport[I,3] + "</td>" + CRLF )
            cText   += check4prn( 4,"<td class='mytd'>" + aReport[I,4] + "</td>" + CRLF )
            cText   += check4prn( 5,"<td class='mytd'>" + aReport[I,5] + "</td>" + CRLF )
            cText   += check4prn( 6,"<td class='mytd'>" + aReport[I,6] + "</td>" + CRLF )
            cText   += check4prn( 7,"<td class='mytd'>" + aReport[I,7] + "</td>" + CRLF )
            cText   += check4prn( 8,"<td class='mytd'>" + aReport[I,8] + "</td>" + CRLF )            
            cText   += check4prn( 9,"<td class='mytd'>" + aReport[I,9] + "</td>" + CRLF )            
            cText   += check4prn( 10,"<td class='mytd'>" + aReport[I,10] + "</td>" + CRLF )            
            cText += "</tr>" + CRLF
            cHtml += cText
        next                              
        cHtml += "</table> "



I knew it. I had no doubt. that Otto came up with the web.
Stop mr Otto stop i wish use fwh no web
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: print a array
Posted: Sat Jul 10, 2021 04:23 PM

Silvio,
This is FWH only, the report definition language is HTML and CSS.

Best regards,
Otto

Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: print a array
Posted: Sat Jul 10, 2021 04:59 PM

sorry,
no html and web
I really don't know how to make you understand that I don't care about the printout with html, web and mod_harbour, what should I do to make you understand?

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: print a array
Posted: Sat Jul 10, 2021 05:10 PM
Silvio,
You don't have to worry about the web. This is Fivewin.

Best regards,
Otto

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: print a array
Posted: Sat Jul 10, 2021 05:42 PM
Silvio,
The "beach" example is the replacement for oReport.
But you can also work directly with Word. It depends on the reports you need.
Best regards,
Otto




Posts: 512
Joined: Mon Oct 17, 2005 10:38 AM
Re: print a array
Posted: Sun Jul 11, 2021 05:35 PM

Only a curiosity.
Silvio, you are asking about umbrellas since 3 or 4 years, or more, I lost count.
The program that are you making is for all Miami beach ? Because in all this time
a normal programmer can make a procedure for going to Mars. Not me, of course,
I've never made a class for FWH and I'm not able to write code.
Peace and love
Massimo

Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: print a array
Posted: Sun Jul 11, 2021 06:17 PM

first of all I did not understand your interest, on the other hand I do not speak to people like you who have not produced and proposed any object class but are offended to go go, I'm tired of your insolent messages,

if I'm working for 4 years you must not care after all you never gave me help but only offenses after offenses. Maybe it's the heat that made you come out of your shell but I don't intend to respond to your offenses.

People like you have ruined the fivewins, I in my small way have created some classes and I have contributed to the community. What did you do Massimo?

you can only instigate a fight, are you a troll?

because that's the only way people like you are defined, have a nice day

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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
Posts: 1816
Joined: Wed Oct 26, 2005 02:49 PM
Re: print a array
Posted: Sun Jul 11, 2021 08:06 PM

Amigo otto buenas tardes,

Que pena integrarme a la conversación, pero a mi si me gustaría probar el generador de reportes html, pero no logro encontrar el ejemplo para hacer uso de este con harbour/xharbour.

Podrías publicarlo?

De antemano gracias,

Saludos
LEANDRO AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Turbo Incremental Link64 6.98 Embarcadero 7.70 ] [ FiveWin 25.01 ] [ xHarbour 64 bits) ]
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: print a array
Posted: Sun Jul 11, 2021 11:21 PM
leandro wrote:Amigo otto buenas tardes,

Que pena integrarme a la conversación, pero a mi si me gustaría probar el generador de reportes html, pero no logro encontrar el ejemplo para hacer uso de este con harbour/xharbour.

Podrías publicarlo?

De antemano gracias,



please I asked another topic,
please leandro I had asked another topic, I did not ask to make a report with html but how use the PRINT TABLE command. Now Otto linossi are exaggerating I can no longer tolerate this situation
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 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

Continue the discussion