DataBaseSettings.FolderId
I am finding that Report.Template.DataBaseSettings.FolderId property doesn't
exist in RAP. Is there a fix or a workaround other than a passthru
function?
I'm using version 10.06. My end goal is to dynamically load a subreport via
RAP. Yes, I've looked at the example in ..\RBuilder\Demos\3. EndUser\5.
Dynamic Subreport Loading.
My code thus far:
procedure GlobalOnCreate;
var
SessionName,
ReportName: string;
FolderId: integer;
Template: tppTemplate;
begin
Template:= SubReport1.Report.Template;
Template.SaveTo := stDatabase;
Template.Format := ftASCII;
Template.DatabaseSettings.DataPipeline:=
Report.Template.DatabaseSettings.DataPipeline;
Template.DatabaseSettings.NameField:=
Report.Template.DatabaseSettings.NameField;
Template.DatabaseSettings.TemplateField:=
Report.Template.DatabaseSettings.TemplateField;
SessionName:= Report.Parameters['SessionName'];
GetAddressReport(SessionName, ReportName, FolderId); {pass thru}
Template.DataBaseSettings.Name := ReportName;
Template.DataBaseSettings.FolderID := FolderId;
Template.LoadFromDatabase;
{set datapipes}
end;
exist in RAP. Is there a fix or a workaround other than a passthru
function?
I'm using version 10.06. My end goal is to dynamically load a subreport via
RAP. Yes, I've looked at the example in ..\RBuilder\Demos\3. EndUser\5.
Dynamic Subreport Loading.
My code thus far:
procedure GlobalOnCreate;
var
SessionName,
ReportName: string;
FolderId: integer;
Template: tppTemplate;
begin
Template:= SubReport1.Report.Template;
Template.SaveTo := stDatabase;
Template.Format := ftASCII;
Template.DatabaseSettings.DataPipeline:=
Report.Template.DatabaseSettings.DataPipeline;
Template.DatabaseSettings.NameField:=
Report.Template.DatabaseSettings.NameField;
Template.DatabaseSettings.TemplateField:=
Report.Template.DatabaseSettings.TemplateField;
SessionName:= Report.Parameters['SessionName'];
GetAddressReport(SessionName, ReportName, FolderId); {pass thru}
Template.DataBaseSettings.Name := ReportName;
Template.DataBaseSettings.FolderID := FolderId;
Template.LoadFromDatabase;
{set datapipes}
end;
This discussion has been closed.
Comments
I created a small patch that adds the FolderID property to the
DataBaseSetting RTTI. Please send a small email to
support@digital-metaphors.com to get the patch.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com