Question

I am making a report in SAP Crystal Reports. I made couple of header and footer "templates" which I need to switch in via C# code. Here is the thing, in my main report, I inserted one header and one footer report which are there by default and depending on parameter I need to switch them with some external "template" which is somewhere on the disc.

I know how to access the subreport via code and to change the values of the objects, but I don't know how to switch them:

ReportDocument mainReportDocument = new ReportDocument();
ReportDocument subReportHeader = mainReportDocument .Subreports["Header.rpt"];
....

Thanks in advance.

Était-ce utile?

Autres conseils

Try this code:

ReportDocument mainReportDocument = new ReportDocument();
ReportDocument subReportHeader = mainReportDocument .Subreports["Header.rpt"];
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top