Skip to Content
avatar image
Former Member

Crystal Reports 2008 combining Command and db together

Hi,

I'm new at Crystal Reports and I need to make a report where I need to combine Command and direct db together.

Can you please tell me how can I do that in SQL query? With INNER JOIN or?

How can I integrate mCallEnd and mOpInterval in the SQL query in Command so I can have all fields and formulas from all 3 tables in Command?

Thank you in advance

problem11.JPG (24.5 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Jan 07, 2015 at 11:13 PM

    Hi,

    You can link the command fields and db fields in the following way:

    Database -> Database Expert -> Link tab -> you can link the fields as you like and also click on link then goto Link options set Inner join. For example:

    Thanks,

    DJ


    Capture.PNG (28.7 kB)
    Add comment
    10|10000 characters needed characters exceeded

    • Never mind, it looks like the fields are already there - look for OpAssigned, OpAnswered and OpAbandoned in the fields being returned from the command.  I assume that total calls will be OpAssigned + OpAnswered + OpAbandoned.

      -Dell

  • May 11, 2015 at 10:01 PM

    See my last response - you should be able to get the data from fields that are already in the Command.

    -Dell

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      thank you for your response. But how can I create a TimeStamp if I don't have that field in the Command (first column) with hourly interval.

      DateTime formula in mCallEnd looks like this:

      dim dDate as datetime

      dDate = DateTimeValue(({@Interval} / 1440) + 1)

      if second(ddate) > 0 then

          ddate = dateadd("s", 1, ddate)

      end if

      formula = ddate

      But @Interval consists of

      (({mCallEnd.Timestamp} \ {?Interval}) * {?Interval}) + {?Interval}

      and I don't know how to create that Timestamp that I don't have?