-->

Acumatica report parameter for Branch

2019-08-30 04:19发布

问题:

How do I add a parameter for branch to a report?

I tried to copy the values from an existing report and I keep getting an error

"Object Reference not set to an instance of an object".

I used

= Report.GetFieldSchema('OrganizationBranchReportParameters.BranchID, OrganizationID') 

for the view and

= Report.GetDefExt('OrganizationBranchReportParameters.BranchID') 

for default. Any suggestions?

回答1:

Compare what you have with a standard report that has a Branch parameter like AP Edit Detailed (AP610500.rpx):

Open this report with the report designer by using the EDIT REPORT button. In the report designer open the Schema Builder with menu File->Build Schema. Open the Parameter tab of the Schema Builder, select Branch parameter in tree view. Follow the same pattern for your Branch Parameter, all information is in the right pane. Substitute the APRegister DAC with your filter DAC if required.

Go to the Filter tab to use your Parameter in the query filter logic:

I suspect your issues might be caused by the use of a new custom table 'OrganizationBranchReportParameters'. That table has to be visible in the Schema Builder Tables tab Right Pane. If it's not in the left pane, use the Load Schema button to load the custom tables. If it's not in the right pane, use the Arrow button to put it there.



标签: acumatica