Solved

How do I use SQL and ASP.Net to dynamically create charts on a web page?

Posted on 2011-09-13
4
374 Views
Last Modified: 2012-05-12
Hi
I am investigating a web-based db driven system for a client who currently has everything stored in spreadsheets.  The currently use SQL Server 2005.  What do I need to enable them to dynamically create charts based on the data in the DB?  I've never used SSRS so I just need to be sure that this will satisfy their needs.  By what I've read it looks like there are components which will enable me to display the charts on ASP.Net web pages.  I have also come across OLAP Reporting Services 2008 but I don't know whether the client will be prepared to upgrade their version of SQL server.  Advice would be appreciated.
0
Comment
Question by:Lorna70
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 16

Accepted Solution

by:
carsRST earned 150 total points
ID: 36528710
There's a ASP.NET chart control available for download from Microsoft.   Once you install it, it shows up in your toolbox as a control to select.  Easy to use, looks nice.

Download:
http://weblogs.asp.net/scottgu/archive/2008/11/24/new-asp-net-charting-control-lt-asp-chart-runat-quot-server-quot-gt.aspx

Code below is an example of its use
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:AM14ConnectionString %>" 
        SelectCommand="Select * from.... ">
</asp:SqlDataSource>


<asp:Chart ID="Chart1" runat="server" 
    BackColor="#EEFAFD"
    BackSecondaryColor="128, 128, 255" 
    BorderlineColor="White" 
    BorderlineDashStyle="Solid"
    BorderlineWidth="3" 
    DataSourceID="SqlDataSource1"
    
        Style="height: 350px; width: 400px;">
    <Titles>
        <asp:Title Name="Title1" 
            Text="Cars" 
            Font="Arial 12pt, style=Bold">
        </asp:Title>
    </Titles>
    <Series>
        <asp:Series Name="Series1"  
            XValueMember="Region" 
            YValueMembers="ACTUAL COUNT">
        </asp:Series>
    </Series>
    <ChartAreas>
        <asp:ChartArea Name="ChartArea1">
            <Area3DStyle Enable3D="True" />
            <AxisY Title="Dollars">
                <MinorGrid Enabled="True" />
                <LabelStyle Format="{0:C}" />
            </AxisY>
        </asp:ChartArea>
    </ChartAreas>
</asp:Chart>

Open in new window

0
 
LVL 16

Expert Comment

by:carsRST
ID: 36528717
Keep in mind, the control must also be installed on the server to use.
0
 
LVL 7

Expert Comment

by:Kishan Zunjare
ID: 36535051
You can go with Third party charts i.e. Fusion charts.
http://www.fusioncharts.com/free/

FusionCharts Free is a completely free and open-source Flash charting component. By using javascript, XML you can do this. I have very good experience with this for Rich UI(specially dynamic charts)

0
 
LVL 7

Assisted Solution

by:mr_nadger
mr_nadger earned 100 total points
ID: 36535491
Reporting services will do the charts easily, and giving them access to the report builder would allow them to build different charts on the fly; you could dynamically display all or some of the reports on your page afterwards through the reportviewer control.
If they're using Sharepoint, you can point web parts directly to the reports to make distribution even easier.
0

Featured Post

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

724 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