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

Crosstab report for multiple stores

edited July 2008 in General


We are using Report Builder 10.8 with Delphi 2007 and we need a component to
help us generate a report that combines data from multiple stores. The
dataset will be generated by a stored procedure and can be tweaked if
necessary:



Category Item
Store Qty Sales

====================================================================

Game Cards $1 Arcade Play Meridian
7 7.00

Game Cards $1 Arcade Play Dothen
70 70.00

Game Cards $1 Arcade Play Oxford
14 14.00

Game Cards $5 Arcade Play Meridian
3 15.00

Game Cards $5 Arcade Play Dothen
7 35.00

Game Cards $5 Arcade Play Oxford
6 30.00



. and so on.



The report that will be generated from this dataset needs to look something
like this:







Here are some requirements:

? The number of stores report can vary based on what the user
requested.

? The number of columns in the dataset must remain static (they
cannot change based on the number of stores).

? The number of rows may change based on the stores selected

? Totals must be generated by report builder



I posted the same request awhile back ago, and basically understood that
this will no be easy to implement using report builder. I was advised to
look at some report builder add ons. We tried to get in touch with them but
no response so far.

is there another third party tool that we can use to generate this report?





Thank you,

-Halim

Comments

  • edited July 2008
    The only way I would know how to do this would be not to use a cross tab (I
    am not an expert at those), pre-format the data, and do my own totals. In
    this case, the total-columns would be the same width as the detail columns.

    You will then have more control over what happens when there are more
    columns than page width.

    Ed Dressel
    Team DM


  • edited July 2008
    Do you think I will need predefined columns in case?
    Thank you for you.
    -Halim
  • edited July 2008
    the columns would be in the sub reports, not in the main report. The sub
    report prints columns left to right. You will need to be sure it does not go
    off the page. (there is a demo of this, but I could not find it--anyone
    remember where it is?).

    Ed Dressel
    Team DM
  • edited July 2008
    Ed,
    I really don't understand what you mean by the column being in the sub
    report instead of the main report. Could give me more details please?
    demo will a great help as well,
    thank you,
    -Halim
  • edited July 2008
    I'm a bit short on time, otherwise I would have worked up a better
    demo--this is just some old code I had sitting around when I was trying to
    figure it out.

    www.TBINc.com/misc/ColumnsWithSubReports.zip

    Each of the sub reports is on a fixed region, and the sub reports have
    columns defined (look at the DFM for more examples.


    The data for this can look like this:

    Master
    Detail [records]
    Detail [Columns]

    If you want to see a polished example, here is one:

    www.TBInc.com/reports/BatchGapReport.pdf

    The columns in that report change size (via RAP) to fit the page width-it
    has been a great feature in RB for me.

    HTH,
    Ed Dressel
    Team DM

  • edited July 2008
    Ed,
    Thank you for your help but this is not exactly what we wanted. Please take
    a look at the attachment I sent earlier.
    Thanks,
    -Halim
  • edited July 2008
    Jalim:

    Unless I am missing something, this method can be used to implement what you
    want with full control over how it looks (i.e. columns per page, overflow
    columns...). It is a bit of work the first few times you do it, but is fully
    achievable.

    Ed Dressel
    Team DM
  • edited July 2008
    Ed,
    first, I would like to apologize if this is taking longer than expected.
    I really undertand your idea but my problem is always the same: how am I
    going to make it a crosstabl report. where you have the stores on the top
    and also have several colums per store as shown in this example.
    Like this:

    item Store A Store B
    Store C
    Number Quantity Price Quantity Price Quantity
    Price
    1 30 $5.00 21 $6.00
    15 $3.00
    2 16 $2.00 56 $1.00
    72 $4.00
    3 13 $6.00 85 $9.00
    57 $8.00
    etc...
    ..
    ..


    Thank you,
    -Halim


  • edited July 2008
    very similar to what is shown in the demo:

    You ahve a sub report of columns for the store names in the header.

    You have a sub report for the values in the detail.

    You have a sub report in the footer for the sub-totals.

    Each sub report is configured to have columns, but is placed on a region so
    the columns go left to right.

    That is how this report is created (except for the footer) where there is a
    header and a detail:

    http://www.tbinc.com/reports/BatchPayReport.pdf

    (sorry, wrong link earlier)

    The column with actually changes in this report using RAP depending upon how
    many columns are required.

    HTH,
    Ed Dressel
    Team DM




This discussion has been closed.