Solved

Using quotes in java script to

Posted on 2011-09-22
4
244 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Title # Comments Views Activity
Obsolete font tag need to convert to CSS 3 55
Calculating percentage 2 49
Diff of the day 2 43
Save data in two Database, Asp 2 71
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

752 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