Syntax Help

  • HI everyone. I need some assistance on how to translate the following Crystal syntax to RS:

    if(Sum ({Table_Timecard.Hours}, {Table_Employee.EmpID})=0)

    then 0 else

    (Sum ({Table_Timecard.Hours}, {Table_Client.PrimaryID}) % Sum ({Table_Timecard.Hours}, {Table_Employee.EmpID}))

    I'm recreating reports from Crystal to RS and this calculation is throwing me off.

    Thanks for the help.

  • I'd be happy to help, but I don't understand the Crystal syntax. Any chance you can just post some sample data and expected results?

    It looks like you were just getting rid of Div/0 errors with the first statement, but were you really taking a mod of the results or does the % operator mean something else in crystal?

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • Suppose the group id for {Table_Employee.EmpID} group is "Group1", and Table_Client.PrimaryID is "Group2". The formula will look like this.

    =IIF(Sum (Fields!Hours.Value, "Group1")=0, 0 (Sum (Fields!Hours.Value, "Group2") % Sum (Fields!Hours.Value, "Group1")))

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply