Handle token markers from the .net code for linq reportengine

Hi,

i want to use Aspose.words to generate templates and use templates with the linq report engine. I have worked with mail merge before and there it is possible to find the markers in the document. doc.MailMerge.GetFieldNames();

is there a similar option for the linq markers?

and adding a token from code is just as simple as adding text to the document like <<[Address]>>

@Pietswieb

Unfortunately, Aspose.Words does not support the requested feature at the moment. However, we have logged this feature request as WORDSNET-6851 in our issue tracking system. You will be notified via this forum thread once this feature is available. We apologize for your inconvenience.

You can move the cursor to the desired location and write the LINQ Reporting tags using DocumentBuilder.Write method.

OK thanks for the quick support. Is there a way to get all the text from the document so i can find them myself. It should be all the actual text that would be printed…

@Pietswieb

Yes, you can save the document to TXT file format using Document.Save method or get the text of document using Document.ToString(SaveFormat.Text) method.

ok that worked… Is there a way to get access to the evaluation of the token to see wich data element it is referring to… Like <<foreach [in Orders.Order]>> refers to table Order in dataset Orders…

so i don’t need to implement all the logic of reading the tokens myself…

@Pietswieb

Unfortunately, there is no such API to get the link between tags and DataSet. Could you please share some more detail about your requirement along with input and expected output? We will then provide you more information about your query.

I am building an platform where people can design data objects which they can manipulate and use. One of the usages is to use that data to generate a report. These report can be used in different settings and processes.

I want to help the user by creating an initial template based upon their designed data-structure. But also to validate the data structure against the template to see if the data structure has all the elements that are being used in the template. For that i need to collect the tokens, interpreter them and get the data reference.

hope this will give you some more details on the requirements.

Kind regards,

Frans

@Pietswieb

Aspose.Words does not provide API to work with data sources. However, you can read the data source and text file generated by Aspose.Words using C#.

We will inform you via this forum thread once there is an update available on this issue (WORDSNET-17454).