Data is not shown in my report
I want to show strings from my array called ScaleNotes (array[1..17,1..8] of string[2]) in my report.
I use a frxCrossObject to show the grid with my ScaleNotes strings. In the BeforePrint event handler I assign the ScaleNotes values to my TfrxCrossView like this:
(the example is nearly identical with a demo in the FR4 folder where you use the data in a stringgrid instead of an array)
procedure TForm1.frxReport1BeforePrint(Sender: TfrxReportComponent);
var
Cross1: TfrxCrossView;
c, d: Integer;
begin
if Sender is TfrxCrossView then begin
if TfrxCrossView(Sender).Name = 'Cross1' then begin
Cross1 := TfrxCrossView(Sender);
for c := 1 to 17 do begin
for d := 1 to 8 do
Cross1.AddValue([d],[c], [ScaleNotes[c,d]]);
end;
end;
end;
end;
But when I try to show the data omn my report with "frxReport1.ShowReport" the data is not shown on my report. I Wonder if there is some typical errors people do when the data are not shown in the report? A hint or two would be much appreciated.
BR
Lars
I use a frxCrossObject to show the grid with my ScaleNotes strings. In the BeforePrint event handler I assign the ScaleNotes values to my TfrxCrossView like this:
(the example is nearly identical with a demo in the FR4 folder where you use the data in a stringgrid instead of an array)
procedure TForm1.frxReport1BeforePrint(Sender: TfrxReportComponent);
var
Cross1: TfrxCrossView;
c, d: Integer;
begin
if Sender is TfrxCrossView then begin
if TfrxCrossView(Sender).Name = 'Cross1' then begin
Cross1 := TfrxCrossView(Sender);
for c := 1 to 17 do begin
for d := 1 to 8 do
Cross1.AddValue([d],[c], [ScaleNotes[c,d]]);
end;
end;
end;
end;
But when I try to show the data omn my report with "frxReport1.ShowReport" the data is not shown on my report. I Wonder if there is some typical errors people do when the data are not shown in the report? A hint or two would be much appreciated.
BR
Lars
Comments
The Cell function in the CrossView has to be set to None when showing tekststrings!