|
单据相关信息如何增加JS报表?
SET @module='CustomForm25'; -- 要增加相关信息->报表的模块
SET @tabid=(SELECT tabid FROM ld_tab WHERE `name`=@module);
SET @template='langjie_hawb.mrt'; -- JS报表模板
SET @label='HAWB'; -- 详情界面->相关信息->报表显示的名称
SET @rel_tabid=(SELECT tabid FROM ld_tab WHERE `name`='ReportAnalysis');
SET @relation_id=(SELECT MAX(relation_id) FROM ld_relatedlists);
SET @seq=(SELECT MAX(sequence) FROM ld_relatedlists WHERE tabid=@tabid);
INSERT INTO ld_relatedlists(relation_id,tabid,related_tabid,`name`,sequence,label,presence,actions,type,related_coltable)
SELECT @relation_id+1,@tabid,@rel_tabid,@template,@seq+1,@label,0,'','datacategory_template_js','crmlink' FROM DUAL
WHERE NOT EXISTS (SELECT 1 FROM ld_relatedlists WHERE tabid=@tabid AND `name`=@template);
UPDATE ld_relatedlists_seq SET id=(SELECT MAX(relation_id) FROM ld_relatedlists);
-- 相关信息报表,当前单据ID对应的变量
-- [related_ldcrmid]
|
|