Page_DataRendering(header)

This public forum is for user-to-user discussions of ASP Report Maker. Note that this is not support forum.

Page_DataRendering(header)

Postby ready4data » Mon Aug 08, 2016 7:50 pm

Is there a way to add text at the top of the report table.
If I use Response.write("Whatever") in the Page_DataRendering(header) event, the text is placed at the top of the external search filters.
Right now I have to modify the generated report and add
<%
Response.write("Whatever")
%>
right before the </form> tag in the search form.

Thanks,
Scott
ready4data
 
Posts: 276
Joined: Mon Nov 19, 2012 8:24 pm

Re: Page_DataRendering(header)

Postby motfs » Thu Aug 11, 2016 1:55 pm

You need to use Startup Script to add your header in other location or move the position of the generated header by jQuery .append(). Make sure the generated header has id.
motfs
 
Posts: 710
Joined: Tue Sep 08, 2015 4:55 pm

Re: Page_DataRendering(header)

Postby ready4data » Fri Aug 12, 2016 6:49 pm

Place this in the startup script for your report.
In my case I wanted text above the report table which is at the bottom(beforeEnd) of the search <form>
var div = document.getElementById( 'frptCompliancecrosstab' ); //frptCompliancecrosstab is the name of the element where you want to place the text
div.insertAdjacentHTML( 'beforeEnd', 'Your text here' );
div.insertAdjacentHTML( 'beforeEnd', '<br>' );
div.insertAdjacentHTML( 'beforeEnd', 'More of your text here' );

You can also apply css to the text if you have added custom css. I have a style called redbold
div.insertAdjacentHTML( 'beforeEnd', '<span class="redbold">' + 'Your text here' + '</span>' );


Scott
ready4data
 
Posts: 276
Joined: Mon Nov 19, 2012 8:24 pm


Return to General Discussion (ASP Report Maker)