cancel
Showing results for 
Search instead for 
Did you mean: 

Using a hyperlink, can I pass a value from a report to an external program?

Former Member
0 Kudos


I want to call an external program from a report using a hyperlink where the hyperlink needs to take a value from the report, a customer number. This customer number will be sent to the hyperlink which will use it to bring up that customer's record for editing. I actually have a batch file instead of an html file, and I want to send the batch file a customer record. The batch file calls an external program which accepts the customer number and brings up the customer's record for editing in a windows form. I don't have to use a batch file. I could use a link to an html file so long as I can pass the html file the customer number.

Thank you for your help.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

I am using Cyrstal Reports 2011 integrated with Visual Studio Professonal 2010.

ido_millet
Active Contributor
0 Kudos

One of the 3rd-party Crystal Reports viewers listed at http://kenhamady.com/bookmarks.html provides that functionality.  You could also implement something similar if you create your own viewer.

Former Member
0 Kudos

I believe I solved my own problem. Below are the steps.

1) From the database table in the Crystal report, I placed a field onto the report.

2) I right clicked on the field and click "format object."

3) In the "Hyperlink" tab I select "A File". In the "hyperlink information:" I clicked the formula button, "x-2." In the formula I entered the below code. You can see, in the below code, I call a bat program which accepts a value. This value is sent by the bat file to an external program using a command string "programname.exe value". The external program takes the value (which originated from the report), looks up the record in a database table and populates a form containing textboxes which display the values from the record. Now, the user can edit the records values from an external program, a windows form, after the user clicks the customer number on the Crystal report. Notice below that the command string is executed after it is declared. It is executed by just typing str on the line immediately after the string declaration.

stringVar str := "C:\ACAPPS\tasks\TestArg.bat " + {DUPLICATEPOLICIES_NOTES.CustomerNum};

str

Below are the bat file contents.

"C:\Users\chrisk\AppData\Local\Temporary Projects\AppTest\bin\Debug\AppTest.exe" %1

Answers (0)