How do I run reports off my web site?

Posted on 2009-05-01
Last Modified: 2013-11-26
I have written an C# web site using visual studio 2008. I am using a .net 3.5 listview control as my data viewer connected to a linq datasource to perform my select queries, inserts, edits and deletes. I am now hoping to provide my users with some sort of frontend reporting interface/tool so they can easily pull back crucial data (between certain dates, items with a closing date within the next month etc) from my backend sql database allowing them to print the results for reviewing. I have come across the below link but I was wondering if there was an easier free approach that I can use?

Question by:Shepwedd
    LVL 8

    Accepted Solution

    You could use a ReportViewer or CrystalReportViewer control.

    See below for an example:
    ReportViewer viewer = new ReportViewer();
                DataTable dt = new DataTable(); //  Change this to your datatable
                ReportDataSource ds = new ReportDataSource("DataSet", dt); // Change this to your dataset name defined int he report file
                viewer.LocalReport.DisplayName = "Report Name";
                viewer.LocalReport.ReportPath = @"C:\report.rdlc";

    Open in new window


    Author Comment

    I've managed to create a ReportViewer page (rdlc) through the ASP.NET Reports Web Site template within Visual Studio 2008. I have managed to build the Object Data Source and retrieve data from one of my tables. What I now need to do is join this table on to others in my database to retrieve more relevant data and then create two textbox controls (that will contain date values - to and from date) to allow users to filter my data between two dates, possible?

    LVL 8

    Expert Comment

    You can manipulate the table as necessary before adding it to the reportviewer then reference it in your rdlc.

    Author Comment

    I think my problem is that I didn't start with an reports web site, I started with just a normal web site and now that my default.aspx page etc is completed I'm now wanting to add a report to my project, possible? I noticed that when starting a new reports web site from the VS 2008 templates and following the wizard to run the report it's the default.aspx page that is needed, I already have a default.aspx page assigned to my listview so how do I run my report? And how do I reference a manipulated table through the rdlc page? I'm guessing the joins etc have to be done through the object data source? Can I link a report to a linq data source?


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    It is helpful to note: This is a cosmetic update and is not required, but should help your reports look better for your boss.  This issue has manifested itself in SSRS version 3.0 is where I have seen this behavior in.  And this behavior is only see…
    Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    759 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

    9 Experts available now in Live!

    Get 1:1 Help Now