locked
pass multiple parameters in URL RRS feed

  • Question

  • Hi all,

    I want to open my drill through report in new window.

    for that i found a javascript like ..

    ="javascript:void(window.open('http://Server%2freportserver?%2fReport_Project%2fFolder%2fReportname&rs:Command=Render&DateFrom="+Fields!Exec_Date.Value+"&DateTo="+Fields!Exec_Date.Value+"&Dept="+Parameters!Dept.Value+"'))" 


    here i have 3 parameters in report ..

    report opens fine without parameters but not with paramaters . is there any mistake in code??

    please write the correct one..

    and i am getting server login authentication when report opens in new window how to stop prompting it for end users ??


    Dilip Patil..

    Thursday, January 22, 2015 8:24 AM

Answers

  • Do you have access to run the report on the report server to get the error? Or can the server owner look in the event logs for a corresponding error? I wonder if the "/" characters in the dates are being misinterpreted in the url. What version of SSRS are you using? If it is 2008 R2, your date syntax is wrong (https://msdn.microsoft.com/en-us/library/ms159825(v=sql.105).aspx)
    "DateTime parameters must be specified with the format YYYY-MM-DDTHH:MM:SS, which is based on the International Organization for Standardization (ISO) 8601 standard.".

    If that doesn't work, I think what I would do is start where you are in the screenshot and start tweaking things. Make sure the report runs when you open it without passing parameters (You said it does). Then try passing only the Dept parameter. Tweak until that works then try one of the dates. Rinse and repeat. Once you have a good URL, reproduce it in your expression.


    "You will find a fortune, though it will not be the one you seek." - Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

    Friday, January 23, 2015 2:50 PM
  • Hi Dilip,

    According to your description, you want to prevent credential entry from popping up when opening a report in a new window.

    In Reposting Service, RSWindowsNegotiate is added to the RSReportServer.config file by default. Negotiate specifies report server can either accept Kerberos or NTLM authentication tokens. In this scenario, the issue could be caused by Kerberos authentication. If there is a mismatch between the destination specified in the token and the report server process configuration, the underlying Kerberos authentication scheme supported by Windows will prevent report server from authenticating the user. So please refer to methods below to fix the issue:

    • Remove RSWindowsNegotiate and ensure RSWindowsNTLM is specified in the Reporting Services configuration file (in SSRS 2012, this file locates at xx:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer\rsreportserver.config). 
    • Change the report server service account to Network Service.
    • Configure a specific hostheader for SSRS, configure your DNS server to understand that hostheader, and configure your domain controller to have an SPN for the hostheader and the report server service account.

    For detail information, please refer to this article: Solving the Reporting Services Login issue in the February CTP of SQL Server 2008.

    Reference:
    Authentication with the Report Server

    If you have any question, please feel free to ask.

    Best regards,
    Qiuyun Yu


    Qiuyun Yu
    TechNet Community Support




    Monday, January 26, 2015 8:10 AM

All replies

  • Try adding one semicolon at the end of the javascript. i.e

    ="javascript:void(window.open('http://Server%2freportserver?%2fReport_Project%2fFolder%2fReportname&rs:Command=Render&DateFrom="+Fields!Exec_Date.Value+"&DateTo="+Fields!Exec_Date.Value+"&Dept="+Parameters!Dept.Value+"'));"

    Regarding login authentication please refer below link,

    http://stackoverflow.com/questions/16306299/how-to-stop-ssrs-report-url-asking-for-cedentials


    Regards, RSingh

    Thursday, January 22, 2015 2:36 PM
  • I suspect the issue is with the parameter data types. You are generating a string for the url to be opened by window.open but 2 of your values are datetime. The 3rd may be something other than text as well. Try wrapping those in CStr():

    ="javascript:void(window.open('http://Server%2freportserver?%2fReport_Project%2fFolder%2fReportname&rs:Command=Render&DateFrom="+CStr(Fields!Exec_Date.Value)+"&DateTo="+CStr(Fields!Exec_Date.Value)+"&Dept="+CStr(Parameters!Dept.Value)+"'))"

    If Dept parameter is text then you do not need to put CStr() around it. 


    "You will find a fortune, though it will not be the one you seek." - Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.


    Thursday, January 22, 2015 10:45 PM
  • Thanks Rajen and Tim.

    I put the semicolon at the end as Rajen says but still no change 

    and @Tim Dept is passing a string i also used cstr but still erroring ..

    find the screen shot

    See the URL.. Is parameters passing wrongly?


    Dilip Patil..

    Friday, January 23, 2015 4:58 AM
  • Do you have access to run the report on the report server to get the error? Or can the server owner look in the event logs for a corresponding error? I wonder if the "/" characters in the dates are being misinterpreted in the url. What version of SSRS are you using? If it is 2008 R2, your date syntax is wrong (https://msdn.microsoft.com/en-us/library/ms159825(v=sql.105).aspx)
    "DateTime parameters must be specified with the format YYYY-MM-DDTHH:MM:SS, which is based on the International Organization for Standardization (ISO) 8601 standard.".

    If that doesn't work, I think what I would do is start where you are in the screenshot and start tweaking things. Make sure the report runs when you open it without passing parameters (You said it does). Then try passing only the Dept parameter. Tweak until that works then try one of the dates. Rinse and repeat. Once you have a good URL, reproduce it in your expression.


    "You will find a fortune, though it will not be the one you seek." - Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

    Friday, January 23, 2015 2:50 PM
  • Thanks TIM 

    it works i just format the date and it renders successfully..

    one thing is remains only when i open report from application it ask for server credential when click on count (where script used to open drill through report) 

    how to stop promting ?



    Dilip Patil..

    Saturday, January 24, 2015 12:37 PM
  • Hi Dilip,

    According to your description, you want to prevent credential entry from popping up when opening a report in a new window.

    In Reposting Service, RSWindowsNegotiate is added to the RSReportServer.config file by default. Negotiate specifies report server can either accept Kerberos or NTLM authentication tokens. In this scenario, the issue could be caused by Kerberos authentication. If there is a mismatch between the destination specified in the token and the report server process configuration, the underlying Kerberos authentication scheme supported by Windows will prevent report server from authenticating the user. So please refer to methods below to fix the issue:

    • Remove RSWindowsNegotiate and ensure RSWindowsNTLM is specified in the Reporting Services configuration file (in SSRS 2012, this file locates at xx:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer\rsreportserver.config). 
    • Change the report server service account to Network Service.
    • Configure a specific hostheader for SSRS, configure your DNS server to understand that hostheader, and configure your domain controller to have an SPN for the hostheader and the report server service account.

    For detail information, please refer to this article: Solving the Reporting Services Login issue in the February CTP of SQL Server 2008.

    Reference:
    Authentication with the Report Server

    If you have any question, please feel free to ask.

    Best regards,
    Qiuyun Yu


    Qiuyun Yu
    TechNet Community Support




    Monday, January 26, 2015 8:10 AM