我有以下設置:水晶十一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