Jump to content
  • NullPointerException in JRBaseReport.getAllBands if report has no groups


    nmsakos
    Assigned User teodord
    CategoryBug report
    PriorityNormal
    ReproducibilityAlways
    ResolutionFixed
    SeverityMinor
    StatusClosed

    If the report has no groups the JRBaseReport.getAllBands fails with NullPointerException at the line 704. The couse is that mainDataset.getGroups() returns null.

     

    Solution may be:

     

    if (mainDataset.getGroups()!=null) { //--ADD line

    for (JRGroup group : mainDataset.getGroups())

    {

    addBands(group.getGroupHeaderSection(), bands);

    addBands(group.getGroupFooterSection(), bands);

    }

    } //--ADD line



    User Feedback

    Recommended Comments


×
×
  • Create New...