B1WizardBase : LayoutKeyEvent
In the new ver, SBO SDK supports the LayoutKeyEvent.
The event allows us to open our crystal report attached to our user form.
However, this event is not supported by the B1DE 2.2(which is the latest version available as of this writing.)
I have modified the B1Wizardbase.dll to support for this event.
I will not discuss about this Event, instead you should check this Blog : http://www.sdn.sap.com/irj/scn/weblogs?blog=%2Fpub%2Fwlg%2F26720
And the discussion in this thread :
You can download the DLL here.
How to use the DLL :
1. Create your addon using the B1DE wizard as usual.
2. Under the Debug/Release folder, look for the B1Wizardbase.dll file, replace this file with the modified B1Wizardbase.dll.
3. Use the declaration of the event as below :
class MyClass : B1Event
{
[B1Listener(BoEventTypes.et_PRINT_LAYOUT_KEY, true, new string[] { "frmUID" })]
public virtual bool OnBeforePrintLayOutKey(LayoutKeyInfo eventInfo)
{
eventInfo.LayoutKey = "DocEntry";
return true;
}
}
The above declaration might be different if your class is inheriting from other than B1Event.
That’s it, the event should be captured just fine.
Happy coding.
Edy
HI Marc,
When you provide the DocEntry in the lay out key event,
It is something like you provide the crystal report parameter value.
The Parameter name in the CR has to be DocKey@
In the your crystal report you will assign the DocKey@ as your parameter to the view.
Regards
Edy
Hi Edy,
I'm using your modified B1Wizardbase.dll for printing CR layout from UDO form. Unfortunately it does not work on B1 ver 9.0. Is it possible to have the dll compiled for B1 ver 9.0? Or is there any workaround way to get the existing dll to work on B1 ver 9.0?
Thanks in advance.
Best regards, Mok
Hi Mok,
You can get it from here
Note that it is only for SBO 90 32 bit.
Regards
Edy
Hi Edy,
Thanks. However it seems it is the same dll that I've downloaded previously and it is still showing the "Unable to find dependency 'INTEROP.SAPBOUICOM' (Signature='(null)' Version='8.8.0.0') of assembly 'B1WizardBase.DLL" warning message when building the add-on project. Could this warning be ignored? Or is it possible to provide some hints how I may add the event into the B1DE source code and rebuild the dll.
Thanks & rgds, Mok
Hi Mok,
Did you clean your project before referencing the new B1WizardBase.DLL ?
Just to make sure :
1. Remove the reference from your project.
2. Build - Clean the project.
3. Go to your Obj folder, remove the whole folder.
4. Go to your Bin folder, remove any B1Wizardbase.dll if exists.
5. Go back to your project and re-reference the new B1Wizardbase.dll and re-build your project.
If you have the source code, you may do so, the easiest way is to follow the existing declaration and handling of the other events, i suggest [BoEventTypes.et_PRINT_DATA]
Open up the B1Wizardbase project and look inside the EventTables.cs
Regards
Edy
Hi Edy,
I'm facing a huge problem.
I have all my addons using the B1WizardBase.dll and now I'm upgrading SAP B1 to version 10 therefore my addons don't work anymore.
Do you have the B1DE source codes? Do you have the B1WizardBase.dll for version 10?
You could save my day.
BTW,
I use et_print_layout_key and only know I saw that you made it. Thanks
Regards,
Augusto
HI Augusto Silva
Try from here
I had modified it to support SAPBusinessOneSDK.dll
And build it under MSIL. it should supports both 32 and 64 bit.
No need for separate dll for each.
If you only need the DLL, just grab it from the bin folder.
Disclaimer:
The base Wizardbase project is not from me.
Use it on your own risk.
Regards
Edy
Thank you Edy it's works.