Showing posts with label jumping. Show all posts
Showing posts with label jumping. Show all posts

Wednesday, March 7, 2012

conditional IF

Hello. I have a query whice look like this:
select a,b,c,d from table1;
Now - when pressing a cell in the first column we are jumping to another report with the value as parameter (called- p_param);.

In the other report the query is:
select * from table1 where a=::p_param.

What I want to do is taht in the first report I'll will check if thesecond query return any result and if so to leave it as a link. If thesecond query does't return any result (zero rows) to remove the link sothe user won't go to an empty report.

So first i need to know how to check in the first report what will be the result of the second query.

Can u help me?

Thanks in advance,
Roy.

Thank. My message already been replayed,

I just changed my query.

thanks :)

conditional IF

Hello. I have a query whice look like this:
select a,b,c,d from table1;
Now - when pressing a cell in the first column we are jumping to another report with the value as parameter (called- p_param);.

In the other report the query is:
select * from table1 where a=::p_param.

What I want to do is taht in the first report I'll will check if the second query return any result and if so to leave it as a link. If the second query does't return any result (zero rows) to remove the link so the user won't go to an empty report.

So first i need to know how to check in the first report what will be the result of the second query.

Can u help me?

Thanks in advance,
Roy.

You will need top include that within your query to let it be retunred in the same dataset as the link is filled from. Then you will be able to use it in any conditional expressions.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||" top include that within your query to let it be retunred in the same dataset as the link is filled from"

Sorry but i didn't understod that.

Can you please try to explain again?

How can i get the value from the second query before the first one?

Thank for your help.
|||YOu will have to join the cuont results to your original query to have the value present in your used resultset, something like:

Select columnshere,Subqery.Counter
From SomeTable
Inner join
(
YourCOuntQuery
) Subquery
on JoinCOlumnshere

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

conditional IF

Hello. I have a query whice look like this:
select a,b,c,d from table1;
Now - when pressing a cell in the first column we are jumping to
another report with the value as parameter (called- p_param);.
In the other report the query is:
select * from table1 where a=::p_param.
What I want to do is taht in the first report I'll will check if the
second query return any result and if so to leave it as a link. If the
second query does't return any result (zero rows) to remove the link so
the user won't go to an empty report.
So first i need to know how to check in the first report what will be
the result of the second query.
Can u help me?
Thanks in advance,
Roy.What if you use some code that calls a stored procedure and it will return a
0 or a 1. Then you can return a link or a javascript alert indicating there
was no data to return so the report would be empty.
--
"Everyone knows something you don't know"
"nicknack" wrote:
> Hello. I have a query whice look like this:
> select a,b,c,d from table1;
> Now - when pressing a cell in the first column we are jumping to
> another report with the value as parameter (called- p_param);.
> In the other report the query is:
> select * from table1 where a=::p_param.
> What I want to do is taht in the first report I'll will check if the
> second query return any result and if so to leave it as a link. If the
> second query does't return any result (zero rows) to remove the link so
> the user won't go to an empty report.
> So first i need to know how to check in the first report what will be
> the result of the second query.
> Can u help me?
> Thanks in advance,
> Roy.
>|||What if you use some code that calls a stored procedure and it will return a
0 or a 1. Then you can return a link or a javascript alert indicating there
was no data to return so the report would be empty.
--
"Everyone knows something you don't know"
"nicknack" wrote:
> Hello. I have a query whice look like this:
> select a,b,c,d from table1;
> Now - when pressing a cell in the first column we are jumping to
> another report with the value as parameter (called- p_param);.
> In the other report the query is:
> select * from table1 where a=::p_param.
> What I want to do is taht in the first report I'll will check if the
> second query return any result and if so to leave it as a link. If the
> second query does't return any result (zero rows) to remove the link so
> the user won't go to an empty report.
> So first i need to know how to check in the first report what will be
> the result of the second query.
> Can u help me?
> Thanks in advance,
> Roy.
>

conditional IF

Hello. I have a query whice look like this:
select a,b,c,d from table1;
Now - when pressing a cell in the first column we are jumping to another report with the value as parameter (called- p_param);.
In the other report the query is:
select * from table1 where a=::p_param.
What I want to do is taht in the first report I'll will check if the second query return any result and if so to leave it as a link. If the second query does't return any result (zero rows) to remove the link so the user won't go to an empty report.
So first i need to know how to check in the first report what will be the result of the second query.
Can u help me?
Thanks in advance,
Roy.
From http://www.developmentnow.com/g/115_0_0_0_0_0/sql-server-reporting-services.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.comWhat if you use some code that calls a stored procedure and it will return a
0 or a 1. Then you can return a link or a javascript alert indicating there
was no data to return so the report would be empty.
--
"Everyone knows something you don't know"
"roy mm" wrote:
> Hello. I have a query whice look like this:
> select a,b,c,d from table1;
> Now - when pressing a cell in the first column we are jumping to another report with the value as parameter (called- p_param);.
> In the other report the query is:
> select * from table1 where a=::p_param.
> What I want to do is taht in the first report I'll will check if the second query return any result and if so to leave it as a link. If the second query does't return any result (zero rows) to remove the link so the user won't go to an empty report.
> So first i need to know how to check in the first report what will be the result of the second query.
> Can u help me?
> Thanks in advance,
> Roy.
>
> From http://www.developmentnow.com/g/115_0_0_0_0_0/sql-server-reporting-services.htm
> Posted via DevelopmentNow.com Groups
> http://www.developmentnow.com
>|||What if you use some code that calls a stored procedure and it will return a
0 or a 1. Then you can return a link or a javascript alert indicating there
was no data to return so the report would be empty.
--
"Everyone knows something you don't know"
"roy mm" wrote:
> Hello. I have a query whice look like this:
> select a,b,c,d from table1;
> Now - when pressing a cell in the first column we are jumping to another report with the value as parameter (called- p_param);.
> In the other report the query is:
> select * from table1 where a=::p_param.
> What I want to do is taht in the first report I'll will check if the second query return any result and if so to leave it as a link. If the second query does't return any result (zero rows) to remove the link so the user won't go to an empty report.
> So first i need to know how to check in the first report what will be the result of the second query.
> Can u help me?
> Thanks in advance,
> Roy.
>
> From http://www.developmentnow.com/g/115_0_0_0_0_0/sql-server-reporting-services.htm
> Posted via DevelopmentNow.com Groups
> http://www.developmentnow.com
>