← Back to team overview

dhis2-devs team mailing list archive

[Bug 1234222] Re: Data values not visible in Reports->Data Set Report-> Download as PDF/Excel

 

** Branch linked: lp:~sis-ma/dhis2/SISMA-338

-- 
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1234222

Title:
  Data values not visible in Reports->Data Set Report-> Download as
  PDF/Excel

Status in DHIS 2:
  New

Bug description:
  When choosing to download a report as PDF or Excel the data values are
  not visible in the generated report.

  This has origin in the fact that the data values are wrapped with
  <Span> tags which makes the value appear in the second child and not
  the first of the <TD> tag node.

  The error is in dhis-2\dhis-support\dhis-support-
  system\src\main\java\org\hisp\dhis\system\grid\GridUtils.java getValue
  method.

  A possible solution could be to iterate all child nodes to retrieve
  their text value:

  public static String getValue( TagNode cell )
      {
          String master = new String(EMPTY);
          for (Node child : cell.getChildren().toNodeArray())
          {
              if (child instanceof Span) {
                 master = master + ((Span)child).getStringText().trim().replaceAll( "&nbsp;", EMPTY );
              }
              else
              {
                  master = master + child.getText().trim().replaceAll( "&nbsp;", EMPTY );
              }
          }
          return master;
      }

  This bug seem to be new to version 2.13.

To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1234222/+subscriptions


References