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

custom formatting Crosstab

edited March 2002 in General
Is there anyway (in code at runtime or IDE at design time)
to control the vertical spacing between rows in the
crosstab. I can change the font to make it smaller, but the
rows still retain quite a bit of white space between
themselves. I'd like to shrink the row height and get rid of
the "padding" if possible.

TIA,

larry

Comments

  • edited March 2002
    The spacing is calculated internal to the crosstab renderer. You can create
    a descendent crosstab renderer and register it over the default one. I was
    hoping to suggest that you could override the CalcSpaceUsed method and
    perform your own spacing calulations for the row heights, but there is no
    setter method for the rowheights list. You may have to copy the code in the
    ppCTRend unit for the crosstab renderer and save the TppCrossTabRenderer
    class as TmyCustomCrosstabRenderer in its own unit. Change the class to
    perform the spacing how you would like it. Search for the CalcSpaceUsed
    method to start with. Then make a register call at the end of the unit to
    register your new crosstab renderer.


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited March 2002
    Thanks Jim, I'll give that a try...

    BTW, I'm using RB for the first time and "stumbled" across
    the CrossTab component almost by accident. It seems to be
    very powerful, but also, unfortunatley, very "unpolished"
    and "bare-bones". How much attention will you guys be giving
    it in the future in the way of enhancing it and surfacing
    more of the functionality in a way that matches the ease of
    use of the rest of RB?

    larry



    "Jim Bennett (Digital Metaphors)"
  • edited March 2002
    Have you run through the extensive crosstab demos? They mainly show how to
    change the formatting of the crosstab cells as they generate.
    ..\Delphi\RBuilder\Demos\Crosstabs

    Yes, perhaps in a future version it would be a good idea to make it more
    flexible.


    Cheers,

    Jim Bennett
    Digital Metaphors

This discussion has been closed.