Click here to Skip to main content
16,004,761 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am trying to access a sub report column thru windows forms date time picker thru following statement:

crystalReportViewer1.SelectionFormula = "{Employees.DateOfJoin}>= '" + dtpFrom.Value + "' And {Employees.DateOfJoin}<= '" + dtpTo.Value + "'";

pressing ok prompts me with the following error message:

a date-time is required here.
Posted

I'm going to take a guess here. I'd say a date time is required. What have you done to check that your code is providing valid date times ?
 
Share this answer
 
hi,

try the code as below

crystalReportViewer1.SelectionFormula = "{Employees.DateOfJoin}>= #" + dtpFrom.Value + "# And {Employees.DateOfJoin}<= #" + dtpTo.Value + "#";


please let me know
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900