Modifying SBO reports
What would be the simplest way to modify an SBO reprt?
I have added a user field to OITM (item master data) and I want to modify the Sales Analysis report so that I have the field as one of the selections criteria for items.
My idea is to put in some new items on the form for the user to enter their selection criteria for this field (which is pretty straight foreward)...
... but then how do i get the report generated to include the selection criteria for my user field?
Can i somehow trap the query before it is executed and modify it using SQL?
This is pretty urgent, any help is much appreciated.
Frank Moebius replied
In the ItemEvent handler just capture the "OK":
' In the "Inactive Customers" report capture pressing the "OK" button:
If pVal.FormTypeEx = "92" And _ pVal.ItemUID = "1" And _ pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED And _ pVal.BeforeAction Then ' Action! ' run your report here... ' suppress further handling through B1 application BubbleEvent = False End If
If you would need further initial guidance, I recommend looking at the SDK E-learning:
https://www.sdn.sap.com/irj/sdn/developerareas/businessone?rid=/webcontent/uuid/6207e283-0a01-0010-6c84-bacd2745c33f [original link is broken])
+ then (if necessary at all) ask more questions on SDN.
For further documentation on SDK please consult the SDK Helpcenter package.
You can download it through a link on the SAP Business One Developer Area on SDN as well.
However, exporting the data to Excel - or running the reports from there (reading B1 data) may of course be another option - but I guess you were already aware of that and wanted to have a seamless integration?
Message was edited by: Frank Moebius