Skip to Content
avatar image
Former Member

Crystal report sub query selection statement

I am using Crystal report version 8, I want to use a sub query in existing report DB filed selection something like,

when case (select count(paper) from table B = 0) then "not authorized" else A.paperinfo End.

select expert doesn't allow me to use sub query, since table B is having duplicates I cant use join. I have no other option other than using a sub query in DB field selection.

In version 8, command parameter is not working, It would be great help if you able to provide me some suggestion.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Jul 25, 2017 at 01:44 PM

    In Crystal 8.5 and older, you can edit the query when you view the SQL. However, be aware that reports where you've done this will NOT upgrade to a new version of Crystal. Starting with Crystal 9, you can no longer edit the query that Crystal builds. Instead, you have to create a "Command", which is a SQL select statement, in order to use custom SQL.

    -Dell

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 24, 2017 at 03:09 PM

    I have not sued CR 8 for a long time, but I think you could still go into SHOW SQL and then manually edit it.

    Ian

    Add comment
    10|10000 characters needed characters exceeded