I'm having a little problem with sending an HTML document.
The Scenario is as follows. I have.
- MainCompany
- Stores (child of main company)
- Sales Tax (child of Stores)
So a Main Company has stores and each store has a report that is sent each month.. There is a Detail and Summary report.
The Detail Report sends a SEPARATE Email Per Store which works fine. Coding below. There are more conditions but left them off for this.
FIND ALL MainCompany IN BATCHES OF 1
FIND Stores WHERE Stores.MainCompany=MainCompany
FIND StoreTaxes WHERE StoreTaxes.Store.MainCompany=Stores.MainCompany
MonthlyEmailSalesTaxReportSendDetail
This works in that it finds Cycles through each Main Company, finds the stores pertaining to that company, finds the sales tax for each store, and sends 1 HTML page.
I could also have said:
FIND ALL MainCompany IN BATCHES OF 1
FIND StoreTaxes WHERE StoreTaxes.Store.MainCompany=MainCompany
MonthlyEmailSalesTaxReportSendSummary
Works either way for Detail.
Where I have the problem is in the Summary. Instead of sending a page per Store with Taxes, I want one table and one email like below. So I want to send all the Stores and Store Taxes for a Main Company in 1 Email .
Need an Email to work like this.
Store # - Taxable Sales, Etc
1 - 1000.00
2 - 1002.00
- 2102.12
Next Company (next email)
Store # - Taxable Sales, Etc.
20 - 2232.00
25 - 1230.00
I change the code up a little, but still get one page per store. Thought maybe if I read the sales taxes by store it would work. No luck. I don't think I need to do anything because I am using an HTML table? Any help is appreciated as this is probably pretty basic but the grasp of what is in context at the time of sending is a little confusing.
This is the simplified code for the summary. Thanks in advance for any help. Mark
FIND ALL MainCompany IN BATCHES OF 1
FIND StoreTaxes WHERE StoreTaxes.Store.MainCompany=MainCompany
MonthlyEmailSalesTaxReportSendSummary