Passing two parameters in SSRS report to get pop up window - error.

Jeff S
Jeff S used Ask the Experts™
on
I am trying to pass two parameters through my report to get a report window to pop up. I am getting the following error and cannot see my issue. Perhaps tired eyes and could use a hand.

Name 'PATIENTVISITID' is not declared.

="javascript:void window.open(" &"'"& Globals!ReportServerUrl &"/Pages/ReportViewer.aspx?"

&"/Billing Reports/Jeffs/Testing Folder/Sub_rdl_Detail_QuestionAnswerChecklist&rc:Parameters=False&rc:Toolbar=False
&PATIENTPROFILEID="& Fields!PatientProfileId.Value & PATIENTVISITID="& Fields!PatientVisitId.Value &"
','DetailsWindow','left=300,top=180,width=850,height=365,status=no,menubar=no,scrollbars=yes,location=no'" & ")"

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Pawan KumarDatabase Expert
Awarded 2016
Top Expert 2016

Commented:
Is there a double quote (and an ampersand to mark the beginning of another parameter) required here?

& Fields!PatientProfileId.Value & "&PATIENTVISITID=

Open in new window

I never used SSRS this way, so I don't know, but is use of rc:Parameters=False correct?

If possible, could you not put the whole string in browser window, experiment till it works, copy and paste the string in a text editor and then just encapsulate whole string in double quotes and replace parameters.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

HainKurtSr. System Analyst

Commented:
try this

="javascript:void window.open('" & Globals!ReportServerUrl & "/Pages/ReportViewer.aspx?/Billing Reports/Jeffs/Testing Folder/Sub_rdl_Detail_QuestionAnswerChecklist&rc:Parameters=False&rc:Toolbar=False&PATIENTPROFILEID=" & Fields!PatientProfileId.Value & "&PATIENTVISITID=" & Fields!PatientVisitId.Value & "','DetailsWindow','left=300,top=180,width=850,height=365,status=no,menubar=no,scrollbars=yes,location=no')"

Open in new window

Ryan ChongSoftware Team Lead

Commented:
Name 'PATIENTVISITID' is not declared.

make sure "PatientVisitId" exists in the data source? >> Fields!PatientVisitId.Value

which mean Fields!PatientVisitId must be referred to a valid field.
Technology Development Consultant
Commented:
Hi Jeff,

The query string is perfect. not finding any issue.

Please make sure about Report parameters. Report parameters are case-sensitive.

Please refer this url:
https://docs.microsoft.com/en-us/sql/reporting-services/pass-a-report-parameter-within-a-url

Author

Commented:
Thanks!!
HainKurtSr. System Analyst

Commented:
I dont think your initial query was "perfect"
can you please post the running code...

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial