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

View File

@ -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>

View File

@ -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;