Joined: 23 May 2019
Online Status: Offline
Posts: 2
Topic: Report first record for each test Posted: 28 May 2019 at 10:58am
Hello all,
I'm putting together a report that will ultimately be exported to CSV. Each product can go through a series of tests, and these tests may or may not be repeated. Test 1 must pass before test 2 is performed, and so on.
And so on for each product barcode. Ultimately, I want each barcode to only have 1 line with all tests listed. The report would end up looking like this:
BarcodeTest1Test2Test3 Barcode1 Result2 Result4 Result5
Barcode2...
with only the most recent test result for each test showing, listed horizontally.
Not shown in the example is a testing date, and I've sorted in descending order so that the newest result is always listed first. I also currently have the report grouped by barcode which seems like a logical step. However, I'm not sure where to go from here. Any help or suggestions on how to approach this are appreciated!
Joined: 23 May 2019
Online Status: Offline
Posts: 2
Posted: 03 Jun 2019 at 10:30am
I was able to solve this using subreports and shared variables.
1) Create 3 copies (1 for each test) of the main report to be used as subreports.
2) In the subreports, update the record selection formulas to select records based on test names.
3) Create shared variables for Test1, Test2, and Test3 results in their respective subreports and the main report.
4) Insert all the subreports into the details section of the main report. Subreports can be linked to main report using barcode field.
5) Place shared variables in the group footer. They should display the proper results.
6) Add barcode and other relevant database fields to group footer.
After tweaking settings related to exporting CSV files, results are as desired. If there's an easier/better way to do this, feel free to let me know.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum