Trouble viewing this newsletter? Click here to read it online.
Dundas Data Visualization Technical Newsletter Brought to you by support2.dundas.com!

Editor's Note: Trade Show Season

Several folks from Dundas just returned from the Microsoft Business Intelligence Conference 2007 in Seattle (May 9-11, 2007). Thanks to everyone who stopped by and talked to us!

We've had a lot of releases in the last month (lots of Reporting Services releases!), which I'll list here in case you use one of these products:

- Chris Herborth

In this issue In this Issue: May, 2007

Contents logo

Send us your feedback!

Articles  

Using Dundas Chart with a Web Garden or Server Farm

Dundas Chart Looking to use Dundas Chart in an IIS 6 server farm or web garden? This article tells you how to make sure your application's state information is shared properly between the processes in the application pooling environment. You'll see how to store temporary files in the filesystem or a database, or by using the ASP.NET state service.

Note this article only applies to Dundas Chart for ASP.NET v5.5 (Visual Studio 2005) or later, and Dundas Chart for SharePoint.

Read full article

Adding Data Points to a Chart (Beginners)

Dundas Chart If you're new to Chart, one of the issues facing you is how to get data into the chart so you can put Dundas's code through its paces. In this article, you'll see how easy it is to add data points and manipulate them.

Sample included! Note this article is for beginners; if you're new to Dundas Chart, this will help you get started.

Read full article

Manually Modifying Configuration Files for Dundas Reporting Services

Dundas Reporting Services dashboard example You may need to manually modify the configuration files for Dundas components when deploying them to a Reporting Services server. This article will show you how to edit the rsreportserver.config and rssrvpolicy.config for Chart, Gauge, Map, and Calendar.

Read full article

Tips n' Tricks Chart | Gauge | Map

General Tips

Tip: Trade Shows

Tech·Ed 2007 Bronze Sponsor A quick reminder that we're going to be at the Microsoft Tech·Ed 2007 show, June 4-8 in Orlando, Florida. Dundas Data Visualization is a Bronze Sponsor for this show, and we'll be in Booth 614 if you want to say "Hi!"

Tip: Dundas Resources

The Dundas support website is filled with useful information, including full online documentation for all of our products, customer forums frequented by our technical support experts, and a large number of support articles dealing with specific problems or illustrating specific features and techniques.

read more »

Tip: Dynamic Assembly Loading using Reflection

Sample included! Assemblies can be loaded at run-time through the System.Reflection namespace. While assembly calls are more complicated when using this method, it has a few unique advantages. One situation in which using Reflection to load an assembly proves advantageous is where an application must be built without having references to the assembly itself. This is useful when you have two versions of your product: one which uses the Dundas Data Visualization assembly and one which does not. In this case, using Reflection results in neither version needing a direct reference to the Dundas Data Visualization assembly.

Using Reflection to load assemblies also lets you avoid dealing with directives at the top of ASPX pages (in ASP.NET) and references within the Web.Config file. Furthermore, using Reflection gives the freedom to place assemblies anywhere on the hard drive and avoid registering them into the Global Assembly Cache.

read more »

Tip: Article and Tip ideas

Got something you'd like to see in the technical newsletter? Send us your ideas, or join the Support Forum!


ChartTips

Tip: Displaying a Percentage

Pie chart Sometimes when you're reading raw data from a database, you'll want to display a percentage instead of the actual values (a pie chart, for example).

This is easy to do with keywords in the chart labels:

  1. Set up your chart the way you like, and load data into it through whatever means is appropriate (such as data binding if you're working with a database).
  2. Find the label for the seris you're working with, for example:
    // Be sure to use your series name and chart variable!
    Series percentSeries = chart1.Series["Percentages"];
  3. Set the series label to #PERCENT:
    percentSeries.Label = "#PERCENT";

For more information about keywords, read Built-In Keywords for Series Properties. For more information about data binding, read Data Binding Techniques in the online documentation.

read more »

Tip: Ajax Features in ASP.NET (VisualStudio 2005)

Ajax Chart Dundas Chart for ASP.NET uses Ajax to provide the following features:

  • Internal and External Toolbars
  • Context Menus
  • Property Dialogs
  • Scrolling
  • Zooming

Events have are also provided to build customized chart-related functionality. This lets you update elements on the chart or the web page without having to refresh the entire page, giving you tremendous flexibility.

read more »

Tip: Hiding a Pie Chart's Slice Line

Single-segment Pie Chart By default, the Pie Chart draws a thin line between each slice of the pie. If your data series contains only one item (for example, the chart is displaying data that has one 100% item), it will draw a line from the center to the 3:00 o'clock position of the pie.

To prevent this, set the series BorderStyle property to ChartDashStyle.NotSet:

chart1.Series[0].BorderStyle = ChartDashStyle.NotSet;

You can't currently have a border around a series without drawing the slice; this capability may be added in a future update to Chart.

read more »


GaugeTips

Tip: Saving a Gauge's State to your Session

When using Dundas Gauge with Ajax callbacks, you cannot save the widget's state between callbacks (although this does work properly with postbacks). The EnableViewState property has no effect when working with Ajax.

To get around this, you must serialize the Gauge state and store it in the Session object; then you can read the widget state from your Session.

Use this GaugeSessionHelper class to store and load your Gauge state in the Session:

using System;
using System.IO;
using System.Text;
using Dundas.Gauges.WebControl;

/// <summary>
/// GaugeSessionHelper provides static methods for saving a
/// Guage's state in the Session object.
/// </summary>
public class GaugeSessionHelper
{  
    /// <summary>
    /// Loads the control's state from Session if
    /// available and registers the control for
    /// saving for future page loads.
    /// </summary>
    /// <param name="control">Dundas Gauge control</param>
    public static void Load(GaugeContainer control)
    {
        string sessionId = getSessionID(control);

        if (control.Page.Session[sessionId] != null)
        {
            byte[] buffer = (byte[])control.Page.Session[sessionId];
            MemoryStream stream = new MemoryStream(buffer);

            control.Serializer.Load(stream);
        }

        control.Unload += new EventHandler(control_Unload);
    }

    /// <summary>
    /// Fires when the page is unloaded. At this point,
    /// all changes that have been made to the Gauge control
    /// dynamically should have happened, and it is a good
    /// time to automatically save the Gauge's state.
    /// </summary>
    static void control_Unload(object sender, EventArgs e)
    {
        Save((GaugeContainer)sender);
    }

    /// <summary>
    /// Saves the control's state to Session
    /// </summary>
    /// <param name="control">Dundas Gauge control</param>
    public static void Save(GaugeContainer control)
    {
        string sessionId = getSessionID(control);
        MemoryStream stream = new MemoryStream();
        byte[] buffer;

        control.Serializer.Save(stream);
        buffer = stream.GetBuffer();
        control.Page.Session[sessionId] = buffer;
    }

    /// <summary>
    /// Returns an ID for the control suitable for
    /// saving to Session, unique across all Pages
    /// and GaugeContainers in the application
    /// </summary>
    /// <param name="control">Dundas Gauge control</param>
    /// <returns>Unique ID string</returns>
    private static string getSessionID(GaugeContainer control)
    {
        return control.Page.UniqueID + ">" + control.UniqueID;
    }
}

To register a Gauge with the GaugeSessionHelper, add the following line of code to your Page_Load() or Page_Init() method:

GaugeSessionHelper.Load( GaugeContainer1 );

Remember to replace GaugeContainer1 with the name of your Gauge container.

read more »


MapTips

Tip: Finding Map Elements

Finding Map elements Dundas Map lets you search for specific map content elements using keywords. You can perform this searching during run-time or at design-time using a command in the Visual Studio Properties window.

read more »

Dundas Q & A Chart | Gauge | Map
ChartQ&A

Chart

Q. Why does Chart always appear above all other elements on my page when rendered as Flash?

A. Dundas products for ASP.NET, when rendered as Flash, will appear above all elements on the webpage regardless of the Z-index setting or placement. This problem is due to the fact that Flash is rendered as an ActiveX object, and unfortunately Microsoft Windows always renders ActiveX objects on top of all other objects. This problem affects all Flash objects, not just Dundas products.

read more »

Q. I get an error in Reporting Services about a textbox with the same name. How can I solve this issue?

A. When you get an error in Reporting Services saying, "More than one report item in the report has the same name 'dundasChartControl1_Textbox'." (or similar) it is because there is more than one textbox with the same name; each textbox must have a unique name. This can happen if you copied and pasted a Chart within the report.

To solve this problem, right click on the .rdl file in the Solution Explorer and select "View Code". In the code, search for all instances of the textbox with the name mentioned in the error and change the names to make sure they are all unique.

read more »


GaugeQ&A

Gauge

Q. Does Gauge include a "traffic light" mode?

A. A traffic light gauge is often used with business intelligence dashboards to display the "health" of a key performance indicator in an easy-to-read format. Although Gauge doesn't include a traffic light mode, you can create one yourself using Gauge's StateIndicators.

read more »


MapQ&A

Map

Q. How can I link data to a map by zip code?

A. To link data to a map by zip code, you'll need a shape file that includes zip code data with a unique identifier. Import this shape file into the map control using the usual techniques.

Bind the column containing zip code data to the Map control by dragging it into the data field. Drag any additional data you want the map to display into the data field.

Right-click the Map control, choose Properties, then the Data tab. Select the zip code column in the binding field's drop-down list, and the binding field from the shape file. On the Data Appearance tab, select a column from the field drop-down list to represent the data for each shape.

read more »