[{"id":"bcb0874d-299b-448e-9552-9e9b25ef80dd","tags":[{"product":null,"links":null,"id":"ba7e818e-4f6b-4211-b1ac-58e3bafcf439","name":"\u66F4\u65B0","color":"orange","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"8ce3627e-9e58-471b-9133-4f135d191e7b","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"ae60ae59-34f5-4f32-a8eb-243ed1457543","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"3d4848c3-910f-4ffa-9153-60bb507334a9","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"133f4ca6-d951-4d65-a618-3dc6301266f7","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"de62ec1c-813e-40b1-8160-a4cd109afe64","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"2426c71d-8332-4cbd-a436-1ec4f8666464","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"2ce7b6b0-78aa-4e4b-bf8a-e4ba2f988298","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"4706db46-0811-4652-8f59-1e0a1da84758","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"8f1271bb-2cd9-4f39-9897-c15b239ee7ab","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"677e13a7-6f3e-449f-986c-2c3a26f8d54f","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"5e40f6dc-caec-49d7-a1d0-be65f06815ba","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"2457f0e0-9e71-4860-a87d-065e0fb84f84","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"d5c67fd0-1145-482c-9113-97b492c44c18","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"a609a8fa-ab91-4c1d-a1c3-d209d0463303","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]},{"id":"b4a9eb15-94e5-48df-b218-a24138f0cf9c","tags":[{"product":null,"links":null,"id":"adf72f47-7f61-4239-8392-b9bcc127fa80","name":"\u65B0\u589E","color":"green","productId":"0995490e-43fc-4d6e-bc8d-8e66f38b0c63"}]}]
        
(Showing Draft Content)

跳转至报表或仪表板并传递固定参数值

功能概述

我们在报表中设置跳转时,可以直接选择跳转至报表,也即报表钻取行为。

另外,我们也可以通过URL实现报表跳转。将URL设置为一个报表的链接,这样在点击报表元素时即可打开目标文档。此种方式也可用来设置仪表板跳转。

如果目标文档中带有参数,也可以通过URL直接传递参数值。

如下图所示,在跳转的同时进行了报表数据过滤,仅将“ 类别名称 ”为“ 生鲜蔬果 ”的数据显示了出来。

image2020-6-10_14-56-14.png

操作示例

1. 我们继续添加一个文本框来做示例效果。在文本框中输入文本“ 生鲜蔬果销售明细 ”。

image2020-6-10_14-50-22.png

2. 获取目标URL。

(1)在系统门户网站打开目标报表,单击预览区域右上角的新窗口按钮,获取报表URL。

image2020-6-10_14-52-14.png

image

(2)在报表URL后追加参数相关内容。

原目标报表中的参数名称为“ Parameter1 ”,我们要过滤的数据为“ 生鲜蔬果 ”,因此追加内容为 &dp={"Parameter1":["生鲜蔬果"]}。

经过URLEncode编码后为 &dp=%7b%22Parameter1%22%3a%5b%22%e7%94%9f%e9%b2%9c%e8%94%ac%e6%9e%9c%22%5d%7d (网上有在线URL编码工具,例如:http://tool.chinaz.com/tools/urlencode.aspx

加上报表的URL,我们最终得到的带有参数的URL字串为

http://localhost:51980/reports/view/5ca43482f3c9ca00aa08f51d?display=singlepage&theme=default&lng=zh-CN&dp=%7b%22Parameter1%22%3a%5b%22%e7%94%9f%e9%b2%9c%e8%94%ac%e6%9e%9c%22%5d%7d

type=info

提示

有关使用 URL 传递报表参数的详细说明,请参见集成报表

3. 设置跳转。选中文本框组件,在属性设置面板中找到钻取操作选项。将钻取类型设置为跳转至URL;并将 URL 设置为上一步中得到的 URL 字串。

也通过可以单击跳转至URL后的小方块按钮,选择表达式,然后在表达式编辑器中添加URL字串。

image2020-6-10_14-53-29.png


4. 预览报表。可见通过单击“ 生鲜蔬果销售明细 ”直接可以打开对应的报表,且已经进行了数据过滤。

image2020-6-10_14-56-23.png