FusionFerro

V Studio C#, Oracle, deploying in Sharepoint, best practice

Recommended Posts

Hi there,

 

I have several posts in this forum asking about tactical questions, however with time I learned that I have to start with a question about the best practice as I am not aware about FusionCharts capabilities with regard to the development technology I am using.

 

My solution and used technology:

I am developing Visual Studio C# 2010 project to create a report web page that has several buttons (each present a country) and a graph (column 3d showing countries versus balance) in the middle of the page. Each time the user clicks on one of the buttons, the graph filter changes and display the new results accordingly.

The page loads the country buttons dynamically using C# code that connects with an Oracle DB (11g on Unix) to get the list of countries.

The Country balance is also in Oracle DB.

 

So basically I have a web page with a main table that looks like the following:

<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>
<%@ Import Namespace="Microsoft.SharePoint" %> 
<%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="360MainScreenUserControl.ascx.cs" Inherits="_360Report._360MainScreen._360MainScreenUserControl" %>



 <%@ Register assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>

    <asp:TableRow ID="TableRow2" runat="server">
        <asp:TableCell>
            <asp:Table ID="CountrySection" runat="server">
            </asp:Table>
        </asp:TableCell>
        <asp:TableCell>
            <asp:Table ID="GraphSection" runat="server">
            </asp:Table>
        </asp:TableCell>
        <asp:TableCell>
            <asp:ListBox ID="lbAgreement" runat="server" onselectedindexchanged="lbAgreement_SelectedIndexChanged" onprerender="lbAgreement_PreRender" AutoPostBack="True" ForeColor="#006F5F"  Width="180" Height="750" Font-Names="Calibri" Font-Size="14" >
            </asp:ListBox>
        </asp:TableCell>
    </asp:TableRow>

each section (table) is filled by C# code that connects to Oracle.

 

What I need is to use FusionChart to fill the GraphSection (show the graph in a table cell) and make it sensitive to user selection (when choosing any of the buttons that are dynamically created and shown in the CountrySection in the above code).

 

Now my questions are:

1- What is the best practice or recommended approach?

- Do I use the SharePoint collaboration to create my chart as a web part and then use it from the code to show this web part in the cell in GraphSection?

- Or I should only work with FusionChart XT for .net and create and render to chart into the cell in GraphSection using C# code?

2- Following one of the practices above, how can I pass the parameters to the chart and refresh it?

3- The most important question: I am facing difficulties as I am trying both solutions and found no complete example. Can you please lead me to one.

 

Many thanks,

 

 

Share this post


Link to post
Share on other sites

Hi,

 

1- What is the best practice or recommended approach?
- Do I use the SharePoint collaboration to create my chart as a web part and then use it from the code to show this web part in the cell in GraphSection?
- Or I should only work with FusionChart XT for .net and create and render to chart into the cell in GraphSection using C# code?
>>> You are already using the best approach, i.e. rendering the chart in a page with multiple buttons. Your scenario is not suitable for SharePoint Web Part. So go with the 2nd option here.
 
2- Following one of the practices above, how can I pass the parameters to the chart and refresh it?
>>> As you said, you have multiple buttons which generates different data for the chart and render it, so why do you need to pass the parameters to the chart? Please clear this point.
 
3- The most important question: I am facing difficulties as I am trying both solutions and found no complete example. Can you please lead me to one.
>>> Please let me know what difficulties you are facing? Are you not able to see your custom ASPX page in SharePoint?
 
And for a very simple approach, you can use Collabion Charts for SharePoint, which has dynamic filter feature which ca solve your purpose.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now