How to customise Page headers

Hello
I would like to be able get the name of an organisation with a table to appear on all the pages and reports in a project. Kindly assist.
Thanks

It depends on where you want to show. Where is the “page headers” you refer to?

Thanks for your response.
I want for example the name of the Organisation stored in the setup table to be called up and appear in the headers on reports and pages within the application.

If you meant the report name (e.g. “Sales by Customer”) above the report, you may set $this->Heading in server event (e.g. Page_Render).

What I want is to have the name of the company using the program e.g “ABZ Limited” to appear in the header page of reports and pages of the program.
Thanks

You may try Page_DataRendering server event that belongs to your Reports. Please read Server Events and Client Scripts topic for more info and example.

I already tried this but I am not getting any output. Below is the code I entered. Kindly suggest amendment.

// Page Data Rendering event
function Page_DataRendering() {
	// Example:
	//$header = "your header";
	
	$myField1 = ExecuteScalar("SELECT chname FROM sys_admin WHERE chno=1");
	$myField2 = ExecuteScalar("SELECT chaddress2 FROM sys_admin WHERE chno=1");

	$header = "$myField1", ", ", "$myField2";

	<?php
	$disp=" <html>
	<h3 align=center><?php print {$header}; ?></h1>
	</html> ";
	print $disp;
	?>
}

arbei wrote:

you may set > $this->Heading > in server event (e.g. Page_Render).

In addition, you have syntax error, do not put PHP code (<?php ... ?>) inside PHP function.

As arbei mentioned, you my put the code in Page_Render server event, for example:

$this->Heading = "Something";

So I should try it this way?

// Page Data Rendering event
function Page_DataRendering() {
	// Example:
	//$header = "your header";
	
	$myField1 = ExecuteScalar("SELECT chname FROM sys_admin WHERE chno=1");
	$myField2 = ExecuteScalar("SELECT chaddress2 FROM sys_admin WHERE chno=1");

	$header = "$myField1", ", ", "$myField2";

	$disp=" <html>
	<h3 align=center><?php print {$header}; ?></h1>
	</html> ";

$this->Heading = $disp;

}

arbei wrote:

you have syntax error, do not put PHP code (> <?php ... ?>> ) inside PHP function.

To concatenate strings, you may use “.”, read String Operators.

How about this now?// Page Data Rendering event
function Page_DataRendering() {
// Example:
//$header = “your header”;

$myField1 = ExecuteScalar("SELECT chname FROM sys_admin WHERE chno=1");
$myField2 = ExecuteScalar("SELECT chaddress2 FROM sys_admin WHERE chno=1");

$header = "$myField1".", "."$myField2";

$disp=" <html>
<h3 align=center>{$header}</h1>
</html> ";

$this->Heading = $disp;

Try:

$myField1 = ExecuteScalar("SELECT chname FROM sys_admin WHERE chno=1");
$myField2 = ExecuteScalar("SELECT chaddress2 FROM sys_admin WHERE chno=1");

$header = $myField1 . ", " . $myField2;

$disp="<h3 align=center>" . $header . "</h3>";
$this->Heading = $disp;