I have a dlex template (created in the DynamicPDF Designer tool), which has a need for rendering a field which contains a potentially unlimited amount of html (coming from the available data for the report). The implementation currently is adding a Placeholder control in the template, and catching it in my c# code:
private void ReplaceDisclosuresPlaceholder_LaidOut(object sender, PlaceHolderLaidOutEventArgs e)
{
string disclosures = (string)e.LayoutWriter.Data["Disclosures"];
PageElements.ContentArea placeHolder = e.ContentArea;
HtmlArea htmlArea = new HtmlArea(disclosures, 0, 0, 720, 900);
Page page = new Page();
page.Elements.Add(htmlArea);
placeHolder.Add(page.Elements);
}
This works great if the html is small and fits on a single page of my report. If it's longer than that, then the html will carry on off the bottom of the page (through the footer of the template) and will not create new page(s) in my report. I am hoping it would behave the same way as the Formatted Record Area control, but it does not.
I have played with the GetOverflowHtmlArea function in a loop, but it only creates separate pages without my header or footer from the report.
Does anyone have any ideas on how to render the html and have it properly spread across multiple pages on my report with header and footer? Ideally, I would love to see the HtmlArea control painted onto the report and support the same behaviour as the Formatted Record Area!