newLeadingSubSummaryPart

Hi,

I need to do a report of a form based on a dataset(by solutionModel)
The result of Query are just grouped by the first column.

My problem is the following:

When I use the method “newLeadingSubSummaryPart” I not be able to set the “GroupBy-fields” property like the tab “parts” into ‘Form Design’ perspective.
Then when I launch the print-preview of my form,the result is two white pages. The same working can be viewed with the normal form when the “GroupBy-fields” are not specified.

p.s. I have just tried to set the ‘rowIndex’ property of my Dataset before create the datasource and then put ‘true’ into ‘.groupbyDataProviderIDs’ properties of the Part but It doesn’t work.

globals.FormDatasource =databaseManager.getDataSetByQuery(server,query, null, -1);
globals.FormDatasource.rowIndex = 1
var uri = globals.FormDatasource.createDataSource('mydata2', [DM_COLUMNTYPE.INTEGER,DM_COLUMNTYPE.NUMBER, DM_COLUMNTYPE.NUMBER]);
jsform = solutionModel.newForm('myForm', uri,'myTable' ,true, 400,150);
      
var _form_part_subS = jsform.newLeadingSubSummaryPart(140)
_form_part_subS.groupbyDataProviderIDs = true;
 		
var jsFieldFirstColumn = jsform.newTextField(globals.FormDatasource.getColumnName(1),100,50,199,20);
var jsFieldSecondColumn = jsform.newTextField(globals.FormDatasource.getColumnName(2),100,80,199,20);
var jsFieldThirdColumn = jsform.newTextField(globals.FormDatasource.getColumnName(3),100,110,199,20);
 jsFieldFirstColumn.text=globals.FormDatasource.getColumnName(1)
 jsFieldSecondColumn.text=globals.FormDatasource.getColumnName(2)   	
 jsFieldThirdColumn.text=globals.FormDatasource.getColumnName(3)  
 
 forms['myForm'].controller.loadAllRecords()
 forms['myForm'].controller.showPrintPreview(false,null,125)

What i have to do to make it work?

Regards

Marco

_form_part_subS.groupbyDataProviderIDs = true;

this is not correct, you should put comma separated dataprovider ids like:

_form_part_subS.groupbyDataProviderIDs = 'id,test';