Hi guys,
We have been using mail merging for very long time. I am doing the initial discovery work to enable the linq reporting for better templating experience.
I’ve got a few questions
-
Is it safe to use mail merge and linq reporting together? ie) a template file containing mail merge & linq reporting syntax
I’ve done some initial testings. It seems to be working fine calling ExecuteWithRegions and BuildReport in order. This way I can keep the compatibility with existing templates created with mail merge, yet enables new linq reporting feature. Do you see any problems with this approach? -
In mail merge, we used FieldMerge event to output images. In linq reporting, it’s using image tag with expression that either returns Image, Stream, Base64 or path to image. If we happen to have some images used repeatedly in the template, what method do you recommend for performance? ie) image tag used inside foreach tag, and image outputs Red signal image XX number of times.
I got the sample code working by passing image path. Would it be still okay to use the path or should it be better with base64? -
About the bookmark handling, I can see there is bookmark tag. This seems to be the tag used along with DocumentBuilder to create a template dynamically. If I create a dotx file with bookmark tag in it, Document.Range.Bookmark collection would not recognize this tag. I cannot populate the value with bookmark this way. Am I understanding it correct?
Template example:
Sample code to push value to the bookmark which wouldn’t work
- Can I please get some samples of registering utility class and consuming it within template? I created a sample code that has Utils class. It has a method that returns color code. Engine doesn’t recognize the method name. I was trying to use below documented method
Setting up Known External Types in C#|Aspose.Words for .NET
I am getting below error
An error has been encountered at the end of expression ‘Utils.GetColorCode([“red”])]>’. Can not resolve method ‘GetColorCode’ on type ‘LinqReporting.Utils’
LinqReporting.zip (121.4 KB)
Sorry for stacking multiple questions.
Thanks