Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
2 tables in one Report
Message
 
To
08/05/1997 04:08:53
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00031282
Message ID:
00031284
Views:
48
>Hi all
>
>I have a question.
>
>I have 2 tables
>
>Table 1
>
>Date Emp.name emp.nr product kg
>08.05.97 Per Simmer 455 Merluzzo 345,5
>08.05.97 Per Simmer 455 Trapez 145,5
>08.05.97 Per Simmer 455 Block 445,5
>08.05.97 Per Simmer 455 Discards 45,5
>
>
>Table 2
>Emp.name emp.nr Salary type hour
>Per Simmer 455 Reg.hour 5,5
>Per Simmer 455 Prod.hour 45,5
>Per Simmer 455 Shift hour 45,5
>
>Table 1 is ordered by date employeename
>the amount off fields for each date can vary
>from 3 ore more depending on witch product
>the employee have been producing.
>
>Table 2 is ordered by employeename and is
>the sum off hour during the week.
>The amount off fields can vary.
>
>
>I want a report witch prints what the employee
>has been producing each day, and in the bottom
>off the report i want the result off table 2 displayed.
>
>How to solve this??
>
>Best regards
>
>Per Simmersholm


Per,

1. 'Unnormalize' the data before you submit them to the report. You could for example use Select SQL and join the tables on the employee nr, set a relation (if you have the ad hoc indexes) or create a view.

2. Make sure the submitted cursor is sorted by employee (use the ORDER BY statement of the SQL, or index the cursor).

3. In your report look at the GROUP feature (look at more info in Help, and when in the report designer look in the menu under Report). This lets you 'break' the report each time a field (in casu the employee nr) changes. You will see that you can create a title and a summary.

HTH,


Marc

If things have the tendency to go your way, do not worry. It won't last. Jules Renard.
Previous
Reply
Map
View

Click here to load this message in the networking platform