Skip to Content
author's profile photo Former Member
Former Member

How to insert custom summary column in cross-tab report

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 😔

table1.jpg (42.0 kB)
table2.jpg (49.3 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Sep 03, 2013 at 05:54 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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😭

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.