Using RAP to control SubReport NoDataBehaviours
Hello
On the Before print of the Report - I want to check a list of parameters I have passed to the Report - to let me know whether I should allow the sub-report to print or not. (I have multiple sub-reports that represent different categories of the report - and I want the user to be able to select at run time which sub-reports will print.
I am currently trying to do this in the BeforePrint event of the report. The parameters will be Boolean - so I check to see if they are true or not.
procedure ReportBeforePrint;
begin
if (Report.Parameters['Test'] = True) then
srHistory.NoDataBehaviors := [ndBlankPage];
else
srHistory.NoDataBehaviors := [ndBlankReport];
end;
I am getting a RAP Compile error of
Line 4 Expected '(' or '[' but found NoDataBehaviours instead.
I am obviously doing something wrong here - would love some suggestions
Bradley
On the Before print of the Report - I want to check a list of parameters I have passed to the Report - to let me know whether I should allow the sub-report to print or not. (I have multiple sub-reports that represent different categories of the report - and I want the user to be able to select at run time which sub-reports will print.
I am currently trying to do this in the BeforePrint event of the report. The parameters will be Boolean - so I check to see if they are true or not.
procedure ReportBeforePrint;
begin
if (Report.Parameters['Test'] = True) then
srHistory.NoDataBehaviors := [ndBlankPage];
else
srHistory.NoDataBehaviors := [ndBlankReport];
end;
I am getting a RAP Compile error of
Line 4 Expected '(' or '[' but found NoDataBehaviours instead.
I am obviously doing something wrong here - would love some suggestions
Bradley
Comments
RAP does not support set types. To work around this we have added helper boolean properties for certain sets (ex. TFont.Style). I will add it to our list to add some for NoDataBehaviors.
Currently you will need to create a pass-thru function to alter the NoDataBehaviors from RAP. Something like the following...
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com