Hi,
We are opening a Crystal Enterprise report in a browser. The report is opened in a .pdf format. We need to make some texts/images appear as hyperlinks. We did so by formatting the concerned objects in the Crystal Reports Designer and specifying the website address. But on clicking the text/image, the website is being opened in the same window. What can we do so that the website gets opened in a new window? Please Help!
We are using Crystal Reports 10.
Thanks,
ManishHi,
Let me rephrase the problem again after some observations.
We have found out that the hyperlink in thus generated pdf file is indeed opening in a new window. But when this pdf file is displayed inside a frame, clicking on the hyperlink is opening in the same window/frame. Please Help.
Regards,
Manishsql
Showing posts with label appear. Show all posts
Showing posts with label appear. Show all posts
Monday, March 26, 2012
Saturday, February 25, 2012
Only counting values that appear more than once
Hi guys
I have a table containing serial numbers, some of which occur more than
once. What I want to do is to only count serial number that only occur
more than once. How would I go about doing this?
Many thanksandystob wrote:
> Hi guys
> I have a table containing serial numbers, some of which occur more than
> once. What I want to do is to only count serial number that only occur
> more than once. How would I go about doing this?
> Many thanks
SELECT
SUM(cnt) AS row_cnt,
COUNT(*) AS serial_number_cnt
FROM
(SELECT COUNT(*) AS cnt
FROM your_table
GROUP BY serial_number
HAVING COUNT(*)>1) T ;
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||If I understand your problem correctly,
select sum(Num) from
(select count(*)
from sometable
group by SerialNumber
having count(*)>1) X(Num)|||This will give you your list of duplicate serial numbers...
select serialnumber
from yourtable
group by serialnumber
having count(*) > 1
You can then use that as a join to do your other query...
select ..
from (
select serialnumber
from yourtable
group by serialnumber
having count(*) > 1 ) as dups
inner join yourtable yt on yt.yourid = dups.yourid
Tony.
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
"andystob" <sql@.evilscience.co.uk> wrote in message
news:1138793435.757970.264220@.o13g2000cwo.googlegroups.com...
> Hi guys
> I have a table containing serial numbers, some of which occur more than
> once. What I want to do is to only count serial number that only occur
> more than once. How would I go about doing this?
> Many thanks
>|||I've tried that code, and I'm getting the following error
Server: Msg 170, Level 15, State 1, Line 21
Line 21: Incorrect syntax near ')'.|||Ah - forgot to add an alias after the last bracket. All working now.
Thanks very much for your help, chaps.|||Hi
SELECT DATEADD(MONTH,DATEDIFF(MONTH,'19000101',
GETDATE()),'19000101')-1
"andystob" <sql@.evilscience.co.uk> wrote in message
news:1138793435.757970.264220@.o13g2000cwo.googlegroups.com...
> Hi guys
> I have a table containing serial numbers, some of which occur more than
> once. What I want to do is to only count serial number that only occur
> more than once. How would I go about doing this?
> Many thanks
>|||Lol Uri - right answer - wrong thread, you want the one before this one ;)
All the best,
Tony.
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%238oncbyJGHA.2012@.TK2MSFTNGP14.phx.gbl...
> Hi
> SELECT DATEADD(MONTH,DATEDIFF(MONTH,'19000101',
GETDATE()),'19000101')-1
>
>
> "andystob" <sql@.evilscience.co.uk> wrote in message
> news:1138793435.757970.264220@.o13g2000cwo.googlegroups.com...
>|||Yep, you are right, I was still thinking about a table variables get
recompiled in our another thread
I 'm going to take a coffee , it is time to relax :-))))
Have a nice day Tony
"Tony Rogerson" <tonyrogerson@.sqlserverfaq.com> wrote in message
news:eUimJkyJGHA.4068@.TK2MSFTNGP10.phx.gbl...
> Lol Uri - right answer - wrong thread, you want the one before this one ;)
> All the best,
> Tony.
> --
> Tony Rogerson
> SQL Server MVP
> http://sqlserverfaq.com - free video tutorials
>
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:%238oncbyJGHA.2012@.TK2MSFTNGP14.phx.gbl...
>
I have a table containing serial numbers, some of which occur more than
once. What I want to do is to only count serial number that only occur
more than once. How would I go about doing this?
Many thanksandystob wrote:
> Hi guys
> I have a table containing serial numbers, some of which occur more than
> once. What I want to do is to only count serial number that only occur
> more than once. How would I go about doing this?
> Many thanks
SELECT
SUM(cnt) AS row_cnt,
COUNT(*) AS serial_number_cnt
FROM
(SELECT COUNT(*) AS cnt
FROM your_table
GROUP BY serial_number
HAVING COUNT(*)>1) T ;
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||If I understand your problem correctly,
select sum(Num) from
(select count(*)
from sometable
group by SerialNumber
having count(*)>1) X(Num)|||This will give you your list of duplicate serial numbers...
select serialnumber
from yourtable
group by serialnumber
having count(*) > 1
You can then use that as a join to do your other query...
select ..
from (
select serialnumber
from yourtable
group by serialnumber
having count(*) > 1 ) as dups
inner join yourtable yt on yt.yourid = dups.yourid
Tony.
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
"andystob" <sql@.evilscience.co.uk> wrote in message
news:1138793435.757970.264220@.o13g2000cwo.googlegroups.com...
> Hi guys
> I have a table containing serial numbers, some of which occur more than
> once. What I want to do is to only count serial number that only occur
> more than once. How would I go about doing this?
> Many thanks
>|||I've tried that code, and I'm getting the following error
Server: Msg 170, Level 15, State 1, Line 21
Line 21: Incorrect syntax near ')'.|||Ah - forgot to add an alias after the last bracket. All working now.
Thanks very much for your help, chaps.|||Hi
SELECT DATEADD(MONTH,DATEDIFF(MONTH,'19000101',
GETDATE()),'19000101')-1
"andystob" <sql@.evilscience.co.uk> wrote in message
news:1138793435.757970.264220@.o13g2000cwo.googlegroups.com...
> Hi guys
> I have a table containing serial numbers, some of which occur more than
> once. What I want to do is to only count serial number that only occur
> more than once. How would I go about doing this?
> Many thanks
>|||Lol Uri - right answer - wrong thread, you want the one before this one ;)
All the best,
Tony.
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:%238oncbyJGHA.2012@.TK2MSFTNGP14.phx.gbl...
> Hi
> SELECT DATEADD(MONTH,DATEDIFF(MONTH,'19000101',
GETDATE()),'19000101')-1
>
>
> "andystob" <sql@.evilscience.co.uk> wrote in message
> news:1138793435.757970.264220@.o13g2000cwo.googlegroups.com...
>|||Yep, you are right, I was still thinking about a table variables get
recompiled in our another thread
I 'm going to take a coffee , it is time to relax :-))))
Have a nice day Tony
"Tony Rogerson" <tonyrogerson@.sqlserverfaq.com> wrote in message
news:eUimJkyJGHA.4068@.TK2MSFTNGP10.phx.gbl...
> Lol Uri - right answer - wrong thread, you want the one before this one ;)
> All the best,
> Tony.
> --
> Tony Rogerson
> SQL Server MVP
> http://sqlserverfaq.com - free video tutorials
>
> "Uri Dimant" <urid@.iscar.co.il> wrote in message
> news:%238oncbyJGHA.2012@.TK2MSFTNGP14.phx.gbl...
>
Subscribe to:
Posts (Atom)