print a array

Locked
User avatar
Silvio.Falconi
Posts: 7170
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 3 times

print a array

Post by Silvio.Falconi »

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: Select all | Expand

  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
User avatar
nageswaragunupudi
Posts: 10729
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 10 times
Contact:

Re: print a array

Post by nageswaragunupudi »

This happens when all items in a column of the array are not of the same type.
Try

Code: Select all | Expand

@ 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
User avatar
Silvio.Falconi
Posts: 7170
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 3 times

Re: print a array

Post by Silvio.Falconi »

yes it run
I must make it on hand

I need this
Image

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
User avatar
Otto
Posts: 6414
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 30 times
Been thanked: 2 times
Contact:

Re: print a array

Post by Otto »

Silvio,

Best regards,
Otto

Image

Code: Select all | Expand



 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> "

 
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Silvio.Falconi
Posts: 7170
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 3 times

Re: print a array

Post by Silvio.Falconi »

Otto wrote:Silvio,

Best regards,
Otto

Image

Code: Select all | Expand



 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
User avatar
Otto
Posts: 6414
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 30 times
Been thanked: 2 times
Contact:

Re: print a array

Post by Otto »

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

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Silvio.Falconi
Posts: 7170
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 3 times

Re: print a array

Post by Silvio.Falconi »

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
User avatar
Otto
Posts: 6414
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 30 times
Been thanked: 2 times
Contact:

Re: print a array

Post by Otto »

Silvio,
You don't have to worry about the web. This is Fivewin.

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: 6414
Joined: Fri Oct 07, 2005 7:07 pm
Has thanked: 30 times
Been thanked: 2 times
Contact:

Re: print a array

Post by Otto »

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

Image

Image
Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Massimo Linossi
Posts: 508
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: print a array

Post by Massimo Linossi »

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
User avatar
Silvio.Falconi
Posts: 7170
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 3 times

Re: print a array

Post by Silvio.Falconi »

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
User avatar
leandro
Posts: 1770
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia
Has thanked: 49 times
Been thanked: 12 times
Contact:

Re: print a array

Post by leandro »

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 24.09 ] [ xHarbour 64 bits) ]
User avatar
Silvio.Falconi
Posts: 7170
Joined: Thu Oct 18, 2012 7:17 pm
Been thanked: 3 times

Re: print a array

Post by Silvio.Falconi »

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
Locked