mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-09 06:06:14 +02:00
fcl-report: fix rptjson example, and now is as default demo for fcldemo.lpi (it works "out of box" in contrary to masterdetaildataset)
git-svn-id: trunk@38632 -
This commit is contained in:
parent
c392e3804e
commit
588460c55e
@ -31,13 +31,13 @@
|
|||||||
</PublishOptions>
|
</PublishOptions>
|
||||||
<RunParams>
|
<RunParams>
|
||||||
<local>
|
<local>
|
||||||
<CommandLineParams Value="-d masterdetaildataset -f pdf"/>
|
<CommandLineParams Value="-d jsondata -f pdf"/>
|
||||||
</local>
|
</local>
|
||||||
<FormatVersion Value="2"/>
|
<FormatVersion Value="2"/>
|
||||||
<Modes Count="1">
|
<Modes Count="1">
|
||||||
<Mode0 Name="default">
|
<Mode0 Name="default">
|
||||||
<local>
|
<local>
|
||||||
<CommandLineParams Value="-d masterdetaildataset -f pdf"/>
|
<CommandLineParams Value="-d jsondata -f pdf"/>
|
||||||
</local>
|
</local>
|
||||||
</Mode0>
|
</Mode0>
|
||||||
</Modes>
|
</Modes>
|
||||||
|
@ -45,6 +45,7 @@ procedure TJSONDemo.InitialiseData;
|
|||||||
begin
|
begin
|
||||||
FReportData.Path:='Data';
|
FReportData.Path:='Data';
|
||||||
FReportData.LoadFromFile('countries.json');
|
FReportData.LoadFromFile('countries.json');
|
||||||
|
rpt.ReportData.AddReportData(FReportData);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TJSONDemo.CreateReportDesign;
|
procedure TJSONDemo.CreateReportDesign;
|
||||||
@ -88,7 +89,7 @@ begin
|
|||||||
|
|
||||||
GroupHeader := TFPReportGroupHeaderBand.Create(p);
|
GroupHeader := TFPReportGroupHeaderBand.Create(p);
|
||||||
GroupHeader.Layout.Height := 15;
|
GroupHeader.Layout.Height := 15;
|
||||||
GroupHeader.GroupCondition := 'copy(''[Name]'',1,1)';
|
GroupHeader.GroupCondition := 'copy(Name,1,1)';
|
||||||
{$ifdef ColorBands}
|
{$ifdef ColorBands}
|
||||||
GroupHeader.Frame.Shape := fsRectangle;
|
GroupHeader.Frame.Shape := fsRectangle;
|
||||||
GroupHeader.Frame.BackgroundColor := clGroupHeaderFooter;
|
GroupHeader.Frame.BackgroundColor := clGroupHeaderFooter;
|
||||||
|
Loading…
Reference in New Issue
Block a user