Advice needed on Report layout
Hi,
I'm using Crystal reports with the data held in an Oracle database.
The report I'm trying to create is to show periods and hours worked by staff.
With in the database there are two tables which are used (Operators & TAControl). Pulling the query out to show staff the have logged in and out is fine: -
Code:
SELECT OP.CODE, OP.DESCRIPTION, PC.TIMESTAMP, PC.OPERATION_TYPE
WHERE PC.TIMESTAMP BETWEEN TO_DATE('01062005','DDMMYYYY')+'0.41667'
AND TO_DATE('01062005','DDMMYYYY')+'1.41667'
AND PC.OPERATOR_ID = OP.ID
ORDER BY 1,3
That when run returns the following: -
Code:
CODE DESCRIPTION TIMESTAMP OPERATION_TYPE
--------- ------------------------------ --------- --------------
102 Andrew 01-JUN-05 1
102 Andrew 01-JUN-05 2
The report however I'd like to have laid out as follows: -
Code:
Name Clock In Clock Out Total
Andrew 13:00 16:00 3.00
My question is how can I mange this in Crystal using the current recordset, or do I need to change the way my records are returned, and if so how?
Regards
Re: Advice needed on Report layout
I think the easiest approach would be to create a 'print table' in your Oracle database, and dump your recordset into that. Create a crystal report, and bind it to your print table. On the report itself, you can create any labels that you want (like: Name Time In Time Out Total)
My question would be, and I can't answer this, is how to you convert 01-Jun-05 to 13:00? (or 16:00)
Also, in your desired report layout, there is no provision for Operation Type, so what you including that in your recordset?