cancel
Showing results for 
Search instead for 
Did you mean: 

how to split a crosstab rows into multiple cross tab tables

Former Member
0 Kudos

Crystal reports XIR2

CRosstab:

{product_name} has A to Z products, from which GROUPNAME({product_name}) is grouped and top 4 products were chosen using

Group sort expert.And then applied a crosstab. Now is there is there process to split the Row Field in the cross tab to multiple crosstabs.

Note: i tried to create ROW Field as a GROUPNAME({row_field})and drag the crosstab into that group but it failed

Accepted Solutions (0)

Answers (1)

Answers (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Phani,

1) Create a group on the {Row_field} (the field that is used as the Row of the Crosstab).

2) Place the crosstab on this Group Header/Group Footer

-Abhilash

Former Member
0 Kudos

Technically i created the first group as {product_name} and used GROUP SORT EXPERT to select top 4 columns based on the count., because Product _name has >26 fields so i reduced into 4 columns

If i used {Row_field} as second group and placed the cross tab either in group header/footer.

then the crosstab tables are showing in appropriate values.

abhilash_kumar
Active Contributor
0 Kudos

Ok, I see what you're saying.

Unfortunately, you can only do a 'Top N' sort on the 'Row' of the crosstab. What you're trying to achieve is  - Top N for the columns and then split the crosstab based on the rows.

You have a few options:

1) Create a SQL query that returns the top 4 columns based on count. You can then create a group on the report on the {Row field} and place the crosstab on the Group Header

2) Create a string formula on the report that concatenates the names of the top 4 column values. Send this list to a Subreport and create a record selection formula that filters the column on the passed list.

The crosstab will be inside the Subreport

-Abhilash

Former Member
0 Kudos

option1# i am using Servicenow, so i can't write SQL query

Option2# this might work for me

thank you