StimVinsh / xdocreport

Automatically exported from code.google.com/p/xdocreport
0 stars 0 forks source link

Feature Request: Merge text runs in docx to allow ${mycode} without using merge fields #80

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Using merge fields makes designing templates very dificult. If you write text 
into the field (istead of opening it), it won't work.

So it would be better if ${mycode} would work within plain text. The dificult 
here is that word splits the text in several runs. So the solution is simple: 
in preprocessing merge all text run that have the same style.

The most complex thing, writing the code, is already done by someone else. 
There's a blog post at http://www.xqzone.com/blog/smallchanges/2007-12-18 about 
this.

So please consider implementing this in the docx preprocessor (and in the 
openoffice as well if possible). This will improve the usability of xdocreports 
a lot!

Original issue reported on code.google.com by michael.wyraz on 22 Feb 2012 at 2:55

GoogleCodeExporter commented 8 years ago
Hi Michael,

I understand your opinion but it's very very difficult to do that you suggest. 
I have started to manage your case with PPTX because PPTX doesn't manage 
mergefield. But it's again little bugged with Freemarker syntax because MS Word 
split the text into 3 elements.

I think your idea is possible but it's a very hard task and I prefer today 
working on another features like text styling and REST services.

Create mergefield (for docx) or input field (for odt) is boring, but since 
0.9.5 you have MS Macro (see 
http://code.google.com/p/xdocreport/wiki/DocxReportingQuickStart) and OOo 
Extension (see http://code.google.com/p/xdocreport/wiki/ODTReportingQuickStart) 
which helps you to design the report (it works for simple case like simple 
field or loop field). Do you use this macro?

XDocReport 0.9.6 will be released soon and will provide text styling (see demo 
at http://xdocreport.opensagres.cloudbees.net/textStyling.jsp) and XDocReport 
0.9.7 will provide REST Service to download/upload template odt, docx from a 
"cloud" repository by using MS Word or OpenOffice.

So for the moment I prefer improve tools macro to design report instead of 
manage your case. But I agree with you, if we have your feature (type directly 
${mycode} in the docx or odt), it should be very fantastic but problem is the 
time. Any contribution are welcome!

Regards Angelo

Original comment by angelo.z...@gmail.com on 22 Feb 2012 at 3:11