SQL query returns 2 records in SQL Query but ReportViewer only displays the last record? RRS feed

  • Question

  • The following returns 2 records, but report only displays last?
    SELECT * FROM [Case] Where (CaseItem IN (4,5)) ORDER BY CaseItem

    CaseItem is an Integer

    Seems like reportviewer does not execute simple SQL correctly.

    Thursday, October 4, 2012 4:40 PM

All replies

  • Hello,

    I wouldn't be so sure of a failure from ReportViewer...

    ReportViewer can do some data transformation before displaying results. Check the report definition and look for any grouping or aggregation function.

    Thursday, October 4, 2012 5:34 PM
  • Thanks, I found that I had to put all the fields in a list, to show multiple records, very silly. Seems like the old VB6 DataReport was much better, light years ahead of the current ReportViewer, for instance you could create a generic report with many fields then at runtime change the RptTextBox datafield, RptLabel caption, and visibility before the report ran.
    Friday, October 5, 2012 3:22 PM