MohamedSaeed / xdocreport

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

All images are shown at all place and getting repeated #339

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
NA

What is the expected output? What do you see instead?
Only one images should be shown under every text. Instead all the images are 
displayed under every text.

What version of the product are you using? On what operating system?
1.0.3 on Win 7 x64

Please provide any additional information below.
Output is shown in report.docx

Original issue reported on code.google.com by Saha.Sud...@gmail.com on 5 Dec 2013 at 8:12

Attachments:

GoogleCodeExporter commented 9 years ago
Hi,

At first you must remove : 

------------------------------------------------------
metadata.load( "questions", QuestionsModel.class, true );
------------------------------------------------------

Indeed, it means that you wish to manage lazy list in a table (your case). 
XDocReport generates «[#list questions as item_questions]» on start row and 
replace "photo" with 
item_questions.pic.

To manage your case (just one photo per loop), you should name your image to 
replace with ${ques.pic} but as MS Words doesn't accept dot for bookmark name, 
you must manage a mapping name between the bookmark name and your Java model 
(${ques.pic } <-> "photo") like this : 

------------------------------------------------------
metadata.addFieldAsImage("logo", "ques.pic");
------------------------------------------------------

regards Angelo

Original comment by angelo.z...@gmail.com on 5 Dec 2013 at 9:57

GoogleCodeExporter commented 9 years ago
Thanks a lot. It worked. I am new to XDocReport and learning. It will be great 
if you can have Javadoc for this library.

Original comment by Saha.Sud...@gmail.com on 6 Dec 2013 at 2:11

GoogleCodeExporter commented 9 years ago
> I am new to XDocReport and learning. 

I suggest you to start with 
https://code.google.com/p/xdocreport/wiki/DocxReportingQuickStart
After that I suggest you to read each sections of 
https://code.google.com/p/xdocreport/wiki/DocxReportingJavaMain (dynamic 
images, list, text styling, etc)

>It will be great if you can have Javadoc for this library.
As we use maven, Javadoc should be generated. 

@Pascal : do you know where we can found it? Is it possible to see the Javadoc 
on online?

But IMHO, I think XDocReport API is very simply, I don't know if Javadoc is 
useful. I think samples that you can download and wiki are more useful.

Original comment by angelo.z...@gmail.com on 6 Dec 2013 at 8:08

GoogleCodeExporter commented 9 years ago
> you can now browse xdocreport javadoc for version 1.0.3 here : 
http://oss.opensagres.fr/xdocreport/javadoc/1.0.3/

Many thank's Pascal!

Original comment by angelo.z...@gmail.com on 23 Dec 2013 at 10:39