Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Crosstab report

edited June 2008 in General
I am trying to figure out how to make the following report:

-----------------------------------------------------------------------------------------------
| Region 1 | Region 2 |
Region 3 | Regions' Total |
-----------------------------------------------------------------------------------------------
| Quantity | Cost | Quantity | Cost |
Quantity | Cost | Total Quantity | Total Cost |
------------------------------------------------------------------------------------------------
Product A | | | |
| | | |
|
------------------------------------------------------------------------------------------------------------
Product B | | | | |
| | | |
------------------------------------------------------------------------------------------------------------
Product C | | | | |
| | | |
------------------------------------------------------------------------------------------------------------
Product D | | | | |
| | | |
------------------------------------------------------------------------------------------------------------
Product E | | | | |
| | | |
------------------------------------------------------------------------------------------------------------
Etc..


I was able to do it with one column(quantity or cost) but not the two. I
looked at most of crosstabs demos but I couldn't find one similar to mine.
I am using Report Builder 10.08 for Delphi.

Any help would be appreciated.

Thank you,
-Halim

Comments

  • edited June 2008
    I have attached a copy of the report.
    Thank you,
    -Halim
  • edited June 2008
    Hi Halim,

    How is your data arranged. Are you able to get all data for each region in
    a single dataset? If not, you will need to use multiple crosstab components
    connected to separate datasets.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2008
    All my data is within one single dataset.

    -Halim

  • edited June 2008
    How is your data arranged? I'm going to need more information about your
    setup and requirements in order to help you find a solution to this.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2008
    Thank you for your response.
    I have one dataset structured as follows:

    RegionName, ProductName,Quantity, Cost
    Example:
    Region1,Product A, 10,$1.50
    Region1,Product B, 12,$8.00
    Region1,Product C, 5,$3.00
    Region1,Product D, 22,$5.00
    Region1,Product E, 7,$2.00
    Region2,Product A, 3,$5.00
    Region2,Product B, 10,$9.00
    Region2,Product C, 12,$16.00
    Region2,Product D, 6,$23.50
    Region2,Product E, 8,$6.00
    Region3,Product A, 89,$65.00
    Region3,Product B, 16,$25.00
    Region3,Product C, 19,$13.00
    Region3,Product D, 12,$31.50
    Region3,Product E, 11,$89.00

    etc..


    -Halim
  • edited June 2008
    I can rearrange my data to anyway you like if this makes the report easier.
    The dataset we are getting is a result from a stored procedure, it can be
    rearranged if needed.

    Thank you,
    -Halim
  • edited June 2008
    Hi Halim,

    I don't believe you will be able to get the exact crosstab you want using
    the built in crosstab component however it should be close. Try placing the
    region as the top most column and Quantity Cost as the lower columns. Then
    set the product name as a new row.

    This will not create a grid style table as in your example however it will
    be a crosstab. If you would like more customization in your crosstabs, I
    would recommend taking a look the third party crosstab component GridPack.

    http://www.planitechnologies.com/

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited June 2008
    I will check out the link.
    Thank you for your help.
    -Halim
  • edited July 2008
    Do you know any third party tool that we can get other than
    PlanItTechnologies?
    Thank you,
    -Halim

This discussion has been closed.