Link to home
Start Free TrialLog in
Avatar of jnrmiller
jnrmiller

asked on

Hyperlink in each record on my report such that the link points to a document that is specific to the report record

I would like to provide a hyperlink in each record on my report such that the link points to a document that is specific to the report record. All of target documents will be stored in the same directory. Each document is identified by a unique number, and I am already capturing those numbers in the report. There IS one other part of the path that I am not currently capturing, but I COULD capture it (if needed).

The basic path would look like:
"server\directory\*_{ID-Number-from-CR-Field}.pdf" or like:
"server\directory\{form_name}_{ID-Number-from-CR-Field}.pdf"

In the first example, the * represents the part of the file name that would vary and the {number} is the unique number that is already captured for each record. I COULD add a field to the report to capture the "*" information, if it cannot be handled as a wild card.

The problem is that I have tried several combinations of syntax, and none seem to work. Thank you!
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of David11Norman
David11Norman

If it is not a web domain you need to either use the ip address for the server or add the server to the localhosts file of the client computer.

Have you tried navigating to the server location you are specifying on the client where you are running the report? If running in a browser in BOXI have you tried navigating to it on the server? Also, have you tried putting the same formula on the report as a string just to see if it is generating the values you think it is?

It would also help to know what you mean by "doesn't work". What error are you getting, or what event is occurring, when you click on the hyperlink?

Finally, did you try putting "\\" before the server name?
Avatar of jnrmiller

ASKER

I am using the Crystal Reports Formula Workshop feature. The problem is NOT with the basic format of the hyperlink. When I put the following in as the formula, I am able to access the document named in this link: "\\server\directory\form-name_12843.pdf".

The problem that I would like to use a Crystal Reports field as a variable in the formula. Each record has a unique document associated with it. The number (in this case 12843) is the identifier. I am capturing that unique number in each record (in a CR report field named: {submission_number}.

I could also capture the form-name, if using a wild card (like *) is not possible. For the sake of this inquiry, let's say that info will be captured in the report as {form_name}.

Ideally, I would like to be able to use something like the following so that each link would point to the unique document for each record: "\\server\directory\{form_name}_{submission_number}.pdf"

Since I am not yet capturing the form name, I have set up a test file that matches one of my records. I am providing the form name in the hyperlink and only trying to get it to reference the submission number. I have tried the following, which WILL save, but does not convert to an acceptable hyperlink:

"\\server\directory\'theformname_' + {submission_number} = '.pdf'"

I get the message: Unable to open hyperlink: \\server\directory\'theformname_' + {submission_number} = '.pdf'
When I first looked at this answer, I didn't recognize that it really WAS the solution. Then, when I looked at it the second time, I noticed the & signs and tick marks. When I tested with a static value in place of the *, I knew this was on the right track. It took a few more minutes and some experimenting to figure out how to add the second variable. I will post the complete solution in a new comment.
The exact syntax of the final answer is shown below. The only thing I changed was the text for the server and the directory:
"\\server\directory\"&{form_name}&"_"&{submission_numb}&".pff"