With the kind assistance of Marc_Dillon I worked out how to get a specific summary to appear on a PDF report but for my app to be fully functional I need to be able to get the information on a form before the PDF is generated. I’ve tried various approaches, and while I can get it to work, it is too slow to work with.
My tables are structured as follows:
Orders (Parent) > Daysheets (child) > Materials Used (Grandchild)
A Daysheet may have related Materials Used of the same product entered multiple times and the same Materials Used may also be linked to numerous Day Sheets.
The process I need to cater to, on a Windows PC, is as follows:
I’m not sure that I have explained it well so I have included a screen print of the Display form including the 2 nested tables. It all works and the list of materials by DaySheet (step 5 -Related Selected Materials in the screen print below) is very fast, however step 6, Selected Materials in the screen print, is very slow, probably because the convoluted way I am creating the totals in the Materials table is creating the drag.
I would really appreciate any help or direction you can provide, as this is the last, major, component of the entire process to implement this app into the business.
For information sake, the code that works well on the email Report is as follows:
START: <<UNIQUE(SELECT(MaterialsUsed[Item Number],[Day Sheet Id].[OrderId]=[_THISROW-1]))>><<SUM(SELECT(MaterialsUsed[Qty],AND([Day Sheet Id].[OrderId]=[_THISROW-2],[Item Number] = [_THISROW-1].[Item Number])))>>
User | Count |
---|---|
35 | |
9 | |
3 | |
3 | |
2 |