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

  • SEARCH
  • Home
  • 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 7814153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:06:30+00:00 2026-06-02T05:06:30+00:00

I am actually creating a crystal reports v12 (2008) report but can’t find the

  • 0

I am actually creating a crystal reports v12 (2008) report but can’t find the method, using Crystal, to extract the following. I thought if someone might answer in SQL language, I could piece it together.

2 Tables: hbmast, ddmast

SELECT hbmast.custno, hbmast.id, ddmast.name, ddmast.status
WHERE hbmast.custno = ddmast.custno
GROUP BY hbmast.id
pseudo code::show all hbmast values that have ddmast.status = '2'

Sample output:

J0001, 111222, PAUL JONES, 1
       111222, PAUL JONES, 2
       111222, PAUL JONES, 1

K0001, 555333, PETER KING, 3
       555333, PETER KING, 1

I would like to have Paul show on the report with all child records but Peter should not be returned on the report since he has no child records with ‘2’ for ddmast.status field.

Thanks for the help

  • 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-06-02T05:06:34+00:00Added an answer on June 2, 2026 at 5:06 am

    The way to achieve this in Crystal would be to have your hb and dd tables then a second alias of the dd table.

    So you would filter your dd alias table where status = 2 then join to your hb table and back to your dd table (not the alias). The SQL would end up looking like:

    select hb.custno, hb.id, dd.name, dd.status from hbmast hb
    inner join ddmast dd on hb.custno = dd.custno
    inner join ddmast dd2 on hb.custno = dd2.custno
    where dd2.status = '2'
    

    Andomar makes a valid point about duplicate records appearing if there is more than 1 record per group with a status of 2. If that is the case you can either group by primary key and show row information at group footer level OR use a sql expression with a subquery in your selection formula instead of the double join method.

    SQL Expression: (select count(*) from ddmast where custno = "hbmast.custno" and status = '2')

    Then record selection expert: {%sqlexpression} > 0

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

Sidebar

Related Questions

Its regarding QTP can we create database checkpoints for Web applications actually while creating
What is actually faster? Simply creating a new ArrayList/ArrayCollection or re-using an existing one
I'm actually creating a web application using PHP and seek help verifying a user.
I've read that using short vs int is actually creating an inefficiency for the
I'm quite familiar with Java as I'm actually creating my own app. But I
I am creating two tables in Visual Web Developer 2010 Express using the following
I'm actually creating websites for fun and some of my friends told me that
Case : I'm creating an application (desktop application) with VB.NET (actually windows form), and
i am creating an application which includes dynamic pages. actually, i created some dynamic
Actually I am working on this for the last 3 or 4 weeks but

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.