Using external report as a subreport
-
- Posts: 7
- Joined: Thu Mar 09, 2017 4:06 pm
Re: Using external report as a subreport
Hi,
unfortunately this event is not emitted on my report object.
Do you have a sample or a hint which conditions are necessary that this event is emitted?
Thank you.
unfortunately this event is not emitted on my report object.
Do you have a sample or a hint which conditions are necessary that this event is emitted?
Thank you.
-
- Posts: 7292
- Joined: Tue Mar 20, 2018 5:34 am
Re: Using external report as a subreport
Hello,
Could you send us a sample which reproduces the issue for analysis?
Thank you.
Could you send us a sample which reproduces the issue for analysis?
Thank you.
-
- Posts: 7
- Joined: Thu Mar 09, 2017 4:06 pm
Re: Using external report as a subreport
Hi,
I found the issue. No it works. I worked on old Stimulsoft script files. --> Sorry.
I found the issue. No it works. I worked on old Stimulsoft script files. --> Sorry.
-
- Posts: 7292
- Joined: Tue Mar 20, 2018 5:34 am
Re: Using external report as a subreport
Hello
Ok.
Please let us know if you need any additional help.
Thank you.
Ok.
Please let us know if you need any additional help.
Thank you.
Re: Using external report as a subreport
Hello,
im using Stimulsoft.Js 2024.3.3, and want to implement the subreport dynamically from code, here is my code:
my issue is the "onGetSubReport" never fires, what I'm doing wrong?
im using Stimulsoft.Js 2024.3.3, and want to implement the subreport dynamically from code, here is my code:
Code: Select all
StiOptions.WebServer.url = "/DataAdapters";
Stimulsoft.Base.StiLicense.Key = '';
var report = new Stimulsoft.Report.StiReport();
report.load(resultJson);
report.onGetSubReport = function (e) {
console.log('onGetSubReport', e);
};
var headerBand = report.getComponentByName("PageHeaderBand1");
var headerReport = new Stimulsoft.Report.Components.StiSubReport();
headerReport.clientRectangle = new Stimulsoft.Base.Drawing.RectangleD(0, 0, report.pages.getByIndex(0).width.value, headerBand.height.value);
headerReport.name = 'HeaderSubReport';
headerReport.componentStyle = "SubReport";
headerBand.components.add(headerReport);
var viewer = new Stimulsoft.Viewer.StiViewer(options, "StiViewer", false);
report.renderAsync(() => {
viewer.report = report;
viewer.renderHtml('sti-viewer');
});
-
- Posts: 7292
- Joined: Tue Mar 20, 2018 5:34 am
Re: Using external report as a subreport
Hello,
Try to use the report.subReports.add() method.
Thank you.
Try to use the report.subReports.add() method.
Thank you.
-
- Posts: 7292
- Joined: Tue Mar 20, 2018 5:34 am
Re: Using external report as a subreport
Hello,
Please check the following code:
var mreport = new Stimulsoft.Report.StiReport();
mreport.loadFile("../reports/mReport.mrt");
var subreport = mreport.getComponentByName("SubReport1");
subreport.subReportUrl = "../reports/subReport.mrt";
Thank you.
Please check the following code:
var mreport = new Stimulsoft.Report.StiReport();
mreport.loadFile("../reports/mReport.mrt");
var subreport = mreport.getComponentByName("SubReport1");
subreport.subReportUrl = "../reports/subReport.mrt";
Thank you.
-
- Posts: 7292
- Joined: Tue Mar 20, 2018 5:34 am
Re: Using external report as a subreport
Hello,
Sorry, we did not exactly understand your question. Could you explain your issue in more detail?
Thank you.
Sorry, we did not exactly understand your question. Could you explain your issue in more detail?
Thank you.