Home Component Writing

Help for customize report table component !!!

edited January 2003 in Component Writing
Hi,

Due to my project, I have to design a report table component like a grid
composed of rows and columns, here is the criteria that are needed:
a.. Adjacent cells can be merged together, making them draw and be treated
as a single cell. As many adjacent cells as you like can be merged
together - so, for example, it is possible to merge the entire first column
of a table into a single cell, while keeping the other columns separated
into the normal number of rows.
b.. A cell can be split into more than one row and/or column.
Essentially, a single cell can become sort of a mini- nested table, although
the resultant cells are available for subsequent merging or splitting.
c.. An individual cell's borders (L,R,T,B) can be optionally drawn or not.
d.. At design time, you can insert or delete rows, columns or individual
cells - after the delete, the remaining cells will be shifted left or up
(user's choice).
e.. At design time, you can select rows, columns, or individual cells.
This is typically a prior step for deleting, adding borders, splitting, etc.
f.. Cells can contain any Reportbuilder component - e.g. text labels,
db-aware labels, check boxes, etc.
g.. Rows can be marked as "stretch", which means they expand to fill their
contents - e.g. a stretching memo.

Data-aware tables have more requirements:

a.. One row of the table is printed per record in the attached dataset.
b.. There can be fixed header/footer rows
The most important priorities for this component are:

a.. Minimal streamed data size in the final component - this will allow
the report to load quickly.
b.. Fast drawing time on the final table component - this will allow the
report to print quickly

Since I'm not familar with RB component, so my question are:

1) Can it be done under RB component structure?
2) What should I begin with?
3) Is there any existing 3rd party RB component for this one?

Thanks

William

Comments

  • edited January 2003
    It can be done. There is a grid component which has recently become
    available from a a customer Daniel Lemire. Here is the link:
    http://perso.b2b2c.ca/dlemire/

    ReportBuilder ships with a Crosstab component for providing calculations
    across fields in a grid format. You may be able to use part of the crosstab.
    The crosstab has a designer, a data traversal engine which creates a matrix,
    and then a renderer which creates the draw commands on the page.

    More of what you describe sounds want more of a parented grid. The standard
    grid will behave like region in that the grid parents the components which
    are dropped into it. Search our source for 'TppRegion = class' The grid
    will act as a container for the control which are dropped in it. I assume
    you will need to create a designer for the grid. From the popup menu
    (override the CreatePopupMenu method of the component) and add an item which
    creates a dialog that lets the user specify the rows and columns.

    Do you want the grid to traverse all the data and print inside of one band?
    The DBGrid will need an engine to traverse the datapipeline's dataset. The
    crosstab has an engine to do this. Then you don't have to connect the main
    report to the datapipeline.

    If you haven't built a component before, try making a simple component to
    get familiar with RB first. There is an example of creating a checkbox
    component in the installed RBuilder\Demos\RCL. Some other simple components
    can be downloaded: http://www.digital-metaphors.com/tips/SetShapePen.zip

    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.