Jump to content

Aggregating fields across multiple related records.


This topic is 1451 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Long story short is I'm having a printing layout issue that I'm not sure how to solve.  I have a fire dept file that has an EventReport table and each event gets one record.  Related to the EventReport records is a Narrative table.  Officers from an incident can enter multiple timestamped narrative dialogs for a given event.  I have a layout on the EventReport table for printing an event report and I had listed the Narrative dialog records within a portal.  However i'm just having layout issues between windows and mac when printing and the portal records wouldn't line up with the page breaks and if I put a second portal on page 2 and it was empty I couldn't get that page to be skipped if the portal record was empty.   

I'm wondering if there is a way to just aggregate all the data in the related Narrative table records into one field that I can more easily work into a layout for printing from the EventReports layout?  

I hope I didn't leave out any important information.  I really value everyone time and don't want to waste anyones time, I just have no idea which direction to go with this.  

Thanks, 

Chris

Link to comment
Share on other sites

How are the TO'S in question related?  Usually you print a layout based on the last related table-child, grandchild, etc.

Another way may be to just loop thru everything and put it into one temporary field using either the append technique or virtual list technique.  

Some screenshots or a sample file would help.  

Link to comment
Share on other sites

Thanks Steve.  The Narrative records are related to the Event records using the Primary Key of the Event.  

Here are some screen shots of what the users see.  The report in RED is the event report.  The ones in WHITE are the print layout of that same report.   My issue is that if a narrative is very short the print layout has a lot of empty space in that portal field until it gets to the next page which is actually another portal that starts are related record #2 and goes to related record #5. 

 

Screen Shot 2020-05-02 at 10.18.25 PM.png

Screen Shot 2020-05-02 at 10.19.04 PM.png

Screen Shot 2020-05-02 at 10.19.20 PM.png

Link to comment
Share on other sites

Does every EventReport record have at least one related Narrative record? If yes, you can print your report from the Narrative table, grouped by EventReport (assuming you want to print more than one EventReport at a time).

If not (and even if yes), you can use a calculation field in the EventReport table to list the related narratives using the (you guessed it) List function. You may want to add another calculation field in the Narrative table to combine several fields together (e.g. who, when and what) for the List function to operate on.

 

Edited by comment
Link to comment
Share on other sites

This topic is 1451 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.