Hi expert,
I have a designed a subreport with Crystal Report, and I have add the Sap Linked button (OLE Object), to allow the user to click on the linked button and open the relativa Sap Document (Invoice, Delivery, etc etc).
In the hypetetx linked property, I have write the link
//////////////////////
//////////////////////
In this way all is ok, but In my query I have the name of the table and the DocEntry, so I try this way:
//////////////////////
'http://$b1$/link='&{Comando.Table}&'&key='&{Comando.DocEntry}
//////////////////////
If I try to open the document, I retrieve the error: You are not permitted to perform this action. Authorisation Path: Help.
I don't understand if the problem is the authorization (i am manager, superuser) or if I had write in a wrong mode the hypertext link. (maybe the Apex?)
Anybody can help me?
Regards
Marco
Hi Marco,
if {Comando.DocEntry} field is string type try this code:
//////////////////////
'http://$b1$/link?table='& {Comando.Table} &'&key='& ToText(ToNumber({Comando.DocEntry}),0,'','')
//////////////////////
else if DocEntry field is number type try this code:
//////////////////////
'http://$b1$/link?table='& {Comando.Table} &'&key='& ToText({Comando.DocEntry},0,'','')
//////////////////////
Regards,
Domenico
Edited by: Domenico Lovino on Feb 23, 2012 10:04 AM
Hi Domenico,
thank you very much, your suggestion is very helpful!!
Only with one type of document (OPCH table - AP Invoice) I retrieve the same error, but in all other document all is ok and the relativa Sap form is opened. Have you other suggestion??
Regards
Marco
hi Marco,
try this one...
'http://$b1$/link?table=OPCH&key='&ToText ({OPCH.DocEntry},0 ,"" ,"" )
Note: this will work in 8 digit document number. make the necessary changes that may suit your need.
regards,
Fidel
Maybe I have found the problem, but I don't know how can I resolve it.
If my DocEntry is 1317 I retrieve the error, if my DocEntry is 70 (or 130) the form is correctly opened.
Maybe the formula ToText is wrong if the DocEntry is > 999, or 4 digit number???
Regards
Marco
Hi expert,
no news to my problem?
Regards
Marco
Hi Marco
It sounds like the thousands separator is still in the string.
The 3rd and 4th parameters in totext are to remove the thousands separator and the decimal point.
Fidels syntax above works by replacing the separator value with a zero length string. eg <double quote><double quote> with nothing in between.
Have you entered this correctly
Rob