Report column problem.

  • Hello,

    I have a query that i would like to use in a report:

    SELECT dbo.Sales.Ean, dbo.Sales.ProductName, dbo.Sales.Pack, dbo.Sales.ControlNumber, SUM(dbo.Sales.OrderQuantity) AS SumQuantity,

    SUM(dbo.Sales.SellingValue) AS SumSellingValue, SUM(dbo.Sales.CostValue) AS SumCostValue, SUM(dbo.Sales.Difference) AS SumDifference,

    SUM(dbo.Sales.Commission) AS SumCommission, dbo.Sales.ClaimSupplier, dbo.Sales.SalesType, dbo.SummarySuppliers.SupplierName

    FROM dbo.Sales INNER JOIN

    dbo.SummarySuppliers ON dbo.Sales.ClaimSupplier = dbo.SummarySuppliers.ClaimSupplier

    WHERE (dbo.Sales.ClaimSupplier = @ClaimSupplier) AND (dbo.Sales.SalesType = 3)

    GROUP BY dbo.Sales.Supplier, dbo.Sales.Ean, dbo.Sales.ProductName, dbo.Sales.Pack, dbo.Sales.ControlNumber, dbo.Sales.ClaimSupplier, dbo.Sales.SalesType,

    dbo.SummarySuppliers.SupplierName

    ORDER BY dbo.Sales.ProductName

    I have used a table in my report. The report works fine, howver the Supplier Name appears multiple times the first column of my report.

    Is there a way i can make the report so that the Supplier only appears once the first column?

    Thanks

  • (Potentially) daft question - have you run the same query in SSMS to see if you get the duplicates there?

    -------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
    There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
    I would never join a club that would allow me as a member - Groucho Marx

  • Whys it daft? Yes i have ran the query in SSMS. I just want to know to know is there a way of preventing the supplier from repeating in my report.

  • OK - Don't have a column with it in on your report.

    instead maybe have a textbox at the top with a value of

    =first(fields!Supplier)

    to remove the supplier from the body of the report but still show it on the report.

    -------------------------------Posting Data Etiquette - Jeff Moden [/url]Smart way to ask a question
    There are naive questions, tedious questions, ill-phrased questions, questions put after inadequate self-criticism. But every question is a cry to understand (the world). There is no such thing as a dumb question. ― Carl Sagan
    I would never join a club that would allow me as a member - Groucho Marx

  • Hi

    I typed in: =first(fields!SupplierName)

    into the expression builder, but appear and when i typed it in..a red line appeared under it.

    I ran the report an and it stated there was an error on the page.

  • =first(fields!SupplierName.Value)

  • Thanks

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply