Group on Report ( from xbrowse)

Post Reply
User avatar
Silvio.Falconi
Posts: 7104
Joined: Thu Oct 18, 2012 7:17 pm

Group on Report ( from xbrowse)

Post by Silvio.Falconi »

I have a field as oDbf:prov

on Report if I made

Code: Select all | Expand

 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

  
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

 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
Antonio Linares
Site Admin
Posts: 42268
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: Group on Report ( from xbrowse)

Post by Antonio Linares »

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
Silvio.Falconi
Posts: 7104
Joined: Thu Oct 18, 2012 7:17 pm

Re: Group on Report ( from xbrowse)

Post by Silvio.Falconi »

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: 7104
Joined: Thu Oct 18, 2012 7:17 pm

Re: Group on Report ( from xbrowse)

Post by Silvio.Falconi »

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: 7104
Joined: Thu Oct 18, 2012 7:17 pm

Re: Group on Report ( from xbrowse)

Post by Silvio.Falconi »

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
Post Reply