0dc9d19b01cf869b51a84abdc10e8c9bae0b0486
FAQ/page-header-not-showing-up-in-HTML-print.md
| ... | ... | @@ -0,0 +1,29 @@ |
| 1 | +#Why isn't my page header appearing when using HTML print? |
|
| 2 | + |
|
| 3 | +[[_TOC_]] |
|
| 4 | + |
|
| 5 | +##Question |
|
| 6 | + |
|
| 7 | +I've added some content to the page header, but it only appears during PDF print, not HTML print. Why is this? |
|
| 8 | + |
|
| 9 | +##Answer |
|
| 10 | + |
|
| 11 | +Page headers only really work when an export is divided into printable pages. HTML print does not produce printable pages by default, but rather a web 'page' which is not the same as a printable page. Therefore, there is no page for a page header to apply itself to when using HTML print. |
|
| 12 | + |
|
| 13 | +You can use the following code example to get and inject values, in this case, the value you want to inject is **report.ParentReportSet.PageHeader** |
|
| 14 | + |
|
| 15 | +###Code Sample |
|
| 16 | + |
|
| 17 | +```csharp |
|
| 18 | + |
|
| 19 | + |
|
| 20 | + public override bool PerformCustomRendering(Report report, Izenda.AdHoc.Database.ReportQueryExecuteResult results, string appliedFilters, bool print, out string resultFromCustomRenderer) |
|
| 21 | + { |
|
| 22 | + string data; |
|
| 23 | + bool res = base.PerformCustomRendering(report, results, appliedFilters, print, out data); |
|
| 24 | + //change something in data |
|
| 25 | + resultFromCustomRenderer = data; |
|
| 26 | + return res; |
|
| 27 | + } |
|
| 28 | + |
|
| 29 | +``` |
|
| ... | ... | \ No newline at end of file |