Search code examples
c#asp.netsql-servercrystal-reportscrystal-reports-2010

Crystal Report and ASP.NET - Make Repeating Values Supressed to One


I am using ASP.Net c# in my application. In reporting, Crystal Report is used to produce the Yearly Sales of tenants. In my database (SQL Stored Procedure), The below table representation is produced.

Tenant      Year    Sales
Strarbucks  2010    1000
Strarbucks  2011    2000
Strarbucks  2013    3000
Strarbucks  2014    4000
Strarbucks  2015    5000

What I want or desired output in Crystal Report is for the Repeating Tenant Name to be compressed as one like this

Tenant      Year    Sales
Strarbucks  2010    1000
            2011    2000
            2013    3000
            2014    4000
            2015    5000

What I have done initially is to have a Group by Tenant, But it is resulting to this:

Strarbucks  
2010    1000
2011    2000
2013    3000
2014    4000
2015    5000

Tenant 2    
2010    1000
2011    2000
2013    3000
2014    4000
2015    5000

Solution

  • Prepare your report as in the first example you have created i.e.

    Tenant      Year    Sales
    Strarbucks  2010    1000
    Strarbucks  2011    2000
    Strarbucks  2013    3000
    Strarbucks  2014    4000
    Strarbucks  2015    5000
    

    Then Right Click on Tenant field in the report design.
    Click on Format Field
    On the Common tab enable the option at the bottom Suppress if Duplicated.

    Your report may need to be sorted by Tenant field.