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

Crosstab issues


mishomor

Recommended Posts

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

1. The query below will show you the Name of the Sales person, the name of the items they have sold and the quantity of items they have sold. Place this query in the main report query section.

select 'John Doe' as 'SalesPerson', 'Tennis Balls' as 'ItemsSold', 2 as 'Quantity'
union all
select 'Jane Doe', 'Baseball Gloves', 3
union all
select 'Jane Doe', 'Pool Table', 5
union all
select 'John Doe', 'Pool Table', 2

2. Go to create new Crosstab and place this in your "Summary" band
3. Select the available dataset. In this example it will be the main report query then click next
4. Select the "SalePerson" field for Row group 1 then click next
5. Select the "ItemsSold" field for Column group 1 then click next
6. Select the "Quantity" field for Detail field and select "Sum" for Function and then click next. **Note** If you are already doing the  calculation in your query then you can set the Function to "Nothing".
7. Depending on your requirement, select the appropriate group totals. For this example we will have both row and column totals then click next or finish
8. Now run the report
9. For formatting changes either go to the "crosstab-1" tab on the top or simply right click on click on "Go to crosstab design tab..."
10. This is all you need to do to create a simple cross tab.

Link to comment
Share on other sites

 

kchaudry, thanks for the quick reply!!

Thing is I would need two row groupings, but one of them should have subtotal (Division). Then I would need one column grouping (STORE) but three detail fields. Two from database (TY, LT) and third calculated between two "%". Then there is summary column (STORES TOTAL) with same fields and finally at the end not shown here should be totals for all columns. I hope inserted picture can help you.

/uploads/projects/ireport/image/daily_sales.jpg

 

 



Post Edited by mishomor at 01/07/2010 17:22
Link to comment
Share on other sites

Hi
 

  I am new to IReport and I am trying to create a business quote. When I print the quote the lines are missing but when I view the pdf report the lines are present . Any ideas why?

 

Thanks in advance,

Pat

1. The query below will show you the Name of the Sales person, the name of the items they have sold and the quantity of items they have sold. Place this query in the main report query section.

select 'John Doe' as 'SalesPerson', 'Tennis Balls' as 'ItemsSold', 2 as 'Quantity'
union all
select 'Jane Doe', 'Baseball Gloves', 3
union all
select 'Jane Doe', 'Pool Table', 5
union all
select 'John Doe', 'Pool Table', 2

2. Go to create new Crosstab and place this in your "Summary" band
3. Select the available dataset. In this example it will be the main report query then click next
4. Select the "SalePerson" field for Row group 1 then click next
5. Select the "ItemsSold" field for Column group 1 then click next
6. Select the "Quantity" field for Detail field and select "Sum" for Function and then click next. **Note** If you are already doing the  calculation in your query then you can set the Function to "Nothing".
7. Depending on your requirement, select the appropriate group totals. For this example we will have both row and column totals then click next or finish
8. Now run the report
9. For formatting changes either go to the "crosstab-1" tab on the top or simply right click on click on "Go to crosstab design tab..."
10. This is all you need to do to create a simple cross tab.

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