Microsoft report builder and Microsoft Visual Studio .Net report viewer control

Posted on 2014-07-14
Last Modified: 2014-07-25
We are in the process of rewriting some reports that we currently have in a Windows desktop application.  Right now we call a 3rd party application that produces the reports and then we show them in a 3rd party report viewer.  These are all called from a .Net Windows application.  We like to get rid of both of these 3rd party programs as they are outdated.  I've been reading up on the Report Viewer control which is already in my .Net toolbox and Microsoft Report Builder.  Can someone give me the definition of both and do I have to have both.  I've taken just the viewer control and placed it on a form and hooked it to a database.  From there I was able to select which fields I wanted to see and it produced output in that control on the form.  Is that all I need for writing reports or do I need to build the report first in Builder and then display it in the viewer.  If that's the case, can I pass parameters from .Net to builder inside my desktop application and then display on a form in that app that has a viewer control.  I've also read about the SSRS reporting service.  We'd like to be able to produce and view reports from .Net without every having to leave the application and go somewhere else to build and view.  Everything I've done up to this point has been with flat files so this is new thinking to me.

Question by:pmac38CDS
    LVL 27

    Expert Comment

    All you have to do is build the SP to get the info that you need for the report
    then pass the parameter name to the report and then have to the report build itself.
    LVL 83

    Expert Comment

    Here are some resources that should get you started on viewing reports and passing parameters

    Imports Microsoft.Reporting.WinForms
    Public Class Form1
        Private Sub Form1_Load(ByVal sender As System.Object, _
                               ByVal e As System.EventArgs) _
                               Handles MyBase.Load
            'Set the processing mode for the ReportViewer to Remote
            reportViewer1.ProcessingMode = ProcessingMode.Remote
            Dim serverReport As ServerReport
            serverReport = reportViewer1.ServerReport
            'Get a reference to the default credentials
            Dim credentials As System.Net.ICredentials
            credentials = System.Net.CredentialCache.DefaultCredentials
            'Get a reference to the report server credentials
            Dim rsCredentials As ReportServerCredentials
            rsCredentials = serverReport.ReportServerCredentials
            'Set the credentials for the server report
            rsCredentials.NetworkCredentials = credentials
            'Set the report server URL and report path
            serverReport.ReportServerUrl = _
               New Uri("http://<Server Name>/reportserver")
            serverReport.ReportPath = _
               "/AdventureWorks Sample Reports/Sales Order Detail"
            'Create the sales order number report parameter
            Dim salesOrderNumber As New ReportParameter()
            salesOrderNumber.Name = "SalesOrderNumber"
            'Set the report parameters for the report
            Dim parameters() As ReportParameter = {salesOrderNumber}
            'Refresh the report
        End Sub
    End Class

    Open in new window

    LVL 1

    Author Comment

    planocz...could you give me a little more detail on your answer?  SP?  Pass parameter name to report??  Then report builds itself?
    LVL 27

    Expert Comment

    SP = Stored Procedure
    parameter  like    MyFirstPara as a name (build this in the SP)
    The report you just create with the new SP.
    LVL 1

    Author Comment

    So this is all done in viewer and the builder is not needed?
    LVL 27

    Accepted Solution

    The builder is needed.
    Either the report builder or and Visual Studio with BIDS.
    You need the build to create the report from the SP and then it has to be deployed to the server so the user can run and view it.

    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Written by Valentino Vranken. Introduction: The first step of creating a SQL Server Reporting Services (SSRS) report involves setting up a connection to the data source and programming a dataset to retrieve data from that data source.  The data…
    For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
    Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
    Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now