dynamic instantiation of ppTableGrid
I am about to begin redisigning a large collection of reports which
were build in RB12 on D2007. I expect the TableGrid to play a major
role in the new designs.
I have RB15 in an XE5 VM, and although I have done well with the
TablreGrid in the Report Designer, I am running into difficulties at
every turn in trying to use it dynamically. I find no mention of it in
any of the demo or tutorial code, either.
I instantiate a grid, and I see that the grid, the column objects and
row objects have been created. However, there are no ppTableCell
objects, although I do see this if I place a TableGrid in the report in
the designer.
Is there a demo available for the demonstration of the TableGrid?
Thanks, Bill
were build in RB12 on D2007. I expect the TableGrid to play a major
role in the new designs.
I have RB15 in an XE5 VM, and although I have done well with the
TablreGrid in the Report Designer, I am running into difficulties at
every turn in trying to use it dynamically. I find no mention of it in
any of the demo or tutorial code, either.
I instantiate a grid, and I see that the grid, the column objects and
row objects have been created. However, there are no ppTableCell
objects, although I do see this if I place a TableGrid in the report in
the designer.
Is there a demo available for the demonstration of the TableGrid?
Thanks, Bill
This discussion has been closed.
Comments
Take a look a the help topic in the RB help for TppTableGrid. This
gives a number of useful routines for creating and manipulating
TableGrid components in code.
You can use the Rows.Add and Columns.Add routines to create new table
cells. Then access each individual cell using the Cells property.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I did look at the help topic, in the CHM file. The HxS help is not
installed, and I am not clear on how to do that with the JS file I see
there.
I find no examples in the CHM file, and most of the topics other than
the major classes are just stubs. That's why I asked here, as you have
always been good with replies.
Perhaps the HxS help is more complete?
Thanks,
Bill
Thanks,
Bill
You can manually install the Help2 (HxS) help using the
RBHelpInstaller.exe application located in the \RBuilder\Help\...
directory. Be sure to run the application as an administrator.
From there you should be able to access the ReportBuilder Reference
from the XE5 help. There are a number of code snips available for each
of the TableGrid properties including TppTableRows and TppTableColumns.
When creating a TTableGrid in code, no cells are automatically added.
In the designer, 3 rows and 3 columns are automatically added for
convenience. In code, you will need to manually add any rows or columns
before accessing the cell objects.
var
lTableGrid: TppTableGrid;
begin
lTableGrid := TppTableGrid.Create(Self);
lTableGrid.Band := ppReport1.DetailBand;
lTableGrid.RowCount := 1;
lTableGrid.ColCount := 2;
lTableGrid.Cells[0,0].Brush.Color := clRed;
lTableGrid.Cells[0,1].Brush.Color := clBlue;
ppReport1.Print;
end;
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
The RBHelpInstaller only offers up to Delphi2012, which I believe was
XE2? And it does not complete.
Bill
Be sure you are using the RBHelpInstaller.exe located in your
ReportBuilder 15 installation folder. If you are using the one
installed with RB 12, your version of Delphi will not be included.
I just checked the RBHelpInstaller with my installation of RB 15 and XE5
is included.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks, Nico. Someone else in the office builds the VMs we use, so I
will have to check that with him. I will also remind him, as he is
about to install RB15 into our XE7 VM.