Solved

Using quotes in java script to

Posted on 2011-09-22
4
243 Views
Last Modified: 2012-05-12
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

0
Comment
Question by:tipvernonia
  • 3
4 Comments
 
LVL 10

Accepted Solution

by:
Gregg earned 500 total points
ID: 36580627
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
 
LVL 10

Expert Comment

by:Gregg
ID: 36580687
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
 

Author Closing Comment

by:tipvernonia
ID: 36580933
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
 
LVL 10

Expert Comment

by:Gregg
ID: 36580980
Thank you, Im glad you saw the error. Good catch!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question