Dynamic Source of diversified data sources in rundry computing reports

Source: Internet
Author: User

Diverse data sources are becoming more and more common in report development. the effective support of the collection and computing reports for diverse data sources makes the development of such reports very simple, currently, in addition to supporting different types of data sources (RDB, TXT text, Excel, JSON, HTTP, hadoop, and MongoDB, you can also dynamically connect different data sources based on actual application situations to develop dynamic data source reports. The following uses a simple example to describe how to use it.

Report description

In an application, you must use parameters to control the data source connected to the Report. When the flag is set to 1, data source 1 (xmos1) is connected; otherwise, data source 2 (xmos2) is connected ), query the order status from the specified year to the present.

In a set computing report, you can use the set computing script to determine parameters to connect different data sources. Then, use the result set returned by the script in the report template, just like using a data source. Follow these steps:

Edit a Report Template

Set Data Source

Create two data sources (xmos1 and xmos2) for report production and preview:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4D/10/wKioL1RKCsTRdj18AACceMjDyOw552.jpg "style =" float: none; "Title =" report5_multisource_dynamic_1.jpg "alt =" wkiol1rkcstrdj18aaccemjdyow552.jpg "/>

Set Report Parameters

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/4D/0F/wKiom1RKCnWRHTLJAACrTn37v1U709.jpg "style =" float: none; "Title =" report5_multisource_dynamic_2.jpg "alt =" wkiom1rkcnwrhtljaacrtn37v1u709.jpg "/>

Set Dataset

Use the report designer to create a report template and a script dataset.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/4D/10/wKioL1RKCsWQQQmHAAEp6kUcBdA790.jpg "style =" float: none; "Title =" report5_multisource_dynamic_3.jpg "alt =" wkiol1rkcswqqqmhaaep6kucbda790.jpg "/>

In A1, the data source to be connected is determined based on the Report parameters. A2 completes Data Query and the results are returned through A4.

 

Set a report expression

Edit the report expression, directly use the result set returned by the Set Computing script, and use a simple list expression to complete report creation.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4D/0F/wKiom1RKCnbC2Mi9AAB-79ZLydY129.jpg "style =" float: none; "Title =" report5_multisource_dynamic_4.jpg "alt =" wKiom1RKCnbC2Mi9AAB-79ZLydY129.jpg "/>


As you can see, you can use a script dataset to complete the dynamic data source connection by simply judging the parameters of the received report, without the need to complete it in a Java program, which is simpler and more straightforward.


This article is from the "high performance report data computing" blog, please be sure to keep this source http://report5.blog.51cto.com/8028595/1567625

Dynamic Source of diversified data sources in rundry computing reports

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.