Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

I'm creating a billing report; pdf from layout.

The typical Database Relationship was Client->Entity->Billable Thing. The report/layout is based on Billable Thing table and then grouped by Client and then Entity with sub-summaries.

Now, wrench in the mix, multiple Clients can share an Entity hence the Many-To-Many relationship. When it comes to billing, for example, if two client's share an Entity 50/50, when creating a billing report, I still want Group By Client, then Entity, but show the billable things listed twice, once under each Client/Entity. This way it can be seen discretely what each Client is being billed for.

I'm not sure this is possible without creating another table with a One-To-Many to represent the actual billing of the billable thing. I'm trying to avoid creating another table if I don't have to.

Any ideas/work-arounds?

Thanks!

First, if the relationship between Client and Entity is many-to-many, then you probably want to have a join table between them - certainly If the sharing can be other that equal. However, that's not going to solve the problem of listing the same record more than once in a report. That's just not possible.

You could work around this limitation by producing an individual report for each client and appending it to the previous ones. The net result would be similar to having a layout with a page break before each occurrence of a sub-summary by client part.

 

Edited by comment

  • Author

@comment Thanks! Yes, the join table is there. Making multiple reports, one for each client, is compelling. I didn't think to try that... But the users like to see it all in a single scrollable list on the screen before printing/PDFing, so I would need to create some scripted preview/walkthrough of the report for each Client. Might be a deal breaker. 

I was hoping there was some kind of "hack" though the database diagrams/relationships.
 

The more I think about it, I should just add another table for billing so each client could have their billing for the portion of the Billable Thing. Then my report's table is based on the billing record so I get the result I want.

11 minutes ago, GisMo said:

the users like to see it all in a single scrollable list on the screen before printing/PDFing

To create such preview, you would need a reporting table where each billing would be replicated for each client. This is often done using the "virtual list" technique. Or, instead of replicating each billing ad hoc for the report, you could replicate them permanently by adding the table you wanted to avoid.

 

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.