我有以下设置:水晶十一REL2 RDC参数传递
- 德尔福5企业更新1水晶
- Reports开发XI REL2(RDC 11.5)
长时间审讯&后错误我现在可以设置登录的东西为asked earlier,但是当我尝试通过代码设置crystalparameters - 它不起作用,我得到一个空的报告。
我写了一个小的应用程序进行测试(这里只是一个片段):
for i:=1 to FParamFldDefs.Count do begin
FParFldDef := FParamFldDefs.Item[i];
FParFldDef.ClearCurrentValueAndRange;
if ParFieldName = 'User' then
FParFldDef.AddCurrentValue('hugo')
else if ParFieldName = '@P_Date' then
FParFldDef.AddCurrentValue('2009.06.30')
if FParFldDef.IsDefaultValueSet then
ShowMessage('DefaultValue: ' + FparFldDef.GetNthDefaultValue(1));
//--> on loop 1 i=1 this does not show up because IsDefalutValueSet = FALSE
//--> on lopp 2 i=2 this does show '2009.06.30'
if FParFldDef.IsCurrentValueSet then
ShowMessage('CurrentValue: ' + FparFldDef.GetNthCurrentValue(1));
//--> on loop 1 i=1 this does show 'hugo'
//--> on lopp 2 i=2 this does not show because IsCurrentValueSet = False
end;
ShowMessage(FldDef.SQLQueryString); //this shows all
//stored procedure parameters empty
现在,我已经成功地设置了CurrentValues(必须保存有问题的报告与11版 - 它之前是版本9),因为IsCurrentValueSet返回True,但是当我尝试读取SQLQuereyString时,我可以看到所有SP参数都是NULL。对此有何看法?
喜! dateformat必须正确,因为它与我将其输入到晶体参数对话框时相同。 现在我已设法设置“CurrentValue”,因为FparFldDef.GetNthCurrentValue(1)确实显示,但仍然报告返回空。 – pastacool 2009-07-02 15:48:23