I am struggling with getting a report populated with all required data and it may be due to a number of issues or the approach being used.
I am trying to develop a Statement of Account report. The Person is selected using a form where the year and month of interest is selected.
The Statement of Account report includes a subreport where the transactions for the month are shown based on a union query.
1. I found that the only way I could get the subreport to display all the required transactions was to open a form (immediately prior to opening the report) paralleling the report with a subform containing the same transactions. I presumed/rationalised this as due to the order in which the report loads - the subreport loading before the report - and hence not having the parameters/values for the month/yr needed to select the records to display. The form can / will be hidden. But is this a typical approach to this problem?
2. On the report I also have a value for the balance for the month prior. This is calculated based on 2 subforms on the "hidden" form, using two summation queries - one for invoices, one for payments - and then calculating the Previous Balance as a control on the form. The control for the previous balance on the Statement of Account report then refences the control on that form. The problem is that the Statement of Account Outstanding Balance value is always $0, until refresh all is used (or go from PrintPreview to Report view) , which then shows the value from the form. I would like to present the report to the user in Print Preview mode (and automate saving to pdf), in which case Refresh all is not available.
To illustrate:
Before refresh:
After Refresh:
There is a third problem - which only occurs after refresh: the display of the Statement of Account period disappears:
Before:
After refresh or change from print preview to Report view
Hmm!? Hints / suggestions
Thanks
This is from the rough and ready form that opens before the statement:
I am trying to develop a Statement of Account report. The Person is selected using a form where the year and month of interest is selected.
The Statement of Account report includes a subreport where the transactions for the month are shown based on a union query.
1. I found that the only way I could get the subreport to display all the required transactions was to open a form (immediately prior to opening the report) paralleling the report with a subform containing the same transactions. I presumed/rationalised this as due to the order in which the report loads - the subreport loading before the report - and hence not having the parameters/values for the month/yr needed to select the records to display. The form can / will be hidden. But is this a typical approach to this problem?
2. On the report I also have a value for the balance for the month prior. This is calculated based on 2 subforms on the "hidden" form, using two summation queries - one for invoices, one for payments - and then calculating the Previous Balance as a control on the form. The control for the previous balance on the Statement of Account report then refences the control on that form. The problem is that the Statement of Account Outstanding Balance value is always $0, until refresh all is used (or go from PrintPreview to Report view) , which then shows the value from the form. I would like to present the report to the user in Print Preview mode (and automate saving to pdf), in which case Refresh all is not available.
To illustrate:
Before refresh:
After Refresh:
There is a third problem - which only occurs after refresh: the display of the Statement of Account period disappears:
Before:
After refresh or change from print preview to Report view
Hmm!? Hints / suggestions
Thanks
This is from the rough and ready form that opens before the statement:
Last edited: