I’m trying to print a service document (own development) from the Service order form (SMAServiceOrderTable) The value I’m trying to get across is the Service order id (ServiceOrderID)
in the clicked method on the button in the form I have (the button is a MenuItemButton)
Ok, I believe that I see the problem there. You don’t need to override the clicked method on the form at all, as the caller will be populated automatically for you. What you’ll need to do is find the command button in the AOT, right click->properties and set the data source to the form level data source that you want to feed into it. Hope that helps. :3
I’m not sure I understand, first it is not a command button but a MenuItemButton.
Second I’m standing on the form(SMAServiceOrderTable), clicking the the menuItembutton should open a print report form (standard) and pass the service order ID to the Query
My first step was to try to get the SO ID over to the reprot, this is were by variable “GetParm” is empty…
secondly I need to override the query to set the query paramater to the SO ID. but thats a diffrent question (which I think I know how to do…)
Can you elaborate some more on how to pass the parmaters between to objects (form to report)
Ahh, I see what you’re doing now. Ok, what you’ll want to do here is go to the menu item that is being referenced on the menuItemButton and take a look at it’s properties. Here, you can set what type and what value of parameters it should be handing to the report. The fields in the property menu you’ll be concerned with are Parameters, EnumTypeParamater and EnumParameter.
Hi,guy, you can just go ahead with your original idea like this:
Let’s see what you have done:
You’ve defined the Args at the Form.
You get the args from the Report.
See what you’ve missed? Yes, you didn’t transfer the parameter from the Form to the Report
How to make it:
Define the parameter you want to transfer at menuitem (Property of the menuitem).
Assign value to the paramter at the Click(): this.menufunction().parameters(SMAServiceOrderTable.ServiceOrderID). This will transfer the value to the menuItem where you can access by args.parm().