Adding real Numbering in aspose generated word file using jrxml

Hi @anatoly.sidorenko

Currently we are using below object for set the Parameter.
AWDocxExporter exporter = new AWDocxExporter();

But there is no option “ALLOW_HTML_LISTS” set the html lists.

kindly could you please guide us on this?

Hi @sathiyaraj

I created test and find that this code in jrxml with new 24.6 release and AWExporterParameter.ALLOW_HTML_LISTS work fine and create nested ordered list:

<textField isStretchWithOverflow="true">
     <reportElement positionType="Float" x="0" y="181" width="504" height="60" isRemoveLineWhenBlank="true" uuid="441f80d1-aafb-45b1-9b60-3eee25a89d49"/>
           <textElement textAlignment="Justified" verticalAlignment="Top" markup="html">
               <font fontName="Arial" size="10" pdfFontName="Helvetica"/>
           </textElement>
           <textFieldExpression><![CDATA["<ol><li>Test<ol type=\"a\"><li>Test1</li><li>Test2</li></ol><ol type=\"i\"><li>Test3</li><li>Test4</li></ol></li><li>Test One</li></ol> " +
                "<span style=\"display:left\"><ul><li>Test1</li><li>Test2</li><li>Test3</li></ul></span>"]]>
           </textFieldExpression>
</textField>

Hi @anatoly.sidorenko
Okay. But we need to bring out the changes dynamically like below

  1. Test
    i. --------
    ii. ---------
    iii. --------
  2. TestTwo
    a. ------
    b. ------
    c. ------
  3. Test Three
    a.--------
    b. -------
    Incase if I delete point no 2,
  4. The point no 3 should be changed to 2
  5. If I add one more point under 3, the next point should be 4
    likewise it should work automatically.
    Can you have any idea? If yes, could you please guide me on this?

@sathiyaraj Thank you for additional information. We will check one more time and provide you more information.

Hi @vyacheslav.deryushev . Thanks for your update. Kindly check and let us update asap.

@sathiyaraj

Aspose Words for Jasper Reports only take jprint from Jasper report and convert it to docx.

You can generate lists in Jasper dynamically but generated jprint contains only static text.

If you want to use html ordered list, you should be sure that all layers of ordered list located in one textFieldExpression block.

Hi @anatoly.sidorenko I am not clear on above point. Whether it is possible or not?.
Adding all content in single textFieldExpression is not possible because jasper has some limitation.
So we can’t add all the content in single textFieldExpression.
If you have some other idea, please let us update.

@sathiyaraj We will consult with our team and provide you more information.

FYI @anatoly.sidorenko

Hi @sathiyaraj

Aspose Words for Jasper Reports can convert Jasper report with numbering list to plain text in docx.

If you want dynamic numbering in resulting docx. It possible only with single textFieldExpression and html formatting, like I explain before.

Different location and order of blocks in jrxml can broke structure of ordered list.
In such cases better to use bullet list for masking problem with splits between paragraph and pages.

Hi @anatoly.sidorenko ,

Thanks for your update.

1 Like