[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

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

Posted on 2011-09-13
4
Medium Priority
?
376 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 600 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 400 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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
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…
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

649 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