Hi!
I have the following setup:
- Delphi 5 Enterprise Update 1 Crystal
- Reports Developer XI Rel2 (RDC 11.5)
After long hours of trial&error I can now set the logon stuff as asked earlier but when I try to set crystalparameters by code - it does not work and I get an empty report.
I've written a small app for testing (here's just a snippet):
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
Now I've managed to have the CurrentValues set (had to save the report in question with version 11 - it was version 9 before) because IsCurrentValueSet returns True but when I try to read the SQLQuereyString I can see that all SP parameters are NULL. Any Ideas on that?