Running a report through X3 off a SQL query

SUGGESTED

I wrote a SQL query to calculate our Broker commissions.  When I try to run the report through X3, I get the below error.  Can I not use a query in a report run through X3?

  • 0
    Hi Angela,

    I assume you mean that you've written an SQL view and have included that in the report.

    One reason it may not be able to find the table is that Crystal Reports can save different database connection details for each table/view in a report, and I've found that running such reports through X3 won't set the folder connection details properly for any tables or views whose connection details differ from that of the main report.

    Open the Crystal report again and go to Database -> Set Datasource Location. It can be a long process depending on how many tables and views the report uses, but check the connection details for every table/view in the main report and subreports, and verify that they are the same as the main report. If not, you'll need to set them to be the same using the 'Replace with' window in the bottom half of the screen. Once these are all set the same, run the report again through X3. Hopefully this solves the problem.

    Cheers,
    Ben.
  • 0 in reply to bbarnes
    SUGGESTED
    Angela,
    If the report runs fine on the development computer, you may need to verify your server has the same data sources as the computer or laptop that was used to create the new report. Looking at the error message, I believe the report was created with one data source and the server does not have that data source setup. To verify, you can go under Administrative Tools - ODBC Data Sources and compare as Ben said.
  • 0 in reply to bbarnes
    One more thing I thought of while my mind was doing its usual wandering thing - if by 'SQL query', you mean 'SQL command' that you define wholly within the Crystal report - I've tried this with X3 and it has never worked. Something about the way X3 calls the Crystal API means that the data source for the command is never set properly. It works if running the report within Crystal, but not running within X3.