Jump to content
Changes to the Jaspersoft community edition download ×

displaying summary & detail reports headers


csrnivas

Recommended Posts

HI,

This is Srini. I have a scenario like this. I have two reports Detail & Summary Report. Depending upon the user seletion we need to diaplay the respective report. Suppose if the user select Summary we need to display Summart Report, if the used selection is Detail then diaplay Detail & if the user selection is both display both summaty & detail.

For handling this i designed tworeports called summary report & detail Report respectively. I included the detail report as a sub report in the main(Summary) report. i added condition such a way so that if will display the respective reports based on the user selection. Its working fine. But the Clients wants to display columnHeader on each page. I checked the option Print Header on Each Page.  Its working fine for the first two user selections i.e Summary & Detail.

But if the user selects Both, here comes the issue into picture. Its displaying the Summary report with Summary Header, But its diaplaying the Detail Report with both the Summary Header followed by Detail Header. Plz do suggest a solution for this. You can see the Issue given below.

 

 

Summary Report
                                                ACCOUNTS SUMMARY REPORT
ACCOUNT ID                      ACCOUNT NAME                             ACCOUNT BALANCE ($USD)
        101                                       Srini                                                  300
       102                                        Sree                                                 600
 
 
Detail Report
ACCOUNTS DETAIL REPORT
ACCOUNT ID                      ACCOUNT NAME             ACCOUNT BALANCE ($USD)                        BANK BRANCH
        101                                      Srini                                 300                                                                   HYD
       102                                        Sree                                 600                                                                  BAN             
 
When I selected both option the report is being displayed as follows
Both
ACCOUNTS SUMMARY REPORT
ACCOUNT ID                      ACCOUNT NAME                             ACCOUNT BALANCE ($USD)
        101                                      Srini                                                  300
       102                                        Sree                                                 600
ACCOUNTS DETAIL REPORT
ACCOUNT ID                      ACCOUNT NAME                             ACCOUNT BALANCE ($USD)
ACCOUNT ID                      ACCOUNT NAME             ACCOUNT BALANCE ($USD)                        BANK BRANCH
        101                                       Srini                                 300                                                                   HYD
       102                                        Sree                                 600                                                                  BAN             

 

Thanks in Advance.........

Regards,

Srini

 

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I have had this problem when the subreport is put into any header or footer band. I have not found a way around it. However if the subreport is put in the summary band then the "main" report is done and the subreport heading/columns are used.
Link to comment
Share on other sites

You can now define multiple instances of the same band, and use a printWhenExpression to select what displays. In your cases, I would make the printWhenExpression select on whether the type of report was detail or summary.

 

Sherman

Jaspersoft

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...