Search code examples
crystal-reports

can split column in table to two fields in crystal report?


I have a columns -checkin check Out- in Attendance table,

I want to split into two fields(check-In , Checkout) and apply different conditions on them.


Solution

  • If i understand you right, just create 2 formulas. Each formula splits the db field and uses the relevant part.

    @Formula1 Split(dbdataField,";")[1] //Do some work with part #1

    @Formula2 Split(dbdataField,";")[2] //Do some work with part #2

    To start it, place the DB field and both formulas side by side on details area until you get it right(editing formulas)...it always helps me to see both original and transformed data side by side.

    Edit: You can have other formulas using the output of these previous two formulas to make further calculations.