Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Crystal reports crystal报告:打印丢失的记录_Crystal Reports - Fatal编程技术网

Crystal reports crystal报告:打印丢失的记录

Crystal reports crystal报告:打印丢失的记录,crystal-reports,Crystal Reports,我想打印crystal report中丢失的记录。 我在报告中使用了以下公式,我已将此公式放在详细信息b部分。 详细信息具有正常的报告字段 公式: local numbervar firstemp; // first Emp# local numbervar nextemp; // next Emp# local numbervar diff; // difference between firstemp and nextemp local numbervar increase; //

我想打印crystal report中丢失的记录。 我在报告中使用了以下公式,我已将此公式放在详细信息b部分。 详细信息具有正常的报告字段

公式:

local numbervar firstemp; // first Emp#
local numbervar nextemp;  // next Emp#
local numbervar diff;     // difference between firstemp and nextemp
local numbervar increase; // increment for missing Emp#'s
local numbervar result;
increase := 0;
firstemp := tonumber({getRptSalesSummery;1.Bill_Id});  
nextemp := tonumber(next({getRptSalesSummery;1.Bill_Id}));
nextemp := nextemp -1;
diff := nextemp - firstemp;
if nextemp = firstemp
then ""
else (
while diff >= 1 
do (
diff := diff - 1;
increase := increase + 1;
result := firstemp + increase;

exit while;
);
totext (result,"0000") & chr(13);
)
这个公式没有给我范围。 例如,如果在报告中有1到10的范围,并且6,7,8,9缺少记录,那么如果我在报告中检查其打印的1到5和6缺少,那么直接打印10,但它没有给我7,8,9


基本上我需要丢失记录的范围

嗨,它已经起作用了…我已经更改了公式..这是我在公式中所做的更改,它给了我丢失记录的范围..谢谢如果nextemp=firstemp然后是“”,否则如果diff>=1 do(diff:=diff-1;increase:=increase+1;result:=firstemp+increase;temp:=temp&totext(结果,“0”)和“无账单”&chr(13);//退出while;;//totext(结果“”;临时;)