Free Support Forum - aspose.com

LINQ Reporting Engine Charts - SelectMany()

Hi,

I have recently purchased the License for the latest Aspose Words c# and I am struggling with one of my charts. I have attached example template and JSOn file.

I have am trying to create a chart using the child lists of the JSON file. I assumed I could use a .SelectMany() function but this doesn’t seem to work.

Any help would be greatly appreciated.

Aspose Demo JSON.zip (34.0 KB)

@josephallison

To ensure a timely and accurate response, please attach the following resources here for testing:

  • Please attach the output Word file that shows the undesired behavior.
  • Please attach the expected output Word file that shows the desired behavior.
  • Please create a standalone console application ( source code without compilation errors ) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

@tahir.manzoor

Hi Tahir,

I have already attached the requested files. The issue isn’t with the source code, this is for the aposes linq reporting tool, so no source code to provide.

Kind regards
Joseph

@josephallison

We have tested the scenario using the following code example and managed to reproduce this issue. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-21425. You will be notified via this forum thread once this issue is resolved. We apologize for your inconvenience.

var json = File.ReadAllText(MyDir + "Aspose Demo JSON.json");

JsonDataLoadOptions options = new JsonDataLoadOptions();
options.SimpleValueParseMode = JsonSimpleValueParseMode.Loose;

var dataStream = new MemoryStream(Encoding.ASCII.GetBytes(json));
var jsonDataSource = new JsonDataSource(dataStream, options);

Document doc = new Document(MyDir + "Aspose Demo Doc.docx");

var engine = new ReportingEngine();
engine.BuildReport(doc, jsonDataSource, "DomainsVM");

doc.Save(MyDir + "20.11.docx");

@josephallison

Unfortunately, Aspose.Words does not support the requested feature at the moment. You will be notified via this forum thread once this feature is available.

We apologize for your inconvenience.

@tahir.manzoor

Ok thank you for getting back to me, do you have any suggestions on how I could make this work?
I am basically trying to flatten the resulting data into one sequence.

@josephallison

Currently, this feature is not available in Aspose.Words. We will inform you via this forum thread once there is an update available on this feature.

@josephallison

Unfortunately, the SelectMany cannot be achieved using template syntax currently. The only workaround is passing an already flattened collection of items as a data source.