Skip to Content
avatar image
Former Member

SelectionFormula in crystal report

Hi,

I am using SelectionFormula to filter data in crystal report.

I have a date field which returns value from DB in the format 'yyyy-MM-dd'. But in crystal report, formatting is done to the format 'dd/MM/yyyy'.

On applying SelectionFormula, data is not getting retrieved in both formats.

Can anyone pls help me for the same.

Thanks in advance.

--

Archana.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Apr 06, 2016 at 05:59 AM

    Hi Archana,

    You need to make the format of both the fields same Please convert the field with definition below.

    Cdate(Totext({DateField},'yyyy/MM/dd'))

    Regards

    Niraj

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      I am binding data dynamically in crystal report. Based on the data type of the columns retrieved from DB, front end formatting is done in CR. That is working fine.

      My problem is with applying SelectionFormula, which am performing through C# code to filter data in crystal report.

      Ex: CrViewer.SelectionFormula = "{Customer.Column1} = '2016-04-06'";

      --

      Archana.