cancel
Showing results for 
Search instead for 
Did you mean: 

How to insert custom summary column in cross-tab report

Former Member
0 Kudos

I have a crosstab report that shows individual preferences based on age range and relationship status. Currently the value fields show a count of the number of persons. I would like to insert 2 additional columns to display the total number of males and females respectively. The columns are to be inserted to the left of the total column.

This is the original report.

So the report should look like this, displaying the total number of males and females for each relationship status for each age range. Then the grand total for both gender.

By the way I am new to crystal reports. I am using 2011

I cannot modify the datasource, sql server db, it is not allowed.

Please let me know if you require additional information and I will provide it. Any help will be much appreciated, I have been at this for sometime now

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Garrett,

While inserting the Column is the easy part, the difficult part (for this report) is to calculate the number of Men and Women for each row.

That's because, the Calculated Members are usually (and almost always) inserted to calculate value by accessing other values on the same row or other row in the Crosstab. E.g: A new column to find out the difference between two age-ranges in the same crosstab etc.

Since there isn't a way to find out how much of those numbers are contributed by men or women, you would need some help from the database.

If that's not possible, the other workaround is to build a Manual Crosstab, however this has its own limitations. A Manual Crosstab requires that you know the number of columns (in this case age-range).

Another way would be to use a Subreport. The Subreport can hold another copy of the Crosstab with just the contributions and the Total Column. Then, with some effort on the formatting, you could probably make it look like one single crosstab.

-Abhilash

Former Member
0 Kudos

Hi Abhilash,

Thank you for your response.

The manual crosstab is not an option because the data is dynamic and the number of columns will change. The subreport is the most viable of the options but the formatting will take some amount of time and the report will be a bit difficult to maintain.

I proposed a new design that will have the gender as the main column in the crosstab then age-range and relationship type will be respective sub columns. This method takes less than a 5 minutes to put together versus formatting the subreport so I am just waiting on my boss to sign off on it.

Thank you though

Answers (0)