VelocityReport field not displaying data.

I’m building a simple report layout, header/detail style. In the Servoy code I’m creating a report context object with a Dataset in it, like this:

	// -- Create a report context object.
	var reportContext = new Object();
	
	// -- Get customer account header.
	var sql = 'select address1,address2,address3,address4,addresspc,accountname from customer'
	sql += 	' where accountcode=?';
	var headerDataset = databaseManager.getDataSetByQuery('operastatement', sql, [globals.LoginOperaAccount], 1);	
	headerDataset.rowIndex = 1;
	application.output(headerDataset.getMaxRowIndex().toString());
	
	//application.output('acc :' + headerDataset.address1);
	
	reportContext.logo = StatementGetLogo();
	reportContext.accountHeader = headerDataset;
	
	plugins.VelocityReport.previewReport('statement.html', reportContext);

The dataset is getting data, for example headerDataset.address1 returns the correct string when examined in Debug view, as does reportContext.accountHeader.address1.

On my XHTML report I just have:

$accountHeader.address1

Which looking at the examples should output the correct address line 1 - however it just repeats the text ‘$accountHeader.address1’ when previewed.

Can’t figure out why …

Hi Alan,

I just answered your question you also posted on the Velocity Report forum.
Please don’t cross post questions like this. The Velocity Report forum is the right place to ask VR questions.

ROCLASI:
Hi Alan,

I just answered your question you also posted on the Velocity Report forum.
Please don’t cross post questions like this. The Velocity Report forum is the right place to ask VR questions.

I couldn’t figure out how to register on the VR forum when I posted here … blind!

Anyway in future I will post them there, thanks.