简体   繁体   English

如何下载报表中的按钮?

[英]how I download button in report?

I want to make a report in cognos.I put chart in my report. 我想在cognos中创建报告。我在报告中添加了图表。 And when I run the report , if I right click on chart I see the download chart option. 运行报表时,如果右键单击图表,则会看到“下载图表”选项。 I want to this option(download chart) on my report. 我想在报告中使用此选项(下载图表)。 I mean I dont want to need right click on chart.I want to see a button which when I click on it I download the chart. 我的意思是我不需要右键单击图表。我想看到一个按钮,单击该按钮可以下载图表。 Thanks. 谢谢。

There isn't a built-in button within report studio for this. 在报表工作室中没有为此内置的按钮。 You will need to insert a button in an html item, if your consumers are running IE you can use 您需要在html项中插入一个按钮,如果您的使用者正在运行IE,则可以使用

 document.execCommand('SaveAs','true','http://chartsfilename.jpg')

as the javascript for it to run. 作为运行它的JavaScript。 You will also need a way to dynamically derive the chart's url. 您还需要一种动态导出图表网址的方法。 I would imagine you'll need some javascript for this, without having an environment to test on currently I would point you to http://www.ironsidegroup.com/2011/09/27/ibm-cognos-and-javascript-%E2%80%93-part-ii/ 我想您会为此需要一些javascript,而目前没有可以测试的环境,所以我会指向您http://www.ironsidegroup.com/2011/09/27/ibm-cognos-and-javascript-% E2%80%93-part-ii /

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM