Skip to Content
author's profile photo Former Member
Former Member

Need help with duplicate records

Hi,

I'm using VS 200 and the bundled CR. Also, I'm using SQL Server 2005 CE v3.5 for a database, which is an ADO.NET DB (can't use stored procedures).

I am selecting records from one table based on criteria from another. Here's the selection forumla I'm using:

{tblVisitDates.PlayerType} IN {?PlayerType}

The problem is that I'm getting back duplicate records in the primary table. I only want to see the record form the primary table once, no matter how many matching records there are in the child table.

I saw several other posts on this subject, but most seem to deal with the full version of CR, or specify a stored procedure as the solution. Is there a way to code the selection formula, or to group out duplicate records, in the report itself to solve this problem?

Thanks in advance!

-Will

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 19, 2008 at 02:31 PM

    Hi Will,

    You can try Below Formula:

    Assume that you are getting duplicate records in detail section then:

    1. Go to u2018Reportu2019 menu option >> Section Expertu2026

    2. Select u2018Detailu2019 section

    3. Click on formula(X-2) for Suppress and Write a formula for all the fields present in the detail section using conjunction u2018andu2019

    For instance,

    {Customer.Country} = Previous({Customer.Country}) and

    {Customer.CustomerID} = Previous({Customer.CustomerID}) and

    :

    :

    4. Click OK

    Regards,

    Alpana

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi, Will,

      You may try my simple way:

      1. For all fields in detail, setup their Format Editors: tick "Suppress if Duplicated".

      2. Click Section Expert, click section Detail, tick "Suppress Blank Section".

      Then your duplicated line will be suppressed.

      But if you have any total value to show, you'll need to use "Running Total Fields" to avoid duplicate summary instead of "Insert Summary" .

      ~Michelle

  • author's profile photo Former Member
    Former Member
    Posted on Sep 19, 2008 at 02:06 PM

    Hi Will

    You can use Distinct function to avoid the duplication of records.

    Distinct function forces the query to retrieve only unique sets of data.

    Hope it resolve your query

    Regards

    Asha.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.