Hello,
You can only do this using a macro. You would attach the macro to the Execute action
event of the button. The routine needs to be modified for the internal name of your form & the specific name of the report to be generated. Here is the macro:
Sub OpenReport
oDrawPage = ThisComponent.getDrawPage()
oForm = oDrawPage.Forms.getByName("YOUR_INTERNAL_FORM_NAME_HERE")
If oForm.IsNew then
oForm.insertRow()
else
oForm.updateRow()
EndIf
ocontroller = Thisdatabasedocument.currentController
if not ocontroller.isconnected then ocontroller.connect
oreportdoc = Thisdatabasedocument.reportdocuments.getbyname("REPORT_NAME_HERE").open
End Sub
This routine first updates or inserts the current record then executes the report.
If you are not familiar with macros you should refer to the LO documentation - found here.
Edit 1/23/2018:
To further help, attached is the sample I used for testing prior to posting the answer. This contains one table, query, form and report. The form contains the button which updates/inserts the table record and then executes the report.
Sample - ButtonToStartReport.odb
If this answers your question please tick the (upper left area of answer). It helps others to know there was an accepted answer.