Creating some complex reporting

Hi ,
Our client want to see if complex reporting can be handled using Aspose.word for approval of the technology for further development.
As a demo we are trying to generate a report but facing some issues while workign on the logic to generate the report from the below template.
Template we made will looks like :-
«TableStart:tableStart»

«name» «header»
Static header 1
«fee1» «feedetails1»
Static header 2
« fee2» « feedetails2 »
Static header 3
« fee3» « feedetails3 »
Static header 4
« fee4» « feedetails4 »

«TableEnd: tableEnd »
The output will be

Dynamic name Fee 1 Fee 2
Static header 1
Option 1 10 11
Option 2 12 11
Option 3 44 55
Static header 2
Option 11 10 11
Option 21 12 11
Option 31 44 55
Static header 3
Option 12 10 11
Option 22 12 11
Option 32 44 55
Static header 4
Option 13 10 11
Option 23 12 11
Option 33 44 55

Requirement is that –
· We can have 1…N columns
· The rows for «fee1» can be also from 1…N.
Does template looks good or does it require any changes and will the template will achieve the required report we need to generate ?
Logic we are using , though we are unable to generate the rows for

«fee1» «feedetails1»

As it should have multiple rows and «feedetails1» can have multiple columns ?
Can you suggest some way to achieve the above report ?
Some code we are trying make DocumentBuilder for the FEILDS but not able to generate rows.

DocumentBuilder builderHeader = new DocumentBuilder(doc);
builderHeader.moveToMergeField("header");
for (int i = 0; i <scenario1.length; i++)
{
    Scenario scenario = scenario1[i];
    builderHeader.insertCell();
    builderHeader.write(scenario.getScenarioName());
}
DocumentBuilder builderBrandDispFee = new DocumentBuilder(doc);
builderBrandDispFee.moveToMergeField("fee1");
DocumentBuilder builderBrandDispFeeScenario = new DocumentBuilder(doc);
builderBrandDispFeeScenario.moveToMergeField("feedetails1");
DocumentBuilder builderGenDispFee = new DocumentBuilder(doc);
builderGenDispFee.moveToMergeField("fee1");
DocumentBuilder builderGenDispfeeScenario = new DocumentBuilder(doc);
builderGenDispfeeScenario.moveToMergeField("feedetails2");
DocumentBuilder builderBrandAdminFee = new DocumentBuilder(doc);
builderBrandAdminFee.moveToMergeField("fee1");
DocumentBuilder builderBrandAdminFeeScenario = new DocumentBuilder(doc);
builderBrandAdminFeeScenario.moveToMergeField("feedetails3");
DocumentBuilder builderGenAdminFee = new DocumentBuilder(doc);
builderGenAdminFee.moveToMergeField("fee1");
DocumentBuilder builderGenAdminFeeScenario = new DocumentBuilder(doc);
builderGenAdminFeeScenario.moveToMergeField("feedetails4");
for ()
{
    // Later we need to generate the rows and columns. Input are some Collections.
}

Regards
Sanket

Hi

Thanks for your request.

  1. If you need to generate reports with dynamic columns, you can try using the technique as described here:
    https://forum.aspose.com/t/97128
  2. As I can see you need some kind of grouping or parent child relationships in your reports. We just released new version of Aspose.Words, which supports generating reports with nested mail merge regions. This new feature can help you to generate such complex reports.

You can download the new version of Aspose.Words from here:
https://releases.aspose.com/words/net

Please let me know in case of any issues, I will be glad to help you.
Best regards.