cancel
Showing results for 
Search instead for 
Did you mean: 

Linked Button error in a subReport with Crystal Reports

Former Member
0 Kudos

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

//////////////////////

'http://$b1$/link=OINV&key=1'

//////////////////////

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

Accepted Solutions (0)

Answers (1)

Answers (1)

lovinodo
Explorer
0 Kudos

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

Former Member
0 Kudos

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

former_member541807
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi expert,

no news to my problem?

Regards

Marco

Former Member
0 Kudos

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