润乾集算报表通过API修改单元格属性
来源:互联网 发布:ubuntu部署openstack 编辑:程序博客网 时间:2024/06/03 17:12
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//设定边框
for
(int i = 2; i <=3; i++) {
for
(int j = 1; j <=6; j++) {
rd.setBBColor(i,(short)j, -6710887);
//设定下边框线色
rd.setBBStyle(i,(short)j, INormalCell.LINE_SOLID);
//设定下边框类型
rd.setBBWidth(i,(short)j, (float)0.75);
//设定下边框线粗
//左边框
rd.setLBColor(i,(short)j, -6710887);
rd.setLBStyle(i,(short)j, INormalCell.LINE_SOLID);
rd.setLBWidth(i,(short)j, (float)0.75);
//右边框
rd.setRBColor(i,(short)j, -6710887);
rd.setRBStyle(i,(short)j, INormalCell.LINE_SOLID);
rd.setRBWidth(i,(short)j, (float)0.75);
//上边框
rd.setTBColor(i,(short)j, -6710887);
rd.setTBStyle(i,(short)j, INormalCell.LINE_SOLID);
rd.setTBWidth(i,(short)j, (float)0.75);
}
}
//设置单元格值、字体、字号、颜色、对齐等
INormalCell inc = rd.getCell(1, (short) 1);
inc.setValue(
"订单信息表"
);
//设置单元格值
inc.setFontName(
"宋体"
);
//设置字体
inc.setFontSize((short) 20);
//设置字号
inc.setForeColor(-16777216);
//设置前景色
inc.setHAlign(INormalCell.VALIGN_MIDDLE);
//设置横向对齐方式
inc.setHAlign(INormalCell.HALIGN_CENTER);
//设置纵向对齐方式
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<%@page import=
"com.raqsoft.report.usermodel.INormalCell"
%>
<%@ page contentType=
"text/html;charset=GBK"
%>
<%@ taglib uri=
"/WEB-INF/raqsoftReport.tld"
prefix=
"report"
%>
<%@ page import=
"java.io.*"
%>
<%@ page import=
"java.util.*"
%>
<%@ page import=
"com.raqsoft.report.usermodel.Context"
%>
<%@ page import=
"com.raqsoft.report.model.ReportDefine"
%>
<%@ page import=
"com.raqsoft.report.util.ReportUtils"
%>
<%@page import=
"com.raqsoft.report.usermodel.INormalCell"
%>
<html>
<link type=
"text/css"
href=
"css/style.css"
rel=
"stylesheet"
/>
<body topmargin=0 leftmargin=0 rightmargin=0 bottomMargin=0>
<%
request.setCharacterEncoding(
"GBK"
);
String reportPath = request.getRealPath(
"/WEB-INF/reportFiles/ccp.rpx"
);
ReportDefine rd = (ReportDefine) ReportUtils.read(reportPath);
//设定边框
for
(int i = 2; i <=3; i++) {
for
(int j = 1; j <=6; j++) {
rd.setBBColor(i,(short)j, -6710887);
//设定下边框线色
rd.setBBStyle(i,(short)j, INormalCell.LINE_SOLID);
//设定下边框类型
rd.setBBWidth(i,(short)j, (float)0.75);
//设定下边框线粗
//左边框
rd.setLBColor(i,(short)j, -6710887);
rd.setLBStyle(i,(short)j, INormalCell.LINE_SOLID);
rd.setLBWidth(i,(short)j, (float)0.75);
//右边框
rd.setRBColor(i,(short)j, -6710887);
rd.setRBStyle(i,(short)j, INormalCell.LINE_SOLID);
rd.setRBWidth(i,(short)j, (float)0.75);
//上边框
rd.setTBColor(i,(short)j, -6710887);
rd.setTBStyle(i,(short)j, INormalCell.LINE_SOLID);
rd.setTBWidth(i,(short)j, (float)0.75);
}
}
//设置单元格值、字体、字号、颜色、对齐等
INormalCell inc = rd.getCell(1, (short) 1);
inc.setValue(
"订单信息表"
);
//设置单元格值
inc.setFontName(
"宋体"
);
//设置字体
inc.setFontSize((short) 20);
//设置字号
inc.setForeColor(-16777216);
//设置前景色
inc.setHAlign(INormalCell.VALIGN_MIDDLE);
//设置横向对齐方式
inc.setHAlign(INormalCell.HALIGN_CENTER);
//设置纵向对齐方式
request.setAttribute(
"reportDefine"
,rd);
%>
<jsp:include page=
"toolbar.jsp"
flush=
"false"
/>
<table id=
"rpt"
align=
"center"
width=100% height=100%>
<tr>
<td align=center valign=top height=100%>
<report:html name=
"report1"
funcBarLocation=
""
srcType=
"defineBean"
beanName=
"reportDefine"
exceptionPage=
"/reportJsp/jsp/myError.jsp"
/></td>
</tr>
</table>
</body>
</html>
0 0
- 润乾集算报表通过API修改单元格属性
- 皕杰报表的“单元格属性”
- 如何通过JavaScript函数获取Web报表单元格的值
- 如何通过JavaScript函数获取Web报表单元格的值
- API修改润乾报表sql
- 润乾报表v4-API修改报表数据源
- 通过property修改usb属性
- 报表单元格图片构件
- 报表单元格的合并
- 通过API调用文件的属性对话框
- 通过api查看android控件属性
- 润乾报表怎样用api实现合并单元格和设置对齐方式
- 通过润乾的api创建报表文件
- Birt应用---总结通过API来生成报表数据文件
- 通过修改代码挂接API
- jdk api 获取属性修改通知
- SOLIDWORDS API修改零部件属性全部保存
- 通过js修改html的标签属性
- Java中ServerSocket源码
- PHP开发小技巧⑥—判断是否是移动端访问
- 伯克利大学“机器学习(Practical Machine Learning)"课件及相关资料
- MyEclipse Servers视窗出现“Could not create the view: An unexpected exception was thrown”错误解决办法
- php常见的sql语句
- 润乾集算报表通过API修改单元格属性
- 一个读取INI配置文件的类
- Hbase概述
- 1031: Mincost
- vmscan.c
- 属于自己的《程序员的自我修养》之编译和链接
- sap-mm模块核心表清单
- Web简易学生学生管理系统V_2.0
- spring之autowired