Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 306299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:27:15+00:00 2026-05-12T07:27:15+00:00

I am trying to create a report in crystal reports 11 based on this

  • 0

I am trying to create a report in crystal reports 11 based on this sql query

SELECT *
    FROM (table) OM, (table) OL, (table) C
    WHERE OM.ORDER = OL.ORDER
    AND OM.COMPANY = C.COMPANY
    AND (EXISTS (SELECT *
            FROM (table) OSD, (table) OSDD
            WHERE OSD.ORDER = OL.ORDER
           
AND OSD.LINE = OL.LINE
            AND OSD.REVISION = OL.REVISION
            AND OSD.DIM = OSDD.DIM
            AND OSDD.SHAPE = OL.SHAPE))

I thought the best way to start was by creating the main report using the first two tables and creating a subreport using the “EXISTS” section of the query and linking back to the main report.

My details section contains both data from the main report and the subreport. I get the correct results back for where the subreport returns a value, but I want to be able to suppress the detail section of the main report if the subreport is null, but I can’t find a way to reference the subreport in any of the selection formulas.

I am open to suggestions if there is a better way to mimic this query as well.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T07:27:15+00:00Added an answer on May 12, 2026 at 7:27 am

    I’m not sure if what type of database you are using, but I believe that you probably can use something like:

    select * --you probably should narrow this down instead of using a *
    from (table) OM
    inner join (table) OL on OM.ORDER = OL.ORDER
    inner join (table) C on OM.COMPANY = C.COMPANY
    inner join (table) OSD on OSD.ORDER = OL.ORDER 
        and OSD.LINE = OL.LINE 
        and OSD.REVISION = OL.REVISION
        and OSD.DIM = OSDD.DIM
    inner join (table) OSDD on OSDD.SHAPE = OL.SHAPE
    

    This is off the top of my head and not tested, but the idea is that it would show all of the records from OM, OL, C, OSD, and OSDD where it found matches. since you are not using a left join on OSD or OSDD you should not have any null rows.

    However you could always change those to left outer joins like:

    select * --you probably should narrow this down instead of using a *
    from (table) OM
    inner join (table) OL on OM.ORDER = OL.ORDER
    inner join (table) C on OM.COMPANY = C.COMPANY
    left outer join (table) OSD on OSD.ORDER = OL.ORDER 
        and OSD.LINE = OL.LINE 
        and OSD.REVISION = OL.REVISION
        and OSD.DIM = OSDD.DIM
    left outer join (table) OSDD on OSDD.SHAPE = OL.SHAPE
    

    This would give you all rows from OM, OL, and C and only the rows from OSD and OSDD where it found a match. Then you have a number of options to suppress the rows you do not wish to see such as using the he suppress formula in the section expert as rexem suggested.

    Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 152k
  • Answers 152k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Use: SELECT item_name, MAX(red) 'red', MAX(blue) 'blue', MAX(green) 'green' FROM… May 12, 2026 at 10:13 am
  • Editorial Team
    Editorial Team added an answer SQLite is inherently a local database system. It is not… May 12, 2026 at 10:13 am
  • Editorial Team
    Editorial Team added an answer You could set the height of the div. May 12, 2026 at 10:13 am

Related Questions

I want to know I can dynamically modify an existing Crystal Report (using C#
I'm trying to export a Crystal Report to a text file, while preserving any
We are developing a multilingual Winforms application using visual studio 2008. I am trying
I am trying to remove all references to a table from a Crystal XI
I am trying to create a report in SSRS2000 that will query an ORACLE

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.