Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Embedding Javascript in SSRS

Posted on 2013-12-03
6
Medium Priority
?
4,037 Views
Last Modified: 2013-12-04
This may be a real stretch, but I've been asked to look into it...

I've found a website which has some pretty neat visualization tools using javascript. If we take the most basic sample, what I'd like to know is if there's anyway to use this to visualize a dataset within SSRS 2008 R2. It looks if anything like one would:

1. Create a .js file with the init() function as shown in the above link
2. Put this .js file into ...Reporting Services\ReportManager\Pages

Here's where I'm lost...

3. Go into Report -> Report Properties -> Code, and call the function in the .js file, but using what custom code? Do I need to include any references?
4. What object would I drop into the report to render this chart, and where do I set the Code.Init() call?

For now, I'm just trying to reproduce the chart with the static data in the javascript function. Next step would be to bind it to an SSRS dataset, but again how?

Any assistance is appreciated,
Jeff
0
Comment
Question by:jdallen75
[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
  • 2
  • 2
  • 2
6 Comments
 
LVL 22

Expert Comment

by:Nico Bontenbal
ID: 39695101
The only html SSRS supports is markup of text in report fields. But this html is very limited (just bold, italic and a few other things). For sure not JavaScript. You need to use something else to create these reports.
0
 
LVL 44

Accepted Solution

by:
Rainer Jeschor earned 2000 total points
ID: 39695109
Hi Jeff,

sorry I have not done this before, but the following link embeds HighCharts.js:
http://thinknook.com/running-highcharts-within-ssrs-or-any-js-graph-library-2013-01-22/

The question is, do you really want the script inside of your report OR do you want a the Javascript just consume the data from a report -> inside the above link the author references another blog entry of him where he shows how to use a "normal" page with Javascript consuming report data as Xml !!!)

HTH
Rainer
0
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 39695112
@Nicobo: sorry but in this case you are wrong: you can inject Javascript into SSRS reports

Question is if this makes sense (e.g. exporting the report to PDF???) - but technically it is possible
0
Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
LVL 22

Expert Comment

by:Nico Bontenbal
ID: 39695154
Mea maxima culpa.
That is a very clever technique indeed. Thank you very much!
0
 

Author Closing Comment

by:jdallen75
ID: 39696510
Rainer,

Thanks for this valuable link. It's gotten me basically up to an past step "4" in my question. The only thing I can't envision right now is how to - instead of the static dataset that is embedded in the show_chart function - use an SSRS dataset to populate the chart. I've asked the author this question as well through that link.

Thanks,
Jeff
0
 

Author Comment

by:jdallen75
ID: 39696532
Rainer, to answer your other question, the goal here is to stay within the SSRS container - downstream, we already have (I think) a Visual Studio project/webpage 'wrapping' around SSRS.
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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
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…

719 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