简体   繁体   English

sql:如何在pentaho报表设计器中从字段拆分数据

[英]sql : how to split data from field in pentaho report designer

In database say I have a product named X. This product have a category. 在数据库中说我有一个名为X的产品。该产品有一个类别。
I am trying to split data from field name 'Category'. 我正在尝试从字段名称“ Category”中拆分数据。

for example 例如
Product : X 产品:X
Category : AA,BB,CC,DD 类别:AA,BB,CC,DD

product and category located in different object. 产品和类别位于不同的对象中。
the result that I want is like this : 我想要的结果是这样的:

in report 在报告中

how to get the value of the field one by one and store it to each column of that category of the product? 如何一一获取字段的值并将其存储到该产品类别的每一列?

You can do it in the sql query itself ( depends on an rdbms you are using ). 您可以在sql查询本身中完成此操作(取决于您使用的rdbms)。 Also you can try report scripting (js or groovy). 您也可以尝试使用报告脚本(js或groovy)。

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

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