Word Reports in 24.1

Hi Etienne,

We have a requirement to print a report in word or pdf. At this point, we are exploring the option to print the report in word. We are able to generate a report, however we need guidance on how to achieve printing the data using cursor for list of projects based on the filters. In the sample below we need to select set of projects based on a filter then print the data of the projects belonging to the bucket.

Again, 1.1 ,2.1 is a variable list and can change everytime the report is printed.

1. Completed 123 BU projects  [Projects completed with 123 BU]

     1.1 Project 123 [Project 123 has 2 BUs 123 and 222]

               BU: 123

               Project Desc: Testing 123

     1.2. Project 111

               BU: 123

               Project Desc: Testing 111

2. Completed 222 BU Projects [Projects completed with 123 BU]

     2.1 Project 123 [Project 123 has 2 BUs 123 and 222]

               BU: 222

               Project Desc: Testing 123

3. Cancelled 123 Projects

4. Active 222 BU Projects

     4.1 Project 666

               BU: 222 

               Project Desc: Testing 666

Tags:

Parents
  • Suggested Answer

    0  

    Hi Urva,

    Check this idea:  Ability to generate PowerPoint / Word / Excel reporting generating one slide/page/folder for each row retrieved . You will have much more flexibility in PPM 24.3 but in 24.1 you cannot repeat whole paragraphs in Word Documents (one for each project). You can only repeat lines in a list or rows in a Table. 

    In your example, you only have items in lists, so maybe this may be doable, though I'm not guaranteeing that nested lists like that will work - but it's worth a try:

    - First you're make a first query that would retrieve the various statuses with the count of projects for each.

    - Then you would run a query within each status to get hte list of projects in that status, and then would iterate for each project in sub list of the status entries. 

    All examples are provided in the demo template PPM_HOME\conf\word_templates\WordReportsDemo.docx , so please check it and let us know if you need further guidance.

    Also, another solution that would work for sure is to create a simple HTML JSP report that woud generate the data in that format, and use the ksc_run_web_report special command to save it as PDF format. This should be the easiest way to deliver your requirement if you're familiar with creating JSP reports.

  • 0 in reply to   

    Hi Etienne,

    This is helpful and yes we were able to generate PDF via JSP. However, the table printing in PDF seems to be a challenge. Same tags prints table in word or html but not in PDF as shown below. Not sure if we are missing something. 

    PDF: 

    Html and word:

  • Suggested Answer

    0   in reply to 

    Hi Urva,

    This is just a problem of CSS/Styling. Please keep in mind that the conversion of HTML to PDF only supports very basic CSS and styling, so the older the HTML you'll use, the better the results will be when converted to PDF.

    I gave it a quick try - I used the "border" table attribute and the results are encouraging. 

    HTML code returned by the JSP Report:

    <html>
    
    <table>
      <tr>
        <th>Header 1</th>
        <th>Header 2</th>
      </tr>
      <tr>
        <td>value 1</td>
        <td>value 2</td>
      </tr>
    </table>
    
    <table border="1">
      <tr>
        <th>Header 1</th>
        <th>Header 2</th>
      </tr>
      <tr>
        <td>value 1</td>
        <td>value 2</td>
      </tr>
    </table>
    
    
    </html>

    Rendered HTML page:

    Result when using PDF report:

Reply
  • Suggested Answer

    0   in reply to 

    Hi Urva,

    This is just a problem of CSS/Styling. Please keep in mind that the conversion of HTML to PDF only supports very basic CSS and styling, so the older the HTML you'll use, the better the results will be when converted to PDF.

    I gave it a quick try - I used the "border" table attribute and the results are encouraging. 

    HTML code returned by the JSP Report:

    <html>
    
    <table>
      <tr>
        <th>Header 1</th>
        <th>Header 2</th>
      </tr>
      <tr>
        <td>value 1</td>
        <td>value 2</td>
      </tr>
    </table>
    
    <table border="1">
      <tr>
        <th>Header 1</th>
        <th>Header 2</th>
      </tr>
      <tr>
        <td>value 1</td>
        <td>value 2</td>
      </tr>
    </table>
    
    
    </html>

    Rendered HTML page:

    Result when using PDF report:

Children
  • 0 in reply to   

    Hi Etienne,

    sorry to not mention this earlier, we tried all formats but it seems that PDF does not display the table in solid border as below instead the table is either double or ridge.

    The format we are looking at is as below in any format (html, word and PDF). With current code we are able to achieve this in word and html. But PDF displays it as double.

    Desired table border in Word, HTML and PDF