|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册账号
×
(1)自由报表,数据--联查设置中,可以定义联查类。需要实现接口nc.pub.smart.tracedata.TraceDataInterface
@Override
public ITraceDataOperator[] provideTraceDataOperator() {
// 对应产生两个联查按钮:联查账期明细,联查资金明细
return new ITraceDataOperator[]{new LinkZqdataDetailOperator(),new LinkCapitalDetailOperator()};
}
(2):上面对应两个联查按钮。LinkZqdataDetailOperator 需要实现接口:nc.pub.smart.tracedata.ITraceDataOperator 和 nc.pub.smart.tracedata.IBeforeTraceData
(3):联查的上下文数据,1是取当前报表的查询条件,2是,获取当前鼠标所在位置的维度坐标信息。再作为条件传递到联查的明细报表中。如:
//下面获取原有查询条件
SmartContext context = (SmartContext)param.getParam(FreeReportContextKey.KEY_ICONTEXT);
SoCapitalQueryVO condition = (SoCapitalQueryVO) context.getAttribute("LC1"); //这个值在主报表查询时,代码插入的。
SoCapitalQueryVO newCond = (SoCapitalQueryVO) condition.clone();
// 读取当前行的相关值
IRowData rowData = param.getRowData();
String custcode = (String) rowData.getData("custcode");
if (!StringUtil.isEmptyOrNull(custcode)){
CustomerVO[] vos = (CustomerVO[]) HYPubBO_Client.queryByCondition(CustomerVO.class, "dr =0 and code ='" + custcode +"'");
if (vos !=null && vos.length>0){
newCond.setPk_customer("'" +vos[0].getPk_customer() + "'");
}
} //end
//获取钻取参数
public FreeReportDrillParam getReportDrillParam(TraceDataParam traceData) {
FreeReportDrillParam drillParam = new FreeReportDrillParam();
drillParam
.setTraceDatas(new SimpleRowDataParam[] { new SimpleRowDataParam(
traceData) });
drillParam.setDrillRule(new ReportDrillInfo());
IQueryCondition queryCondition = (IQueryCondition) traceData
.getParam(FreeReportContextKey.KEY_IQUERYCONDITION);
drillParam.setSrcCondition(queryCondition);
return drillParam;
}
//准备参数,并弹出新的联查报表
FreeReportDrillParam drillParam = getReportDrillParam(param);
drillParam.getDrillContext().setAttribute(FreePrivateContextKey.KEY_MAINORG_ORG, newCond);
FreeReportFuncletUtil.showReportInFrame("1001ZX100000000GFY6S", drillParam);
//注:工品账期逾期明细 中该号 对应 iufo_freereport.id
|
|