jdallen75
asked on
Embedding Javascript in SSRS
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\Pag es
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
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\Pag
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
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@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
Question is if this makes sense (e.g. exporting the report to PDF???) - but technically it is possible
Mea maxima culpa.
That is a very clever technique indeed. Thank you very much!
That is a very clever technique indeed. Thank you very much!
ASKER
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
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
ASKER
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.