Results 1 to 2 of 2

Thread: Report Viewer - SQL Statement Works in query builder but not in report viewer??

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2013
    Posts
    295

    Report Viewer - SQL Statement Works in query builder but not in report viewer??

    Hello All,

    This is my first report and I thought I was doing things correctly. I follow all the TuT's and I get right up to the report viewer with no issues, then I run the App and get no data in the report. just the headers.

    Here is my procedure...

    I add a "New Item" ---- Dataset
    That brings up the dataset designer.
    I click in the blue area to add a "Table Adapter"
    Add the proper dataset
    Click my way to the Query Builder and add my SQL Statement

    Code:
    SELECT DISTINCT VI_File_Extention, COUNT(VI_File_Extention) AS CountOf
    FROM            Volume_Information
    GROUP BY VI_File_Extention

    I test it in the Query Builder and get back plenty of data
    I click next and leave the "Fill a Data Table: and "Return a Data Table" Checked.

    Then I click Finish

    I then add a New Item "Report"

    That brings me to the Report Designer

    From my toolbox, I add a Table.

    That brings up the "Choose a Dataset" Pane

    I select the dataset I just created and click finish

    From the Report Designer Tools, I select the Dataset and Drag/drop my Data Elements into the table.
    (VI_File_Extention and CountOf)

    The table auto fills the header and data Rows.

    I then go back to the main form of my App and add a report viewer to an Empty Tab in one of my panels.

    I choose the Report I just made, the dataset I just created and click "Rebind"
    That creates a DatasetBindingSource in my project and a ReportViewer.Refresh() in the Form Load.

    I Click Dock in Parrent

    I remove the Refresh from the Form Load to a Refresh Reports Button

    I ReBuild the project.

    I click Run

    I click to the Report Tab

    I click the Refresh Reports Button

    There is a slight pause as it refreshes and runs the SQL Code (I think)

    The report appears with the table and the headers but no data!

    Where did I go wrong?

    -NJ
    Lo And Behold
    This is my first Microsoft App Submission
    Your opinion of it would be appreciated

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    May 2013
    Posts
    295

    Re: Report Viewer - SQL Statement Works in query builder but not in report viewer??

    Bump - Anyone?
    Lo And Behold
    This is my first Microsoft App Submission
    Your opinion of it would be appreciated

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width