Crystal Vs Thai Buddish Calender

J

Jonathan Woods

Hi there,

I have been a problem of passing DateTime Parameter value(Thai Buddish
Calender Value) to Crystal Report.


ParameterFieldDefinition myDef;
SCRPrintJob myPrintJob=new SCRPrintJob();
ParameterFieldDefinitions crParamDefs=new
ParameterFieldDefinitions(myPrintJob);
ParameterValues crParamValues=new ParameterValues();
ParameterDiscreteValue crParamDiscreteValue=new
ParameterDiscreteValue();


crParamDiscreteValue.Value=this.AccountDateFrom;//It is a value from DT
picker that displays Buddish Calender Value

crParamDefs=r_GLActivity.DataDefinition.ParameterFields;
myDef=crParamDefs["DateFrom"];
crParamValues=myDef.CurrentValues;
crParamValues.Add(crParamDiscreteValue);
myDef.ApplyCurrentValues(crParamValues);//<-- Following Err Msg appear
in there
----------------------
An unhandled exception of type
'CrystalDecisions.CrystalReports.Engine.ParameterFieldExcept­ion'
occurred in crystaldecisions.crystalreports.engine.dll
Additional Info:
Invalid parameter value: exceeds the Min or Max
or conflicts with existing value or edit mask
 
J

james

There could be several things going on here, but the first thing I see is
that you should remove this line

crParamValues=myDef.CurrentValues;

You do not need to get the reports current values to apply the new ones. In
fact I think that is an error. Try that first and report back

JIM


Hi there,

I have been a problem of passing DateTime Parameter value(Thai Buddish
Calender Value) to Crystal Report.


ParameterFieldDefinition myDef;
SCRPrintJob myPrintJob=new SCRPrintJob();
ParameterFieldDefinitions crParamDefs=new
ParameterFieldDefinitions(myPrintJob);
ParameterValues crParamValues=new ParameterValues();
ParameterDiscreteValue crParamDiscreteValue=new
ParameterDiscreteValue();


crParamDiscreteValue.Value=this.AccountDateFrom;//It is a value from DT
picker that displays Buddish Calender Value

crParamDefs=r_GLActivity.DataDefinition.ParameterFields;
myDef=crParamDefs["DateFrom"];
crParamValues=myDef.CurrentValues;
crParamValues.Add(crParamDiscreteValue);
myDef.ApplyCurrentValues(crParamValues);//<-- Following Err Msg appear
in there
----------------------
An unhandled exception of type
'CrystalDecisions.CrystalReports.Engine.ParameterFieldExcept­ion'
occurred in crystaldecisions.crystalreports.engine.dll
Additional Info:
Invalid parameter value: exceeds the Min or Max
or conflicts with existing value or edit mask
 
J

Jonathan Woods

Thanks for your response.

I've already removed your suggested Line and test it. But, it does not
work same Error as mentioned before.
 
J

james

I think the problem is with DateTime. You probably need to pass a string,
not a DateTime structure. Crystal Reports is expecting a string criteria
like "1/1/2005" etc... Can you as a test simply hard code the value as a
string Date to see if that works ?

JIM
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top