4

I have crystal report. There is the column containing the hyperlink. I want whenever click that link that page should open in new window. All this should be done in crystal reports.

Can I get any help?

Taryn
  • 242,637
  • 56
  • 362
  • 405
user1599392
  • 165
  • 3
  • 7
  • 13
  • what you say as "that page" ?? whether it is a crystal report page, html page or any other web page? – Hariharan Anbazhagan Nov 30 '12 at 07:52
  • That page means the destination page which is on internet.... This is what I actually want...... there is the field on the report which is the hyperlink.....now when i click that link, webpage should open in new window – user1599392 Nov 30 '12 at 18:14

3 Answers3

6

Your Field contains a URL and if you want to make that URL as hyperlink in crystal report, it can be done.

Consider the following sample report, which contains search engine's names and their links

enter image description here

Now your requirement is to open Google by clicking www.google.com.
Right Click the field which you want to make Hyperlink, and select Format Field.
You will get the Format Editor as like the following image. Select Hyperlink tab and select Hyperlink Type as A Website on the Internet
Select the formula field in Hyperlink Information and use your column which has URL in it and save formula. Now press OK and Preview the report.

enter image description here

You could see the link opens when you press the Field. You can also change the font color of the field to show that is a LINK.

EDIT
{link}+'?sWindow=New'
Using '?sWindow=New' after your link may open your link new tab
Try this and get back with your results !

Hariharan Anbazhagan
  • 1,321
  • 2
  • 13
  • 27
  • Yes I have done this... But I want this link to be open in new window or new tab. I am using crystal reports for visual studio 2010, So there is no hyperlinktarget option. How can I achieve this? – user1599392 Dec 01 '12 at 18:56
  • Your column have Hyperlink, right? then use that column in formula. For each row the hyperlink will be taken from your column and that would be ur destination URL. In which format your hyperlink is avail in your column ? – Hariharan Anbazhagan Dec 02 '12 at 06:22
  • hyperlink is ther interneet address and it already used in formula. As in now hyperlink is opened in same window but i wantthis link to be opened in the new window. Is there any settings to be done for this? – user1599392 Dec 02 '12 at 11:27
  • Hey It still opens in the same window. I tried the same as u told: "www.google.com" & '?sWindow=New' – user1599392 Dec 03 '12 at 05:27
  • `www.google.com+'?sWindow=New'` have you tried the same syntax?? – Hariharan Anbazhagan Dec 03 '12 at 06:58
  • hey .... have u got any other solution for this.... I m stuck in this since long time – user1599392 Dec 03 '12 at 16:40
  • Sorry frnd, even I am trying, but i couldnt get any. Get me some time ! – Hariharan Anbazhagan Dec 03 '12 at 18:04
  • 1
    hey bro.. i got the solution....... its was in .net code we have to insert hyperlink="_target" – user1599392 Dec 04 '12 at 23:01
  • 1
    The {link}+'?sWindow=New' solution will work if your URL does not have any other parameters in the URL. In situations where you have other parameters, you would replace the ? with an & (ampersand). The ? (question mark) is only valid if this is the first dynamic parameter in the URL. – Sun Sep 20 '13 at 18:58
  • @user1599392: How you do that i .net code? I am struggling since many days but not found any solution.. can you help? – SPBeginer Nov 21 '16 at 14:15
2

The report viewer has a property called HyperlinkTarget. Set it to "_blank" to open in a new window.

<CR:CrystalReportViewer ID="crvReportView" runat="server" AutoDataBind="true" HyperlinkTarget="_blank" />
Dave L.
  • 21
  • 1
1

add a target= "_blank" to your html tag i.e.:

<a href="default.asp" target = "_blank">HTML Tutorial</a>
Jeremy Peck
  • 156
  • 1
  • 7
  • That page means the destination page which is on internet.... This is what I actually want...... there is the field on the report which is the hyperlink.....now when i click that link, webpage should open in new window – user1599392 Nov 30 '12 at 18:12
  • Where I can type this code givesn by you in the crystal reports – user1599392 Nov 30 '12 at 18:19