Is it possible to have different headers using LINQ (Reporting class)?:
I want to generate a document with invoices data and write the customer’s name in the header. So, each invoice must have a different header. There are invoice of a single page and others with multiple pages.
Could you please ZIP and attach your input and expected output Word document here for our reference? We will then provide you more information about your query.
I attach the ZIP with two JSON files with the same data but with different struct.
The Word document have the results that I would like.
Notice that each page has a header and footer different (sections)
Your expected document contains the section break. Unfortunately, LINQ Reporting engine does not support section break inside foreach tag. This feature was logged as WORDSNET-17026 in our issue tracking system.
Please share your template document and create a standalone console application ( source code without compilation errors ) that helps us to generate the output document without section break. We will investigate the issue and provide you more information on it.
I do not use C# as language, so I attach the WinDEV_Program.txt as an example of source code (It is very simple, just to call “BuildReport” method. I hope you understand it)
The other files I attach are the JSON file with data and the template I am testing Aspose.Words to know if it is a valid tool for us a buy it. I am not an expert in Aspose tools nor LINQ
You are getting the correct output using Aspose.Words. You can have different header and footer for first page and other pages. You just need to enable ‘Different First Page’ option as shown in attached image. Different First Page.png (24.3 KB)
We have attached the modified input document and output document with this post for your kind reference. Docs.zip (29.7 KB)
Thank you for the information. If in a future you develop the functionality of LINQ engine in order to incorporate a “section break” function inside a “foreach” it would be great.
Another question, please, how can I change the encode od the data source?. The json file is in ANSI, so, is there any function or parameter to merge the data appropriately?.