Jump to content
We've recently updated our Privacy Statement, available here ×

struggling to create a table


mastereh

Recommended Posts

I'm trying to create a table which contains summarized data based on various functions.

How do I have multiple steps calculated in iReport? Do I have to create multiple tables and then use the designer to have them sit next to each other? or should I create multple sub-reports (1 for each column)?

First column:

SELECT
     count(Policy."PolicyNum") AS Total_Policies
FROM
     "dbo"."Policy" Policy INNER JOIN "dbo"."PolicyTerms" PolicyTerms ON Policy."PolicySK" = PolicyTerms."PolicySK"
WHERE
     PolicyTerms."TermStatus" = 'Active'
     and PolicyTerms."TermExpiry" >= $P{UV_Date}

 

Second Column :

SELECT
     count(Policy."PolicyNum") AS Total_Auto
FROM
     "dbo"."Policy" Policy INNER JOIN "dbo"."PolicyTerms" PolicyTerms ON Policy."PolicySK" = PolicyTerms."PolicySK"
WHERE
     PolicyTerms."TermStatus" = 'Active' and
     Policy."LineOfBusiness" in ('AP','AC')
     and PolicyTerms."TermExpiry" >= $P{UV_Date}

 

Third Column:

SELECT
     count(Policy."PolicyNum") AS Total_Person_Auto
FROM
     "dbo"."Policy" Policy INNER JOIN "dbo"."PolicyTerms" PolicyTerms ON Policy."PolicySK" = PolicyTerms."PolicySK"
WHERE
     PolicyTerms."TermStatus" = 'Active' and Policy."LineOfBusiness" in ('AP')
     and PolicyTerms."TermExpiry" >= $P{UV_Date}

 

Any suggestions on how to best do this would be great.

Thanks.

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Thanks for those.

 

In the end I want my table to look something like this:

 

Total Policies   |  Total Auto                | Total Property             | Total Commercial                                                            

 5000                 |   2500                        | 2000                            | 500                                  

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...