C++ Builder examples
Hi,
I'm using the demo versio of FS 3 in C++ Builder 6 but because the examples are in Delphi I'm struggling to get some things to work. Basically, I need to convert thr following to C++,
procedure TForm1.frxReport1BeforePrint(c: TfrxReportComponent);
var
Cross: TfrxCrossView;
i, j: Integer;
begin
if c is TfrxCrossView then
begin
Cross := TfrxCrossView?©;
for i := 1 to 16 do
for j := 1 to 16 do
Cross.AddValue(, [j], [StringGrid1.Cells[i - 1, j - 1]]);
end;
end;
Most of it is straight forward but i'm struggling with,
Cross.AddValue(, [j], [StringGrid1.Cells[i - 1, j - 1]]);
Can anybody help please?
Some C++ examples would be very beneficial and might tip the scales to make me buy what looks to be a great tool!
Best wishes,
Andy Walker
iola Limited
I'm using the demo versio of FS 3 in C++ Builder 6 but because the examples are in Delphi I'm struggling to get some things to work. Basically, I need to convert thr following to C++,
procedure TForm1.frxReport1BeforePrint(c: TfrxReportComponent);
var
Cross: TfrxCrossView;
i, j: Integer;
begin
if c is TfrxCrossView then
begin
Cross := TfrxCrossView?©;
for i := 1 to 16 do
for j := 1 to 16 do
Cross.AddValue(, [j], [StringGrid1.Cells[i - 1, j - 1]]);
end;
end;
Most of it is straight forward but i'm struggling with,
Cross.AddValue(, [j], [StringGrid1.Cells[i - 1, j - 1]]);
Can anybody help please?
Some C++ examples would be very beneficial and might tip the scales to make me buy what looks to be a great tool!
Best wishes,
Andy Walker
iola Limited
Comments
void __fastcall Tshet_faktura::frxReport1BeforePrint(
TfrxReportComponent *c)
{
TfrxCrossView* Cross;
AnsiString s=c->ClassName();
if(s == "TfrxCrossView")
{
Cross = (TfrxCrossView*)c;
for (int i = 1 ;i<=16;i++)
{
for (int j = 1;j<=16;j++)
{
Variant pRows[] = {i};
Variant pCols[] = {j};
Variant pStrs[] = {"12345"};
int nSize = ARRAYSIZE(pStrs);
Cross->AddValue((const Variant*)pRows,ARRAYSIZE(pRows)-1,
(const Variant*)pCols,ARRAYSIZE(pCols)-1,
(const Variant*)pStrs,ARRAYSIZE(pStrs)-1);
}
}
}
}
Fron that I assume that I would also be able to populate the entire table with one ->AddValue call?
I'll give that a try!
Andy