Announcements
Hello, everyone!
I have a custom data entity with root DS and join data sources, and I want to export data to word template, but I am getting and error "an error occured during the export".
Tried to recreate the data entity, made it simplier with almost no joined data sources, just DAVS, removed all methods, but still getting the same error.
when debugging, stack trace to error msg:
getting to line 137, then jumps over to catch block and displaying error
in "renderWordTemplate" method of DocuTemplaterender class
after line 557 result variable I guess is true, because it doesn't get into "if" block, but I can't realy view the value of the result in watch.
In the catch block, I'm getting error:
Tried some different data entities on different forms, export to word works perfectly fine. Can't figure out what is the problem.
Maybe someone can help me.
Any help appreciated!
Kind Regards,
Maris
Sorry for the late response!
I'm always doing full build with DB sync, when creating a new entity. Then refreshing the entity list.
My colleague found out that changing "Date, time, and number format" to "en-us" in user option (maybe some other formats works too) export to word is working perfectly fine.
Don't really know why is that and how to fix it, but we think that problem is causing a field of type real which is in primary index. When used "en-us" number format then the real number is formated using dot like "1.0", but when using "lv" number format the real number is formated using comma like "1,0".
Any help appreciated!
When you create entity, you must sync a database when you build entities. On the Visual Studio toolbar, click Build > Build Solution to build the project. Verify that the build doesn't contain any errors. If the error persists, you can recreate a new entity.
Standard entities and my other custom entities working fine, "documentGenerator.GenerateDocument(params)" returns "true", only export to word not working for this particular entity, but "Open in excel" functionality working perfectly fine.
Since it is skipped, it should not be executed to this piece of code. Do you also encounter this problem when exporting other standard entities or just this custom entity?
Hi, Judy!
Thanks for your response! Can you please explain, how do you mean to print out the value of the variable?
When I'm debugging the "renderWordTemplate" method of DocuTemplaterender class, cursor just jump to line 563, and I can't see the value of variable result.
Kind Regards
Maris
Hi,
I think when you don't know the value of the variable of line 557, you can try to print it out. Then you can rebuild your project with DB sync and try again.
André Arnaud de Cal...
294,125
Super User 2025 Season 1
Martin Dráb
232,871
Most Valuable Professional
nmaenpaa
101,158
Moderator