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

Text as Crosstab value dimension

edited February 2003 in General
Hello,

PROBLEM:
The crosstab builder in RB 5.56 accepts only numerical fields as value
dimensions. I want to display a textual field as the "meat" of the
crosstab.

The value is uniquely identified by the dimension values, so there should
be no problem with getting it via a Max() or Min() calculation. However, I
cannot define it in Crosstab Designer - it only accepts a Count()
calculation when I put a textual field into the Value dimension area.

MY SOLUTION:
I have "cheated" the crosstab into displaying text by using OnGetValueText.
However this approach has two problems:

1. How do I correlate the aColumn, aRow values with proper dimension
values, so that I can look up the correct value to be displayed?

2. The text may only span one line, while I want to put multiline strings
here - however, currently even strings containing newlines are flattened
out. I have no idea how to deal with this problem.

PLEASE HELP:
Ideally, I would like to put a formatted text as the value of each "inside"
crosstab cell. Does anyone have any idea how this might be achieved?


Greetings from Poland, and thanks in advance.

--
Tomasz Tarchala
Business Management Software

Comments

  • edited February 2003
    Use the CrossTab.AfterCalc if you want to make changes to the matrix before
    the crosstab is rendered.

    The crosstab is working as designed. Instead of using a crosstab, have you
    explored using columns in a report to print the data? The
    DetailBand.ColumnTraversal property can be set to LeftToRight or
    TopToBottom. This would allow you to perform your own Min/Max calculations
    on the data and let you draw the lines and shapes emulating a crosstab
    report. You could use a subreport connected to the current crosstab's
    datapipeline.

    If you want to create a crosstab approach, then you'll want to create a
    custom crosstab renderer to change how the currently registered renderer
    handles the wrapping of text data you assign in the OnGetValueText event.
    See the ppCTRend.pas in RBuilder\Source for an example of creating and
    registering a crosstab renderer.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited February 2003

  • edited February 2003
    The current crosstab renderer (ppCTRend.pas) is the best example we have of
    creating a custom crosstab renderer. It uses the matrix that the crosstab
    engine generates, and creates draw commands on the page to render the matrix
    data on the report pages.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited February 2003

  • edited March 2003
    >*. Is there any way to force


    I don't know, you should ask Pragnaan if this can be done with their
    devices.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.