• Thanks for response Sean.

    I included all Java code.

    All the logic is there.

    I don't know what else I can provide.

    I know it's hard to read Java code.

    Basically here is how it works.

    -------------------------------

    There is a web page where user selects a range of years (2000 to 2013),

    Rank years, Comparison years, Business Line, Location (LONDON,HONG KONG,etc.),

    YEAR TYPE (Fiscal,Calendar), Gross/Net,

    include Monthly Breakdown or not.

    The final report shows Rank, Totals for Commission by "month-year", business.

    User can drill-down and see details for a specific client.

    result set:

    rr_codeclient_comp_namesalesp_nametrader_namegroup_codegroup_nametype_codesoft_dollar_ratelocat_codeNov-12Dec-12

    YGRPRBIM Wiggan, Tim Stratis, George YGGRRBIM AGNY100TOR 282297.1192076.63

    CAFLRBIM OPTIONS S.F. Sales S.F. Trader YGGRRBIM SF 100TOR 7350032250----------------------------------------------

    When I debug java code and generate SQL and execute that SQL

    I get about 9,000 records.

    Please give me an idea what else I can add.