Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Navigation, jump to another report?

Author  Topic 

chriskhan2000
Aged Yak Warrior

544 Posts

Posted - 2005-02-07 : 13:51:47
Is it possible to have a conditional expression in a text box stating that if the value is greater than zero, enable the "jump to report"?


Example:

=iif(Fields!Hours.Value > 0, HoursDetailReport, "")

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-02-07 : 13:56:02
It appears that you can. Where you select the report to jump to, you are able to enter an expression there.

Are you getting an error?

Tara
Go to Top of Page

chriskhan2000
Aged Yak Warrior

544 Posts

Posted - 2005-02-07 : 14:00:59
How would I tell that it's another report though? I mean the conditional expression just checks against the textbox to see if it has a value greater than 0 and if it is then enable the link to jump to that report, else don't.

So let say that in the main report, I have a textbox that has hours greater than 0, since the expression is true, it will allow the user to click on the hour. It will then go to another report with the employee name for the hour field.

Example:

=iif(Fields!Hours.Value > 0, HoursDetailReport, "")
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-02-07 : 14:03:54
I don't understand. Did you try that expression in the jump to section of the navigation tab?

Tara
Go to Top of Page

jhermiz

3564 Posts

Posted - 2005-02-07 : 14:07:30
Hi Chris,

Yes that should work, however be careful with nulls, you may need to
do:

=IIF(blah IS NOTHING, 0, "Report To Go To")




Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page

chriskhan2000
Aged Yak Warrior

544 Posts

Posted - 2005-02-07 : 14:18:23
Here's what I want to do. There's a textbox that has the field HOURS. If that field has a value greater than 0, it will provide a link to the report which gives the Employee who worked those hours. So in the main report, I have this conditional expression in that hour field.

=iif(Fields!Hours.Value > 0, HoursDetail.rdl, "")

If I leave the HoursDetail.rdl blank, I'm getting error saying that it needs to be defined. If I have qoutes around it, it will output HoursDetail.rdl.

Is there a way to call that report? Like Reports.HoursDetail.rdl or something of that nature? I also add in the reports in the Navigation tab, but it's not working as intended.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-02-07 : 14:21:45
Chris, right click on the textbox, go to properties, click advanced, go to navigation tab, look at jump to report section. Is that where you arre putting that expression? If not, then that's where it goes for jumping to reports. You don't put the expression in the actual textbox's expression but rather in its properties.

Tara
Go to Top of Page

chriskhan2000
Aged Yak Warrior

544 Posts

Posted - 2005-02-07 : 14:36:21
Yeah, that's what my assumption was too, but never occured to me until you mentioned it. I was able to generate my main report, but when I click on the textbox, I get this error.

"Report/hoursdetail.rdl cannot be compiled. Verify the report name and that the report is in the current project."
Go to Top of Page

jhermiz

3564 Posts

Posted - 2005-02-07 : 14:38:28
quote:
Originally posted by chriskhan2000

Yeah, that's what my assumption was too, but never occured to me until you mentioned it. I was able to generate my main report, but when I click on the textbox, I get this error.

"Report/hoursdetail.rdl cannot be compiled. Verify the report name and that the report is in the current project."



why is it looking for Report/hoursdetail.rdl ???

It should just be hoursdetail.rdl.




Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-02-07 : 14:43:08
I don't think it should even say .rdl in the expression.

=iif(Fields!Hours.Value > 0, NameOfTheReport, "")

NameOfTheReport should be the report name, not it's file's name.

Tara
Go to Top of Page

jhermiz

3564 Posts

Posted - 2005-02-07 : 14:47:03
quote:
Originally posted by tduggan

I don't think it should even say .rdl in the expression.

=iif(Fields!Hours.Value > 0, NameOfTheReport, "")

NameOfTheReport should be the report name, not it's file's name.

Tara



yep yep what I had originally I should of stuck with.
Wipe out that .rdl from there tara is right-o...
is it 5pm yet ?



Keeping the web experience alive -- [url]http://www.web-impulse.com[/url]
Imperfection living for perfection --
[url]http://jhermiz.blogspot.com/[/url]
Go to Top of Page

chriskhan2000
Aged Yak Warrior

544 Posts

Posted - 2005-02-07 : 14:48:38
Awesome!!! Thanks Tara and Jon. Got it working now.

Here's what the condition is:

=iif(Fields!Hours.Value > 0, "HoursDetail", "")

So by adding the .rdl extension, it doesn't want to work, but when removed it worked great.

Thanks again.
Go to Top of Page
   

- Advertisement -