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

Crosstab values

edited May 2002 in General
Hi there!

I need a crosstab report like that:

| Col1 | Col2 | Col3
-------------------------------
Line1 | P | N | N
Line2 | * | N | N
Line 3 | N | P | *

No calculations are necessary, just the values. Is that possible?

Thanks!

Carlos Righetto

Comments

  • edited May 2002
    If you simply want to display the data in a grid like structure then simply
    create a tabular style report with rectangular shapes surrounding the values
    to create the grid. See report 12 in the main reports demo in
    RBuilder\Demos\Reports.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited May 2002
    Hi Alexander,

    I saw this report 12 you said, but my dataset requires a crosstab report not
    a tabular.
    Based on my report example down there, on row in my dataset have information
    on rows and columns, something like that:
    line1 col1 P
    line1 col2 N
    line1 col3 N
    line2 col1 *
    line2 col2 N
    ... and so on

    Regards,
    Carlos

    ----- Original Message -----
    From: "Alexander Kramnik (Digital Metaphors)"
    Newsgroups: digital-metaphors.public.reportbuilder.general
    Sent: Tuesday, May 28, 2002 6:05 PM
    Subject: Re: Crosstab values


    simply
    values

    "Alexander Kramnik (Digital Metaphors)"
  • edited May 2002
    This kind of data can be accommodated with the crosstab component. Drop a
    crosstab onto the report, assign the pipeline associated with the data below
    to it and configure it. Assign the line field to a new row and the column
    field to a new column and the value field to new value. Make sure to disable
    visibility on the Total column and row if all you want is the grid.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited May 2002
    Sorry, but that isn't what I want.

    I did this you saw but my cell values ALWAYS appear as count, and I need the
    values itself! I'm getting crazy! :)

    Regards,
    Carlos


    "Alexander Kramnik (Digital Metaphors)"
  • edited May 2002
    Below is a sample project of what I understand you are trying to do. Please
    let me know if I am not understanding our problem correctly.

    The idea is that the data looks like:

    row column value
    1 1 5
    2 1 10
    1 2 15
    2 2 20
    etc...

    and the report looks like

    5 15
    10 20

    http://www.digital-metaphors.com/tips/CrossTabFromDatabase.zip

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited May 2002
    Ok, I got your idea, and it's exactly what I'm doing!

    There's only one difference, my value column is a string type! When I
    changed the value column in your example, the same thing happened and the
    report uses "Count of Value" and return 1 as the count and not the value 5,
    10, etc

    Regards,
    Carlos


    "Alexander Kramnik (Digital Metaphors)"
  • edited May 2002
    Unfortunately theres no trivial way to accomplish the same thing with
    strings as it will always default to count since the crosstab is meant to do
    calculations. A possible workaround is to created another calculated column
    where you encode the string to a number, then in the crosstab's
    OnGetValueText event convert the number back to a string.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

This discussion has been closed.