Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hyperlinks 1

Status
Not open for further replies.

bstafford21

IS-IT--Management
Oct 5, 2003
101
TH
I am using Crystal 9 and trying to do Hyperlinks.

My report pulls data from my supplier database. My suppliers all have a seperate file in my server directors that have a certificate scanned into a pdf file.

On my crystal report I want to hyperlink to a specificate suppliers certificate file only. When I add a hyperlink to the supplier name, it goes to the same certificate for all the suppliers.

How to I create a hyperlink for each individual supplier?

There should be a way to do that so each supplier's certificate can be viewed when selected, individually.

Thanks for any help in advance.

Bill
 
Hi,
How are the pdf files identified in order to associate it with a particular supplier?
( Same directory..different names ( same as suppier name in data?))




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Hi,

Yes each will have the same directory but seperate supplier named files.

Bill
 
Hi,
Not sure I understand fully..Do you mean that the supplier can name the file anything it wants? If so, the task may be impossible ( especially if it changes) ..It they name them using the same name as their name in the data, then you could cteate a formula that concatenates like:
@CERT
Code:
 '[URL unfurl="true"]http://server/directory/'[/URL] + {table.supplier_name} + '.pdf'

and use this for your hyperlink..




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
I will try to explain this. I am the owner of the Crystal Report. I have created this report to pull data information from one of our system programs. The supplier data information is controlled by me and no one else. The supplier will only send me an email of the certificate they have and I will save it as a file into a directory I created and each supplier will have a different file name. No changes will occur, but on my report I want to be able to hyperlink to the certificate I have from this report. So each supplier on the crystal report will have to have their own link, I do not know how to do this, I can put a link on the report but it is only allowing me to do 1 link for all supplier in my detail section of my crystal report. Does this make more sense on what I have and trying to do?

Bill
 
I gather data information is a strange way of saying a database?

There does appear to be a bit of a language barrier, you might do better to post examples of the "data information" (whatever that is), an example of the "but on my report I want to be able to hyperlink to the certificate I have from this report." (no idea what this means, how would the report link back to a crtificate within itself?).

I also don't understand how a supplier will have their own link.

Do you mean that you have a folder of files that you wish to have linked to a report, and that each report should show only the links related to the supplier that each report is generated for?

If so, you might read in the directory structure into a database and use the name of the supplier to join to the structure to demonstrate their files, although you'd probably have the first part of the path to their link hardcoded.

One simple means to get a file of a directory structure is to use DOS with something like:

dir /S >MyFile.txt

This will create a text file of all files, along with the subdirectories.

So if you've named the directories according to the suippliers names then then you can join by that, then replace the hardcoded drive information in the path with your appropriate link information.

Hopefully this gets you closer, and with the language barrier, consider posting examples instead of descriptions.

Overall, you'd be much better off to bring all data into a database then saving to a folder.

-k
 
Hi,
Since:
I created and each supplier will have a different file name.
The method I posted should work if you are careful to name the file the same as a supplier's name ( or ID, or whatever you use to identify distinct suppliers in some field of the data record(s) for that supplier)
Place the formula I posted as part of the details for the supplier and it should link to only that suppliers file ( since the name would be unique)




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
I could do better as you say with an example, so if this last effort will not do the trick then I will come up with a way to show that. Your one statement that says:

Do you mean that you have a folder of files that you wish to have linked to a report, and that each report should show only the links related to the supplier that each report is generated for?

That is very close to what I was describing: so I will show the report I have generated.



Crystal Report File Name is "Approved Supplier List"

The data is pulled from a database called supplier.dta:

The Heading are listed here and underneath the headings is the detail information pulled from that database.

SupplierName SupplierAddress Contact Name Telephone No
Jonny Co. 123 My Street Jonny 123 456 7899

(hyperlink C:\Approve Suppliers List\Jonny C oCert.jpg)

Dave's Co. 456 Your Street Dave 987 654 3211

(hyperlink C:\Approve Suppliers List\DavesCoCert.jpg)


Putting a normal hyperlink here will not work and will go to the same file no matter which supplier I click on.

In this report in the detail I need a link that will pull the Jonny Co Certificat.jpg file and open it so we can see the certificate. Then if I go down to the next supplier (Dave's Co) I want to link to his cerificate file and so on.

Now I have over 50 supplier names in this Crystal Report that comes from supplier.dta


I need to have a seperate link for each one to open there file stored on the server.

I hope this example will help understand better, please tell me if you need more and I will try, I really need to get this.

Thanks

Bill
 
Hi,
Why not name the files as I recommended ( and why .jpg if they are PDF files?)

If Jonny Co.'s PDF file were named Jonny Co.pdf then the formula I posted should work as a link to that company's cert file ( same thing for all the others as well) - Use the http:// form so that it will open in a browser window.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
They can be any format type of .jpg or .pdf or .tif

However I tried the formula you gave and I can't get it to work, if I use this format here in your last message, do I place it in the details section like this:

Supplier List\Jonny Co.pdf

I will try this, but please tell me if I a wrong. This does not seem to work like links do, or will this pull the actual file into the report for each supplier?

Thanks

Bill
 
Hi,
Sorry, I thought you were running the reports from a web browser..

I will try some other ideas and post what I find out..



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Hi Turkbear,

I have tried a few combinations and another formula for this project and have had no luck. Do you have any other ideas to try?

Thanks

Bill
 
Hi,
OK I got it to work this way..

Name the .pdf file the same as the Supplier
( Like Jonny Co.pdf)

Then,insert a text object ( maybe 'See Certificate' and color it blue) in the details and right-click to choose 'Format Field', then Hyperlink..
Choolse the 'File' option and for the file name click the
formula button and use:
'..\yourdirectory\' + {suppliernamefield} + '.pdf'

When you click on the 'See Certificate' field it should open the related pdf file..

You must, it appears, use a relative path rather than specifying a drive letter.





[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Hi,

I have placed this formula in the hyperlink formula block, '\\server-name\Quality Dept\1 Document Control\Active Documents - Forms\Supplier Evaluation File\Accreditation Certificates' + {Supplier.Supplier Name} + '3M Bedford EDC BSI Certificate9001-2000.pdf'

but it says it find the file. Is my syntax correct for this. When you say relative path, you mean \\server-name\directory location, is that correct and I am using the ' ' symbols correctly at the beginning and end of the formula?

Sorry to ask, I am not sure of the syntax.

Thanks

Bill

 
Sorry the error message is actually "The specified file was not found".

Bill
 
Hi,
Remove the '3M Bedford EDC BSI Certificate9001-2000' part..That should be the contents of
{Supplier.Supplier Name} , so your code would actually be looking for
'3M Bedford EDC BSI Certificate9001-20003M Bedford EDC BSI Certificate9001-2000.pdf

Probably not a file by that name..

So make the formula:
Code:
'\\server-name\Quality Dept\1 Document Control\Active Documents - Forms\Supplier Evaluation File\Accreditation Certificates' + {Supplier.Supplier Name} + '.pdf'
Assumes that the certifcate file is named exactly the same as the data in the {Supplier.Supplier Name} field.




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
The certificate file will not be the same as the {supplier.supplier name} data.

It still will not work this way and gives the same message "The specified file was not found"

In the hyperlink formula does the {supplier.supplier name} remain in the formula, how else will it pull the file for that particular supplier?

Can I send you a screen shot to see my format and report and show the formula?

Bill
 
I have renamed 2 files to match the {supplier.supplier name} field. Then inserted a text block into the details.

Typed in the following formual:

'\\Kyoshin-server\Quality Dept\1 Document Control\Active Documents - Forms\Supplier Evaluation File\Accreditation Certificates' + '3M UNITED KINGDOM PLC' + '3M UNITED KINGDOM PLC.pdf'

However it still can't find the file, is my syntax wrong for the directory location?

Bill
 
Hi,
OK..Lets take this in steps:

1: The file (in order to use the database data to find the correct file for a supplier) must have a name that is in the database record for that supplier - like the {Supplier.supplier name} field ( and all must use the same file extension - like .pdf)

2: the formula is a concatenation of the Location:
'\\Kyoshin-server\Quality Dept\1 Document Control\Active Documents - Forms\Supplier Evaluation File\Accreditation Certificates\' --be sure to include the last \
+
The Datafield - {Supplier.supplier name}
+
The file extension: 'pdf'

3: the formula for the Hyperlink ( entered in the Formula editor ( by clicking the x*2 button next to the text entry field) ) of the Hyperlik tab's File Location is therefore:
Code:
'\\Kyoshin-server\Quality Dept\1 Document Control\Active Documents - Forms\Supplier Evaluation File\Accreditation Certificates\' + {Supplier.supplier name}
 + '.pdf'

Which, in the case of
'3M UNITED KINGDOM PLC' as the {Supplier.supplier Name}
would attempt to open this file:

\\Kyoshin-server\Quality Dept\1 Document Control\Active Documents - Forms\Supplier Evaluation File\Accreditation Certificates\3M UNITED KINGDOM PLC.pdf




Give this a try .


[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Hi Turkbear,

This has done the trick and works perfect now. I fully understand how it works in this format.

Thanks for your patience and help and especially sticking with me.

Thank You

Bill :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top