none
what are the criteria for report's data set wizard's table selection? RRS feed

  • Question

  • Hi

    I'm using VS 2013SP1

    I have been trying to create a report off a complex query. So I created an inline function that yields a table, that table has a primary key defined in the database, and used it as a source for a table in the project's dataset.

    However, when I use the wizard to create a new reporting dataset, only 'plain vanilla' tables defined as such in the database are shown in the 'tableadapters' area; if I select the root class, and pick the table adapter from there, I get back an empty table.

    any help or insight will be highly appreciated.

    David L.

    • Moved by Carl Cai Monday, March 3, 2014 6:19 AM (from vb.net)More related
    Friday, February 28, 2014 3:11 PM

Answers

  • a tentative answer

    1. a table that has a primary key (I'm using integer) even if it's based on a DB inline function as a base

    2. no errors in fetching data from that table

    I added a missing primary key to the resulting query based table, and had to clean up the table definition in both the inline query and the DataSet definitions, to eliminate errors in executing GetData on the table adapter before it showed up in the wizard's view of the business object.

    just for good measure here is some code to examine broken table load

    replace: Me.Adapter.Fill(dataTable)

    with  try

    Me.Adapter.Fill(t)

    catch

                '
                'template for catching errors on table fill
                '
                Dim rowsInError() As DataRow
                rowsInError = t.GetErrors
                Dim column As DataColumn
                For i = 0 To rowsInError.GetUpperBound(0)
                    For Each column In t.Columns
                        If rowsInError(i).GetColumnError(column).Length > 0 Then
                            Console.Write(column.ColumnName, _
                             rowsInError(i).GetColumnError(column))
                            Console.WriteLine(rowsInError(i).GetColumnError(column))
                        End If
                    Next
                    ' Clear the row errors
                    rowsInError(i).ClearErrors()
                Next i

    end try

    • Marked as answer by David Len Tuesday, March 4, 2014 8:01 PM
    Tuesday, March 4, 2014 8:01 PM

All replies

  • Hi,

    Sorry for my delay.

    I am afraid that this is not a specific vb.net language issue, there is a dedicated forum for report issues.

    Visual Studio Report Controls is a forum to discuss reporting functionality including the integrated report designer and viewer controls for adding rich data reports to Windows Forms and ASP.NET applications.

    I have moved this thread in Visual Studio Report Controls forum for more dedicated supports.

    In addition, you could share the detailed steps with screenshots with us, which could help us reproduce this issue to further look at this issue and deal with it more efficiently.

    Thanks for your understanding.

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Carl Cai Monday, March 3, 2014 6:30 AM
    Monday, March 3, 2014 6:18 AM
  • a tentative answer

    1. a table that has a primary key (I'm using integer) even if it's based on a DB inline function as a base

    2. no errors in fetching data from that table

    I added a missing primary key to the resulting query based table, and had to clean up the table definition in both the inline query and the DataSet definitions, to eliminate errors in executing GetData on the table adapter before it showed up in the wizard's view of the business object.

    just for good measure here is some code to examine broken table load

    replace: Me.Adapter.Fill(dataTable)

    with  try

    Me.Adapter.Fill(t)

    catch

                '
                'template for catching errors on table fill
                '
                Dim rowsInError() As DataRow
                rowsInError = t.GetErrors
                Dim column As DataColumn
                For i = 0 To rowsInError.GetUpperBound(0)
                    For Each column In t.Columns
                        If rowsInError(i).GetColumnError(column).Length > 0 Then
                            Console.Write(column.ColumnName, _
                             rowsInError(i).GetColumnError(column))
                            Console.WriteLine(rowsInError(i).GetColumnError(column))
                        End If
                    Next
                    ' Clear the row errors
                    rowsInError(i).ClearErrors()
                Next i

    end try

    • Marked as answer by David Len Tuesday, March 4, 2014 8:01 PM
    Tuesday, March 4, 2014 8:01 PM