Select to view content in your preferred language

Creating a group report based on an object attribute

560
1
Jump to solution
07-16-2023 05:12 PM
AlexWierzbicki
Emerging Contributor

I am trying to create a code that generates group reports based on an object attribute Land_Use, which has 51 text values. 

However, when I add the below code I get 51 individual reports

 

 

@StartRule
Generate-->
	report(Land_Use, geometry.area/10000)

 

 

Like so:

AlexWierzbicki_0-1689552552808.png

and when I use either of the two codes below I get only reports on the entire object attribute.

 

 

@StartRule
Generate-->
	report("total.Land_Use", geometry.area/10000)
@StartRule
Generate-->
	report("Commercial Accomodation", geometry.area/10000)

 

 

Like so:

AlexWierzbicki_1-1689552605494.png

I've also tried adding much more complex code to separate out each attribute variable and then group, but it has had the same result. 

This means my ability to use the dashboard function to analyse this data is limited. Can someone please help me as to where I'm going wrong? 

1 Solution

Accepted Solutions
ThomasFuchs
Esri Regular Contributor

Hello @AlexWierzbicki 

Thanks for your question. To create group reports based on an object attribute "Land_Use", you can concatenate the group name "total" with the string attribute value of "Land_Use".

attr Land_Use = "empty"

@StartRule
Generate -->
	report("total."+Land_Use, geometry.area/10000)

 This should yield the desired result:

ThomasFuchs_0-1691999408051.png

 

View solution in original post

1 Reply
ThomasFuchs
Esri Regular Contributor

Hello @AlexWierzbicki 

Thanks for your question. To create group reports based on an object attribute "Land_Use", you can concatenate the group name "total" with the string attribute value of "Land_Use".

attr Land_Use = "empty"

@StartRule
Generate -->
	report("total."+Land_Use, geometry.area/10000)

 This should yield the desired result:

ThomasFuchs_0-1691999408051.png