Skip to Content

Add Command when selecting data tables

I've been playing with the Add Command option that allows you to enter an SQL statement to select data for the report. I was wondering what people use this type of command for? I've used Crystal over 10 years but while I've been using Crystal XI for only about 3 years, I have never used this option.

So what advantages does it have over the graphically selection and linking of data tables?

What types of reporting is usually done with them?

TIA, rasinc

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jun 28, 2010 at 06:25 PM

    You have to know your database well and have fairly good SQL skills, but I've found that there are things I can't do directly in Crystal that I can do when I use a command as the data source. A couple of examples are:

    1. When I want to use cross-server joins (MS SQL) or dbLinks (Oracle) to get data from a second (or third!) database, this is the only way to do it short of using a stored procedure, which has it's own issues.

    2. When I want to do something complex in the SQL, such as using a set of selects with Unions to "pivot" data without using a cross-tab.

    Also, Crystal doesn't always create the most efficient SQL so if I'm having problems with query performance in a report, I'll re-write it using a command so that I can tweak the performance.

    -Dell

    Add comment
    10|10000 characters needed characters exceeded