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:
maciej-izak 2018-03-27 11:31:41 +00:00
parent c392e3804e
commit 588460c55e
2 changed files with 4 additions and 3 deletions
packages/fcl-report/demos

View File

@ -31,13 +31,13 @@
</PublishOptions>
<RunParams>
<local>
<CommandLineParams Value="-d masterdetaildataset -f pdf"/>
<CommandLineParams Value="-d jsondata -f pdf"/>
</local>
<FormatVersion Value="2"/>
<Modes Count="1">
<Mode0 Name="default">
<local>
<CommandLineParams Value="-d masterdetaildataset -f pdf"/>
<CommandLineParams Value="-d jsondata -f pdf"/>
</local>
</Mode0>
</Modes>

View File

@ -45,6 +45,7 @@ procedure TJSONDemo.InitialiseData;
begin
FReportData.Path:='Data';
FReportData.LoadFromFile('countries.json');
rpt.ReportData.AddReportData(FReportData);
end;
procedure TJSONDemo.CreateReportDesign;
@ -88,7 +89,7 @@ begin
GroupHeader := TFPReportGroupHeaderBand.Create(p);
GroupHeader.Layout.Height := 15;
GroupHeader.GroupCondition := 'copy(''[Name]'',1,1)';
GroupHeader.GroupCondition := 'copy(Name,1,1)';
{$ifdef ColorBands}
GroupHeader.Frame.Shape := fsRectangle;
GroupHeader.Frame.BackgroundColor := clGroupHeaderFooter;