Report Builder 3.0 - only one record returned when report is run

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dustin
    New Member
    • Jul 2010
    • 2

    #1

    Report Builder 3.0 - only one record returned when report is run

    Hi Everyone! First post here!

    I am working with a test report, using Report Builder 2.0 in an SQL environment with server 2008 R2 with SSRS installed.

    I have a data source and dataset set up properly (I think). I have a table in the data set that has things like (for the sake of example...) EmployeeID, firstName, lastName, ... etc which I have thrown into a blank report to make sure that it connects to the data fine (I'm working on the reporting server, which is getting the source data from a different SQL server).

    I know that the report is successfully talking to the data source because when I run the report in report builder, the first record in the database is returned. It is my understanding though, that it should read all of the records and I should be able to click the "next" and "previous" buttons in report builder and browse through the results of the report execution for each record... but it only returns the first one!

    thoughts?
  • Jerry Winston
    Recognized Expert New Member
    • Jun 2008
    • 145

    #2
    What does the TSQL query that builds your report dataset look like?

    Comment

    • Dustin
      New Member
      • Jul 2010
      • 2

      #3
      Originally posted by b0010100
      What does the TSQL query that builds your report dataset look like?
      Thanks for the response - the query right now is just selecting all of the records in the table ( I believe - I am not very familiar at all with SQL or SSRS ... apologies in advance for my ignorance ):

      select * from tblEmployeeID

      I would expect this to return all of the records, so I could just click next to browse the results of the report.

      Additionally, I have just recently added the line:

      where EmployeeID=(@Em ployeeID)

      so that I can type in the EmployeeID at runtime and see the corresponding record (which works well, so I know it reads the other records at least.

      I would really like to just click through the records to preview each one though

      Comment

      • Jerry Winston
        Recognized Expert New Member
        • Jun 2008
        • 145

        #4
        double check to be sure you're not using a TextBox type item to display your data. The textbox items show one record. A textbox might contain this kind of code:
        Code:
        =First(Fields!cmname.Value)
        As its name suggests, the First() function returns only one record from the dataset.

        To see all your data, add a TABLE type item to the report body. Then drag the data fields you want to see into the DETAIL area of the table. Although the table will show multiple records, you can still make use of your where
        Code:
        EmployeeID=(@EmployeeID)
        construct to limit the query dataset at runtime.

        Comment

        • viniciusSin
          New Member
          • Sep 2010
          • 1

          #5
          Same problem

          I was having the same problem.
          I solved with the folowing steps:
          1 - Configure a primary key on the table that you are selecting.
          2 - Put a list on the report.
          3 - Configure a Data Set on the list properties.
          4 - Put the textbox inside of the List.

          Vinicius Guedes Sin

          Comment

          Working...