Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
+1
person also asked this
people also asked this
Replies
9 replies
Subscribers
5 subscribers
Views
8796 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
Reports
Report with a variable number of columns
Kyle Jorgensen
over 7 years ago
What would be the best approach to create a report with a variable number of columns?
I am creating a report that aggregates project cost data by customer and division that can be filtered by certain project attributes. I can create a DB view with a variable number of columns, but I'm not sure if Appian data types support a variable number of fields.
I've attached a mockup of what the base data looks like and what the report I am looking to create looks like.
OriginalPostID-258734
Discussion posts and replies are publicly visible
Parents
0
Raviteja Varma Jampana
A Score Level 2
over 7 years ago
Even we can apply components dynamically, they all are meant to work on datasubset, to my best knowledge it is not possible to create datasubset for dynamic pivot table. If anybody knows please correct me and let everyone know.
so even if you manage to display different fields which are not there in data subset we cannot make it fully featured as sort,dynamic links will not work. I am not sure about possibilites of making this in editable grid but for this requirement i belive the best way of implementing is only paging grid.
You can use following steps. I just made it so abstract please make improvements where ever needed.
1.create a cdt with below strucutre and create a view and query rule to return data in this strucutre without duplicates
for example lets name the cdt as cdt_view
id |division | costumer | value
- you can take id as text combination of division+costumer
2.create a display cdt with following strucutre
divsion -Text
costumer1 - number (integer)
---------
costumern - number (integer)
3.here is the rule which transpose your view to displayCDT
with(
local!data:queryRuleToReturnDataInStrucutreMentionedInStep1(any parameters),
local!divisions:fn!index(local!data,"divison",null),
local!costumers:fn!index(local!data,"costumer",null),
/*you can restrict local!costumers to max limit just to avoid it breaking*/
local!displayCDT:apply(
rule!createDataForSingleRow(_,local!costumers,local!data),local!divisions
))
/* use display cdt to display in editable grid*/
/*inputs ri!division,listOfCostumers,data*/
rule!createDataForSingleRow(
with(
local!divisionData:fn!index(
ri!data,
wherecontains(fn!tostring(ri!divison),fn!touniformstring(fn!index(ri!data,"divison",null))),null),
type!displayCdt(
division:ri!division,
costumer1:fn!displayvalue(
fn!index(ri!costumers,1,null),
fn!index(local!divisionData,"costumer",null),
fn!index(local!divisionData,"value",null)
null),
.......
costumern:fn!displayvalue(
fn!index(ri!costumers,n,null),
fn!index(local!divisionData,"costumer",null),
fn!index(local!divisionData,"value",null)
null),
)
)
)
Let me know if you need any help.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Raviteja Varma Jampana
A Score Level 2
over 7 years ago
Even we can apply components dynamically, they all are meant to work on datasubset, to my best knowledge it is not possible to create datasubset for dynamic pivot table. If anybody knows please correct me and let everyone know.
so even if you manage to display different fields which are not there in data subset we cannot make it fully featured as sort,dynamic links will not work. I am not sure about possibilites of making this in editable grid but for this requirement i belive the best way of implementing is only paging grid.
You can use following steps. I just made it so abstract please make improvements where ever needed.
1.create a cdt with below strucutre and create a view and query rule to return data in this strucutre without duplicates
for example lets name the cdt as cdt_view
id |division | costumer | value
- you can take id as text combination of division+costumer
2.create a display cdt with following strucutre
divsion -Text
costumer1 - number (integer)
---------
costumern - number (integer)
3.here is the rule which transpose your view to displayCDT
with(
local!data:queryRuleToReturnDataInStrucutreMentionedInStep1(any parameters),
local!divisions:fn!index(local!data,"divison",null),
local!costumers:fn!index(local!data,"costumer",null),
/*you can restrict local!costumers to max limit just to avoid it breaking*/
local!displayCDT:apply(
rule!createDataForSingleRow(_,local!costumers,local!data),local!divisions
))
/* use display cdt to display in editable grid*/
/*inputs ri!division,listOfCostumers,data*/
rule!createDataForSingleRow(
with(
local!divisionData:fn!index(
ri!data,
wherecontains(fn!tostring(ri!divison),fn!touniformstring(fn!index(ri!data,"divison",null))),null),
type!displayCdt(
division:ri!division,
costumer1:fn!displayvalue(
fn!index(ri!costumers,1,null),
fn!index(local!divisionData,"costumer",null),
fn!index(local!divisionData,"value",null)
null),
.......
costumern:fn!displayvalue(
fn!index(ri!costumers,n,null),
fn!index(local!divisionData,"costumer",null),
fn!index(local!divisionData,"value",null)
null),
)
)
)
Let me know if you need any help.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data