Date Format problem in crystal's ParameterFieldDefinition

J

Jonathan Woods

Hi there,

The following code for Crystal Reprot is OKay under the culture(En-US).

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
crParamDefs=r_GLActivity.DataDefinition.ParameterFields;
myDef=crParamDefs["DateFrom"];
//myDef.ApplyMinMaxValues(frmMain.system.MinDate,frmMain.system.MaxDate);
crParamValues=myDef.CurrentValues;
crParamValues.Add(crParamDiscreteValue);
myDef.ApplyCurrentValues(crParamValues);//<-- Following Err Msg appear
in there
----------------------
When I change some regional options,it behaved strange manner.
----------------------
An unhandled exception of type
'CrystalDecisions.CrystalReports.Engine.ParameterFieldException'
occurred in crystaldecisions.crystalreports.engine.dll
Additional Info:
Invalid parameter value: exceeds the Min or Max
or conflicts with existing value or edit mask
---------------------
I've already tested Parameter Options in rpt file and cultureInfo.
But it does not work
When I trace the date value, there is no different as the value it
works.
Right now! I've no idea how to handle that.

Thanks in advance for kind reponse.
 

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