Using quotes in java script to

I am attempting to open a sub-report by sending parameters from the parent report.  I am using a count parameter to determine if the user selected "Select All".  If they did I want to send an empty string to the stored procedure instead of a long list.

I thought using single quotes for starting and ending the string, leaving double quotes for the HTML would work.  

The build error is [BC30205] End of statement expected
="javascript:void(window.open('http://qbsrs.intel.com/ReportServer/Pages/ReportViewer.aspx?%2fQMM%2fReport_detail&rs:Command=Render
IIF(Parameters!Division.Count = Parameters!CountDivision ,"", '&Division="+Join(Parameters!Division.Value,"&Division=")+"')
&IssueSource="+Join(Parameters!IssueSource.Value,"&IssueSource=")+"
IIF(Parameters!Family.Count = Parameters!Family ,"",'&Family="+Join(Parameters!Family.Value,"&Family=")+" ')
&Site="+Join(Parameters!QSCSite.Value,"&Site=")+"
&year_month_nbr="+Fields!year_month_nbr.Value+"
'))"

Open in new window

tipvernoniaAsked:
Who is Participating?
 
GreggConnect With a Mentor Commented:
I see that error when i forget to terminate the statement with a semi colon. Try adding one at the end of the statement. For ex: ln line 7 above : '));"
0
 
GreggCommented:
Also, you are correct with "using single quotes for starting and ending the string, leaving double quotes for the HTML". Javascript uses both single and dbl quotes for string declarations for easy nesting.
0
 
tipvernoniaAuthor Commented:
Thank you, I took a second look,.  I actually had and extra ) at the end.  I would not have seen it without your suggestion.  Little thing like this just drive you nuts.

Thank you for the quick response.  Enjoy the points.
0
 
GreggCommented:
Thank you, Im glad you saw the error. Good catch!
0
All Courses

From novice to tech pro — start learning today.