Solved

Using quotes in java script to

Posted on 2011-09-22
4
245 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

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

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

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
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…

631 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