473,387 Members | 1,365 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Creating hyperlinks in exported report

Joe
I have a table with hundreds of hyperlinks in one field (defined as a
hyperlink field) and a short name for each link in another field.

I can successfully export a report to HTML with the short name followed
by the hyperlink. What I would like to do is to combine the two so only
the short name is displayed.

In other words, I would like the output HTML to read:
<a href="http://www.webpage.com">ShortName</a>

I realize that I can do this by entering a "display name" in the link
field of the table but I have many hundreds of these and I would like
to not have to go back and modify each entry.

Is there a way to combine the fields in a query so the output is in the
correct format? Is it possible to construct it in the report itself? I
can't figure out how to get the required quote signs in there.
Thank you
Joe Donohue

Nov 13 '05 #1
3 3144
Jo*@FormaExSilva.com wrote:
I have a table with hundreds of hyperlinks in one field (defined as a
hyperlink field) and a short name for each link in another field.

I can successfully export a report to HTML with the short name followed
by the hyperlink. What I would like to do is to combine the two so only
the short name is displayed.

In other words, I would like the output HTML to read:
<a href="http://www.webpage.com">ShortName</a>

I realize that I can do this by entering a "display name" in the link
field of the table but I have many hundreds of these and I would like
to not have to go back and modify each entry.

Is there a way to combine the fields in a query so the output is in the
correct format? Is it possible to construct it in the report itself? I
can't figure out how to get the required quote signs in there.
Thank you
Joe Donohue


Look at HyperlinkPart

I'll assume the Hyperlink field has the http.... stuff in it.

In a column in the querybuilder you could enter
Expr1 : "<a href=""" & HyperlinkPart([YourHyperlinkField],2) & ">" &
[YourShortNameField] & "</a>"

To test this out, you could open a form with the hyperlink and short
name fields in it, quickly create a command button and drop the
following into the OnClick event

Msgbox "<a href=""" & HyperlinkPart([YourHyperlinkField],2) & ">" &
[YourShortNameField] & "</a>"

Click on the button. If the string is correct, you are in good shape to
put it in the query. Simply remove the code and button when satisfied.
Nov 13 '05 #2
Joe
Salad, thank you for that information. Your query field produces
exactly the correct output. However, when exported to html, access
replaces the special symbols with their "&__;" equivalents and the
browsers (Netscape and IE) both do not render as hyperlinks.

Here is what I mean:

The output field from the query is:
<a href="http://www.righteouswoods.net/">All Righteous Woods</a>
which looks exactly correct.

On the report, it looks the same as above.

When exported to html, it shows up as:
&lt;a href=&quot;http://www.righteouswoods.net/&quot;&gt;All Righteous
Woods&lt;/a&gt;

I thought this should work correctly but it gets rendered not as a link
but as:
<a href="http://www.righteouswoods.net/">All Righteous Woods</a>

If I edit the html file, changing the "&lt;" to "<" and the "&gt;" to
">", it works correctly, yielding a proper link.

This surprised me. I thought you could always specify the special
characters this way but apparently you cannot, at least not with the
anchor tag.

Any idea how to cope with this? Am I doing something wrong?
I really appreciate the help.

Joe

Nov 13 '05 #3
Jo*@FormaExSilva.com wrote:
Salad, thank you for that information. Your query field produces
exactly the correct output. However, when exported to html, access
replaces the special symbols with their "&__;" equivalents and the
browsers (Netscape and IE) both do not render as hyperlinks.

Here is what I mean:

The output field from the query is:
<a href="http://www.righteouswoods.net/">All Righteous Woods</a>
which looks exactly correct.

On the report, it looks the same as above.

When exported to html, it shows up as:
&lt;a href=&quot;http://www.righteouswoods.net/&quot;&gt;All Righteous
Woods&lt;/a&gt;

I thought this should work correctly but it gets rendered not as a link
but as:
<a href="http://www.righteouswoods.net/">All Righteous Woods</a>

If I edit the html file, changing the "&lt;" to "<" and the "&gt;" to
">", it works correctly, yielding a proper link.

This surprised me. I thought you could always specify the special
characters this way but apparently you cannot, at least not with the
anchor tag.

Any idea how to cope with this? Am I doing something wrong?
I really appreciate the help.

Joe


Could you explain this about exporting to html? You are doing this from
a report? Or are you using Docmd.TransferText? Could you step me
through the process...don't need lots of detail, but enough to
understand your steps? That way I could create a table with your line,
export it, and understand what you are experiencing.

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Chris Warr | last post by:
Hi, I have a VB6 COM dll compiled on an NT 4 sp6a server installed in an MTS package. I've exported this package to a windows 2000 machine where I've created a .net application and added a...
0
by: | last post by:
I'm using this code to export the crystal report file into pdf format and stream the file to the browser: ReportDocument oRpt = new ReportDocument(); oRpt.Load(MapPath("MyReport.rpt"));...
1
by: galewind | last post by:
Hi, I have exported a report to text file using the Outputto action in a macro. There is no problem in the format in the text file except that there is a blank line every 2/3 records. How to remove...
2
by: pzou | last post by:
Hi guys, I have created a report with Reporting Services 2005 that gets executed according to a schedule I have created, every working date and the output gets exported to a csv file. My problem is...
2
by: Nathan | last post by:
I'm trying to use a LocalReport in a ReportViewer and make a couple fields in the report show up as hyperlinks so I can navigate to other pages after running the report. The hyperlinks themselves...
1
by: brent78 | last post by:
I'm trying to export an access report to excel and have run into a problem. One of my fields is a text field and when it is exported to excel some of the data values show up correctly and some are...
3
by: Saray | last post by:
Hi, I have an ASP application . i am using crystal report8.5 to generate the report. when i tried to export the crystal report to any format like .pdf,.xls,.rtf. its telling an error like "The...
3
by: KingKen | last post by:
I would like to create an active hyperlink in my report that would allow me to open a form. Is there a way to accomplish this?
0
by: shalskedar | last post by:
The grandtotal in Access REport is not matching with the total in Excel, when this report is exported from Access to Excel..... Can i get the solution for this
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.