thejkfarr Posted November 22, 2011 Posted November 22, 2011 I am developing a simple invoicing solution, and I need to provide a report that has a summary of information from 2 other tables. For the life of me, I can't seem to figure out how to apply the date range to the calculation. to simplify: table1 = labor sales, table2 = Item sales (assume each has a date field) I need to create a report that gives me summaries for a date range, a page that just has "total labor sales for date range" and "total item sales for date range". Can anyone give me some pointers on how to get the numbers to reflect the date ranges. Perhaps I don't understand how the relationship needs to be setup. Thanks kindly
doughemi Posted November 22, 2011 Posted November 22, 2011 You could use a global StartDate field and a global EndDate field in a separate report table. The relationships should be ReportTable::StartDate ≤ LaborSales::date ReportTable::EndDate ≥ LaborSales::date and ReportTable::StartDate ≤ ItemSales::date ReportTable::EndDate ≥ ItemSales::date Then you can use Go To Related Record script steps to extract the records for the date range and summary fields (total of sales) to add up the sales.
doughemi Posted November 22, 2011 Posted November 22, 2011 On further thought: Is there a reason why you have two separate tables instead of one table with a type field (choice of labor or items). That way reporting is simpler, because you can use subsummary parts after sorting by type to get both reports on the same page.
thejkfarr Posted November 30, 2011 Author Posted November 30, 2011 Your advice worked perfectly! It's actually much more complicated, there are 8 tables not just 2, I just over simplified it for posting reasons. Points to Doug!
Recommended Posts
This topic is 5118 days old. Please don't post here. Open a new topic instead.
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 accountSign in
Already have an account? Sign in here.
Sign In Now