none
Conditionally turn on an action

Answers

  • Hi Jamie,

    Just reposting in case you missed the alerts

    I was just trying and I seem to have found something. Use the condn below and see whether it works for u

     

    expression on the 'Specify a report' of =IIF(Parameters!tf.Value = true,"SomeOtherReport",0)

    Just put a 0 and it worked for me!!!


    Cheers,
    Jason
    P.S. : Please click the 'Mark as Answer' button if a post solves your problem! :)

    Some Random Thoughts

    • Marked as answer by Jamie Thomson Friday, November 26, 2010 3:34 PM
    Friday, November 26, 2010 3:30 PM
    Moderator
  • Sir,

    i dont think there are any property to directly help in this,

    Work around can be

    To have two text box, one will have action property enable one will have disable.

    and based  on you condition you can hide one and show one. 


    Gaurav Gupta http://sqlservermsbiblog.blogspot.com/
    • Marked as answer by Jamie Thomson Sunday, November 14, 2010 10:11 PM
    Sunday, November 14, 2010 10:03 PM

All replies

  • Sir,

    i dont think there are any property to directly help in this,

    Work around can be

    To have two text box, one will have action property enable one will have disable.

    and based  on you condition you can hide one and show one. 


    Gaurav Gupta http://sqlservermsbiblog.blogspot.com/
    • Marked as answer by Jamie Thomson Sunday, November 14, 2010 10:11 PM
    Sunday, November 14, 2010 10:03 PM
  • Ah another good idea Guarav. Thank you.
    http://sqlblog.com/blogs/jamie_thomson/ | @jamiet | About me
    Jamie Thomson
    Sunday, November 14, 2010 10:10 PM
  • On the contrary, I feel this is very much possible, if my understanding is correct. I just replicated it using the steps below -

    1) Made a simple report with a datetime report parameter. Made one text box and the value is set as the expression given below

    =iif(instr(Parameters!Report_Date.Value,"19")>0,"http://bing.com","")

    2) The same expression is given to the Jump to URL property in the navigation tab of textbox

    3) Now preview the report. When you select a date like 19/10/2010, and then click on the textbox, the site bing.com will open up. But if a date which doesnt contain 19 is selected, then basically you will not be able to have the click option.

     

    The expression can be substituted for whatever you want, and the url can be substituted for the report url

    By the way, great session for the London SQL User Group meeting, found it pretty nice listening to you and Chris speaking on the new features of Denali. Thanks! And yeah, the rounded edges in SSIS look sexy! ;)

     


    Cheers,
    Jason
    P.S. : Please click the 'Mark as Answer' button if a post solves your problem! :)

    Some Random Thoughts

     

    Friday, November 26, 2010 1:22 PM
    Moderator
  • Jason,

    Unfortunately that doesn't work for me. here's what I did:

    1. New report
    2. new boolean parameter called TF
    3. New text box that has:

     

    • Arbitrary text value being displayed
    • Action="Go to report"
    • expression on the 'Specify a report' of '=IIF(Parameters!tf.Value = true,"SomeOtherReport","")'

     

    When the parameter is "true" everything works. When the parameter is "false" the textbox is still "hyperlinked" (if that makes sense) but when I click it I just get an error: "Report / cannot be compiled". Which makes total sense if you think about it. I want the textbox to simply not have be hyperlinked.

    Any other thoughts?

     


    Thanks for the comments on the UG. Always nice to hear stuff like that, believe me.

    @Jamiet


    http://sqlblog.com/blogs/jamie_thomson/ | @jamiet | About me
    Jamie Thomson
    Friday, November 26, 2010 2:27 PM
  • Hi Jamie,

    I am not sure which version you are using buit it works for me in SSRS 2005. The image is given below

    I think I got the issue, you should be entering the condition in Specify a URL and not specify a report. And you should not just pass the report name like SomeOtherReport but the full URL which you get when you deploy it on the web, something like

    http://<servername>/ReportServer/SomeOtherReport&rs:Command=Render

    Let me know if you dont get it still with the SSRS version too (it worked for me till R2 and I can test it at my home laptop till R2, not into Denali yet :( )


    Cheers,
    Jason
    P.S. : Please click the 'Mark as Answer' button if a post solves your problem! :)

    Some Random Thoughts

    Friday, November 26, 2010 2:47 PM
    Moderator
  • Hi Jamie,

    I am not sure which version you are using buit it works for me in SSRS 2005. The image is given below

    I think I got the issue, you should be entering the condition in Specify a URL and not specify a report. And you should not just pass the report name like SomeOtherReport but the full URL which you get when you deploy it on the web, something like

    http://<servername>/ReportServer/SomeOtherReport&rs:Command=Render

    Let me know if you dont get it still with the SSRS version too (it worked for me till R2 and I can test it at my home laptop till R2, not into Denali yet :( )

     

    Hi Jason,

    I'm on SSRS2008.

    I accept that it works for "Specify a URL" but I want it to work for "Specify a report". Hacking together a URL that includes the name of the report server is a right royal PITA and in actual fact won't work for me anyway because I'm intending these reports to be displayed via SSMS - i.e. without a reportserver being involved.  (FYI: Coincidentally, given that you mentioned it, the reports I am working on are the ones I demo'd at the end of my UG session last week).

    Resigning myself to this not working :(

    @Jamiet

     


    http://sqlblog.com/blogs/jamie_thomson/ | @jamiet | About me
    Jamie Thomson
    Friday, November 26, 2010 2:59 PM
  • I should have guessed that you were trying on SSMS especially after seeing your other open thread also - Why no parameters when a report is rendered in SSMS?

    Well, in this case, I dont think you have much option (well, you can always pass the name of the same report as the false condition, which will make sure that the user will go to the next report only if the condition is true, else stays on the same report. But I admit, it will be very annoying and irritating to the user to see something refresh and find himself on the same page).

    In this case, let me remove my comments from the connect page also that you posted.


    Cheers,
    Jason
    P.S. : Please click the 'Mark as Answer' button if a post solves your problem! :)

    Some Random Thoughts

    Friday, November 26, 2010 3:10 PM
    Moderator
  • Hi Jamie,

    I was just trying and I seem to have found something. Use the condn below and see whether it works for u

  • expression on the 'Specify a report' of =IIF(Parameters!tf.Value = true,"SomeOtherReport",0)

    Just put a 0 and it worked for me!!!


  • Cheers,
    Jason
    P.S. : Please click the 'Mark as Answer' button if a post solves your problem! :)

    Some Random Thoughts

Friday, November 26, 2010 3:15 PM
Moderator
  • you can always pass the name of the same report as the false condition, which will make sure that the user will go to the next report only if the condition is true, else stays on the same report. But I admit, it will be very annoying and irritating to the user to see something refresh and find himself on the same page

    Hey, I never thought of that. Right now that seems like my best option.Thanks Jason.

    As an aside, Guarav's tip above works for stand-alone textboxes but not when the textbox is in a datagrid. What I'm doing currently in that case is using a visual cue (i.e. underlining) to indicate whether a textbox is "clickable" or not. Yes, all of the cells are clickable (because of the limitations we've talked about), but only the ones that click to something useful have the underline. Better than nothing.

     

    @jamiet


    http://sqlblog.com/blogs/jamie_thomson/ | @jamiet | About me
    Jamie Thomson
    Friday, November 26, 2010 3:17 PM
  • In this case, let me remove my comments from the connect page also that you posted.

     

    P.S. Comments can't be removed :(
    http://sqlblog.com/blogs/jamie_thomson/ | @jamiet | About me
    Jamie Thomson
    Friday, November 26, 2010 3:18 PM
  • Hi Jamie,

    Just reposting in case you missed the alerts

    I was just trying and I seem to have found something. Use the condn below and see whether it works for u

     

    expression on the 'Specify a report' of =IIF(Parameters!tf.Value = true,"SomeOtherReport",0)

    Just put a 0 and it worked for me!!!


    Cheers,
    Jason
    P.S. : Please click the 'Mark as Answer' button if a post solves your problem! :)

    Some Random Thoughts

    • Marked as answer by Jamie Thomson Friday, November 26, 2010 3:34 PM
    Friday, November 26, 2010 3:30 PM
    Moderator
  • Hi Jamie,

    Just reposting in case you missed the alerts

    I was just trying and I seem to have found something. Use the condn below and see whether it works for u

     

    expression on the 'Specify a report' of =IIF(Parameters!tf.Value = true,"SomeOtherReport",0)

    Just put a 0 and it worked for me!!!

    Blimey, that does work. Awesome. Thanks Jason.

     

    I still say there should be an expression on the Action property though :)


    http://sqlblog.com/blogs/jamie_thomson/ | @jamiet | About me
    Jamie Thomson
    Friday, November 26, 2010 3:34 PM
  • This Works! Thanks!
    Tuesday, July 28, 2015 4:22 AM