label、报告中引用其他label

件OOTB的label以及报表模板,在设置时候考虑了后期的扩展,因此在代码中添加了delegate其他查询的功能,其他查询包括sql查询,包括com查询。本文就是基于这个功能进行相关引用其他label的操作简介。

com 引用

首先,我们介绍一下,最直接的COM引用。
在com定制过程中,我们主要的设置如下:
定制PartMaterialGrade的label用于测试,如下:

应用操作如下:

sql引用

直接编辑RQE

      <RETURNED_PROPERTY Name=”materialgrade” SQLType=”BStr”>

         <PATHS>

             <PATH SourceType=”*” SourceBOC=””             DestinationInterface=”CONSTANT” DestinationProperty=”[PartMaterialGrade]” DestinationBOC=”” Concatenate=”No”     PathSeparator=”” />

         </PATHS>

      </RETURNED_PROPERTY>


从上面的内容可以看出,对于com引用其他label,可以按照其固定格式[xxxxx],然后写到rqe文件中即可使用。
同理,sql的rqe中,也可以看到如下内容:

selectPcom.CommodityType_LongValue, 

dbo.REPORTConvertNPD(‘in’,Pcom.PriSizeNPDUnits, Pcom.PrimarySize) AS ‘NPD1’, 

‘in’ AS ‘NPDUnitType1’,

‘Piping’ AS ‘Category’,

NULL AS ‘BoltDiameter’, 

dbo.REPORTConvertNPD(‘in’,Pcom.SecSizeNPDUnits, Pcom.SecondarySize) AS ‘NPD2’, 

‘in’ AS ‘NPDUnitType2’,

‘[Ports]’ AS PortsInfo, 

Mfd.SurfacePreparation_ShortValue,  

Pcom.LiningMaterial_ShortValue,

Pcom.GeometricIndustryStandard_ShortValue as GeomIndStandard_ShortValue, 

mcd.Manufacturer_ShortValue,

Pcom.MaterialsGrade_ShortValue, 

Mfd.MiscRequisitionClassification_ShortValue as MiscReqClassfn_ShortValue 

FROM JPartOcc po

JOIN xmadeFROM rmf ON (po.oid = rmf.oidorigin)

JOIN dbo.JDPipeComponent_CL Pcom ON (pcom.oid = rmf.oiddestination)

JOIN dbo.JUAManufacturerData_CL Mfd ON (Pcom.Oid = Mfd.Oid)

JOIN xpartocctomaterialcontroldata xptmcd on xptmcd.oidorigin = po.oid

JOIN JGenericMaterialControlData_CL mcd on mcd.oid = xptmcd.oiddestination

WHERE po.oid = ?

不论是label还是report,属性的输出都是在rqe文件中进行定义的,修改方式以及语句格式都是一样的,本文不再介绍,可以自行体会。
当然,label的引用,必然会影响到运行效率,尤其是报告,如果报告中引用了sql的label,那么效率将会大大降低。
数字化工程设计公众号二维码
原文链接:查看原文  文章来源:数字化工程设计
🔗 分享 0

上5篇 more...

下5篇 more...