Hi everyone!
Here is my problem:
I have 3 tables with the following data
table 1: eventTypeId (uniqueidentifier); eventType (string)
table 2: eventId (uniqueidentifier); eventTypeId; eventCost (decimal)
table 3: actionID (uniqueidentifier); eventId; actionCost (decimal)
As you can see, I have Types of Events; Events (with cost) and Actions of Events (with cost)
I need a report with the following:
1. Summary of Action Cost per Event
2. Summary of Action Cost and Event Cost per Type of Event
I'm using Crystal Reports .NET with Visual Studio 2003.
I made a dataset (XML) with the tables mentioned and a report with the following formulas:
Summary of Action Cost per Event: sum ({table2.eventCost}, {table2.eventId} ) - works fine.
Summary of Action Cost and Event Cost per Type od Event: sum ({table3.actionCost}, {table1.eventTypeId}) + sum ({table2.eventCost}, {table1.eventTypeId})
what I get is the eventCost added one time for each Action on that event. Example:
Event1; Event1Cost: 100
Action1Cost (Event 1): 10
Action2Cost (Event 1): 15
Correct summary: 125 (100 + 10 + 15)
Result on the report: 225 (100 + 10 + 100 + 15)
What can I do?
Thanks in advance.
Here is my problem:
I have 3 tables with the following data
table 1: eventTypeId (uniqueidentifier); eventType (string)
table 2: eventId (uniqueidentifier); eventTypeId; eventCost (decimal)
table 3: actionID (uniqueidentifier); eventId; actionCost (decimal)
As you can see, I have Types of Events; Events (with cost) and Actions of Events (with cost)
I need a report with the following:
1. Summary of Action Cost per Event
2. Summary of Action Cost and Event Cost per Type of Event
I'm using Crystal Reports .NET with Visual Studio 2003.
I made a dataset (XML) with the tables mentioned and a report with the following formulas:
Summary of Action Cost per Event: sum ({table2.eventCost}, {table2.eventId} ) - works fine.
Summary of Action Cost and Event Cost per Type od Event: sum ({table3.actionCost}, {table1.eventTypeId}) + sum ({table2.eventCost}, {table1.eventTypeId})
what I get is the eventCost added one time for each Action on that event. Example:
Event1; Event1Cost: 100
Action1Cost (Event 1): 10
Action2Cost (Event 1): 15
Correct summary: 125 (100 + 10 + 15)
Result on the report: 225 (100 + 10 + 100 + 15)
What can I do?
Thanks in advance.