且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

缺少参数时在Crystal报表中引发错误

更新时间:2023-11-10 20:31:34

我不知道如何以编程方式实现它,但是如果您这样看.

将默认值设置为报表中的参数(我认为您可以做到).
因此,每次运行此报告时,都要放置一个条件,并将参数值与报告中的默认参数进行比较.

在这里,您将知道在打印报告之前是否甚至传递了任何参数.

如果条件失败,请不要打印报告,否则继续.

希望这能给您一些指导,不要误导您.

谢谢
马兹
I dont know how you would achieve it programmitically, but if you think it this way.

Set a default value to the parameter in the report (i think you can do that).
So every time this report runs, put a condition and compare the value of your parameter with the default parameter in the report.

This is where you will know if at all any parameter is even getting passed before the report prints.

If condition fails, dont print the report, else carry on.

Hope this gives some direction and not misdirect you.

Thanks
Maz