Group on Report ( from xbrowse)

Group on Report ( from xbrowse)

Postby Silvio.Falconi » Fri May 05, 2023 9:15 am

I have a field as oDbf:prov

on Report if I made

Code: Select all  Expand view
AAdd(oRep:aGroups,trGroup():New({||oDbf:prov},{||""},{||"Total"},{|| 1 },.t.,oRep))


run ok


but I not Know the field because the final user select the field

So, I calculate from xbrowse the indices and the fields

Code: Select all  Expand view
 
local aGroup := {}
local aFields := {}

AEval(  oBrw:aCols, { |o| If( o:lHide .or. Empty( o:cSortOrder ),, AAdd( aGroup, o:cCbxItem ) ) } )
AEval(  oBrw:aCols, { |o| If( o:lHide .or. Empty( o:cSortOrder ),, AAdd( afields, o:cExpr ) ) } )

 


then the final use select from a combobox the fields want make the group on report


then I make
Code: Select all  Expand view
AAdd(oRep:aGroups,trGroup():New({||"oDbf:"+(afields[nGroup])},{||""},{||"Total"},{|| 1 },.t.,oRep))

 


but not run ...why ?
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: 6772
Joined: Thu Oct 18, 2012 7:17 pm

Re: Group on Report ( from xbrowse)

Postby Antonio Linares » Fri May 05, 2023 10:01 am

Dear Silvio,

> AAdd(oRep:aGroups,trGroup():New({||"oDbf:"+(afields[nGroup])},{||""},{||"Total"},{|| 1 },.t.,oRep))

AAdd(oRep:aGroups,trGroup():New( &( "{||oDbf:" + (afields[nGroup])}" ),{||""},{||"Total"},{|| 1 },.t.,oRep))
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41315
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Group on Report ( from xbrowse)

Postby Silvio.Falconi » Fri May 05, 2023 12:01 pm

Antonio Linares wrote:Dear Silvio,

> AAdd(oRep:aGroups,trGroup():New({||"oDbf:"+(afields[nGroup])},{||""},{||"Total"},{|| 1 },.t.,oRep))

AAdd(oRep:aGroups,trGroup():New( &( "{||oDbf:" + (afields[nGroup])}" ),{||""},{||"Total"},{|| 1 },.t.,oRep))




source\ut\ut_prn.prg(373) Error E0002 Unterminated string '},{|| 1 },.t.,oRep))'
source\ut\ut_prn.prg(373) Error E0030 Syntax error "syntax error at '}'"


then

Error occurred at: 05-05-2023, 14:03:27
Error description: Error BASE/1449 Syntax error: &
Args:
[ 1] = C {||oDbf: + (afields[nGroup])}

Stack Calls
===========
Called from: source\ut\ut_prn.prg => MYSETUP( 373 )
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: 6772
Joined: Thu Oct 18, 2012 7:17 pm

Re: Group on Report ( from xbrowse)

Postby Silvio.Falconi » Fri May 05, 2023 12:34 pm

Resolved with fieldWBlock
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: 6772
Joined: Thu Oct 18, 2012 7:17 pm

Re: Group on Report ( from xbrowse)

Postby Silvio.Falconi » Fri May 05, 2023 1:29 pm

I have also these problems

Image

I cannot print the total of Pages type xx/xx
I wish a newline after "Provincia: AG" on top
I wish a newline on footer " Totale...."
I wish the effect pijama
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: 6772
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

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