0

我有一个数据表

model    day    number
GS        1          0
LX        1          0
ES        1          1
GS        2          0
LX        2          0
ES        2          0
GS        3          0
LX        3          1
ES        3          0
          31         0

请帮我创建一个 RTF 模板来显示数据:

Model     1      2     3     4     5     6     7    31     total  
GS        0      0     0     0     0     0     0     0         0
LX        0      0     1     0     0     0     0     0         1  
ES        1      0     0     0     0     0     0     0         0
Total     1      0     0     0     0     0     0     0         1
4

1 回答 1

0

听起来你想要交叉表数据。

Oracle XML Publisher Report Designer's Guide 详细介绍了如何执行此操作:

XML 数据

<ROWSET>
 <RESULTS>
 <INDUSTRY>Motor Vehicle Dealers</INDUSTRY>
 <YEAR>2005</YEAR>
 <QUARTER>Q1</QUARTER>
 <SALES>1000</SALES>
 </RESULTS>
 <RESULTS>
 <INDUSTRY>Motor Vehicle Dealers</INDUSTRY>
 <YEAR>2005</YEAR>
 <QUARTER>Q2</QUARTER>
 <SALES>2000</SALES>
 </RESULTS>
 <RESULTS>
 <INDUSTRY>Motor Vehicle Dealers</INDUSTRY>
 <YEAR>2004</YEAR>
 <QUARTER>Q1</QUARTER>
 <SALES>3000</SALES>
 </RESULTS>
 <RESULTS>
 <INDUSTRY>Motor Vehicle Dealers</INDUSTRY>
 <YEAR>2004</YEAR>
 <QUARTER>Q2</QUARTER>
 <SALES>3000</SALES>
 </RESULTS>
 <RESULTS>
 <INDUSTRY>Motor Vehicle Dealers</INDUSTRY>
 <YEAR>2003</YEAR>
 ...
 </RRESULTS>
 <RESULTS>
 <INDUSTRY>Home Furnishings</INDUSTRY>
 ...
 </RESULTS>
 <RESULTS>
<INDUSTRY>Electronics</INDUSTRY>
...
</RESULTS>
<RESULTS>
<INDUSTRY>Food and Beverage</INDUSTRY>
...
</RESULTS>
</ROWSET>

Word模板详细信息

MS Word 详细信息 1

MS Word 详细信息 2

MS Word 详细信息 3

结果:

结果

于 2016-08-31T19:24:24.083 回答