Solved

Using quotes in java script to

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

708 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now