Search code examples
crystal-reports

Dynamic columns number in Crystal Report?


I want to make a report that runs a query on database, it gets the count of items used in a specific transaction grouped by their name, so both item's name and its count are retrieved from db, is it possible ?

enter image description here

The query will get results similar to this:

enter image description here


Solution

  • You can use cross tabs for this purpose.

    Create a cross tab and use Item name in columns and count in rows.

    There are many links when google, below is as sample

    https://www.tutorialspoint.com/crystal_reports/cross_tab_layout.htm