on 04-06-2005 10:36 AM
Hi
Is it possible to print a range of documents via the SDK, analogously as in "sales - document printing"?
And if possible, can anyone give us some program-code how we can accomplish this?
Many thanks in advance,
Iris Spenninck
Iris,
Currently the ability to capture the output of a print event is not available as far as the range of values chosen for the report and the report layout itself. This functionality will be available with the SAP Business One 2005 SDK where we will expose the "ReportLayoutService". Any custom reports for add-ons need to be created with an external report writer such a Crystal Reports, Cognos, etc.
Hope this helps,
Eddy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
SDK has no interface to support printing; you would have to use the APIs in Windows - or e.g. MFC for this "directly".
Regards,
Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there,
If the SDK has no interface to support printing, how do I print after I had created a Delivery Order using SDK?
How do I use the APIs in Windows to get the print layout format I had specific in SBO Layout Designer?
Quite confusing... Cos SBO SDK allows us to create marketing document but don't allow us to print? Meaning if I create 100 Delivery Order using SDK, I had to go to the Delivery Order Screen to click 100 times to send for printing? Please help?
Hi,
I have the same problem, i solved in this manner (you need use ui api )
aplication.ActivateMenuItem("2053") 'open invoice form
Dim fo As SAPbouiCOM.Form
fo = aplication.Forms.ActiveForm
fo.Mode =SapbouiCOM.BoFormMode.fm_FIND_MODE 'activates find
fo.Items.Item("8").Specific.value = numfac
'numfac is the docentry you want to print
fo.Items.Item("1").Click() 'makes the search
aplication.Menus.Item("520").Activate() 'open printing dialog
fo.Items.Item("1").Click() 'close the invoice form
with this code you must press "print" in the printdialog
hope it helps you
Salvador Biot
hello Salvador,
above auto printing or developping the printing fnc, i need also advanced setup for printing an invoice.
i need the 'print preferences' screen with a subtable per document:
invoice =
1 print on printer 1 ... 2 times
2 print on printer 4 ... 1 time
3 print on Printer 5 drawer 2 ... 1 time
etc...
and more. so a mix from visual studio with window API reading the possible queues and need for the possible documents with their layout setup for each customer...
has someone an idee what to use ?
thanks
philippe h
You could try sending a keystroke with
SendKeys.Send("") The tricky part here is that the Print dialog might not be open yet when the Sendkeys.Send gets executed. A workaround that I have used successfully is to fill the keyboard buffer with meaningless keystrokes before invoking the dialog. Something like this: SendKeys.Send("{PGUP 100}") 'insert the line that kicks off the dialog here SendKeys.SendWait("") SendKeys.SendWait("")
HTH
Juha
Thank You for your help Juha,
I still am unable to make it work can you help?
applic.ActivateMenuItem ("2050") 'open invoice form
Dim fo As SAPbouiCOM.Form
Set fo = applic.Forms.ActiveForm
fo.Mode = SAPbouiCOM.BoFormMode.fm_FIND_MODE 'activates find
fo.Items.Item("8").Specific.Value = sObjectCode
fo.Items.Item("1").Click 'makes the search
<b>SendKeys "{ENTER}", False
applic.ActivateMenuItem ("520")
'applic.Menus.Item("520").Activate 'open printing dialog
SendKeys "{ENTER}", True</b>
fo.Items.Item("1").Click 'close the invoice form
Yes, I tried to change may true and false.
thank you again
Try this
1. Make sure that SendKeys refers to System.Windows.Forms
2. Modify your code
-- snip --
SendKeys.Send("{PGUP 100}")
applic.ActivateMenuItem ("520")
' You may try uncommenting the next line, too:
' System.Threading.Thread.Sleep(1000)
SendKeys.SendWait("")
SendKeys.SendWait("") applic.StatusBar.SetText(" was sent to keyboard. Is the 'Print' window active?",5,2)
-- snip --
HTH
Juha
HTH
Juha
User | Count |
---|---|
100 | |
11 | |
11 | |
6 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.