print a array

print a array

Postby Silvio.Falconi » Thu Jul 08, 2021 9: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: Select all  Expand view  RUN
  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 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: print a array

Postby nageswaragunupudi » 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: Select all  Expand view  RUN
@ 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
nageswaragunupudi
 
Posts: 10646
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: print a array

Postby Silvio.Falconi » Sat Jul 10, 2021 10:19 am

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 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: print a array

Postby Otto » Sat Jul 10, 2021 3:08 pm

Silvio,

Best regards,
Otto

Image

Code: Select all  Expand view  RUN


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

Re: print a array

Postby Silvio.Falconi » Sat Jul 10, 2021 3:17 pm

Otto wrote:Silvio,

Best regards,
Otto

Image

Code: Select all  Expand view  RUN


 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 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: print a array

Postby Otto » Sat Jul 10, 2021 4:23 pm

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

Re: print a array

Postby Silvio.Falconi » Sat Jul 10, 2021 4: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 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: print a array

Postby Otto » Sat Jul 10, 2021 5:10 pm

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

Re: print a array

Postby Otto » Sat Jul 10, 2021 5: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

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

Re: print a array

Postby Massimo Linossi » Sun Jul 11, 2021 5: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
User avatar
Massimo Linossi
 
Posts: 498
Joined: Mon Oct 17, 2005 10:38 am
Location: Italy

Re: print a array

Postby Silvio.Falconi » Sun Jul 11, 2021 6: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 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: print a array

Postby leandro » Sun Jul 11, 2021 8: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

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1676
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: print a array

Postby Silvio.Falconi » 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 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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: PabloHarbour and 48 guests