416.467.9100 | Dundas Data Visualization | Login
Welcome Guest
This is the support page for the legacy Dundas Dashboard application. For assistance with the current Dundas BI application please click here.
Dashboard v5.0

This site makes extensive use of JavaScript.

Please enable JavaScript in your web browser and reload the page before proceeding.

Open an email client from the dashboard

Hide navigation
Modified on Mon, 14 Oct 2013 05:46 PM Categorized as Data Grid, Datasets, Script Library, Scripting


You can open your email client such as MS Outlook etc. from the dashboard using the services.NavigateToUrl() method or using JavaScript by using the services.EvalJavaScript() method.

This will help you to quickly send an email to the recipient from the dashboard without having to open the email client separately.

Create the Virtual Table

Create a Virtual Table that has a field for email addresses. For testing purposes, use the sample SQL script below.

SELECT 'Department A' Department, 'Tony Stark' Department Head, 'Tony.Stark@CompanyX.com' Email, CONVERT(float,'100') Revenue (in million), CONVERT(float,'50') Expenditure (in million)


SELECT 'Department B' , 'Bruce Banner', 'Bruce.Banner@CompanyX.com' , '200' , '180'


SELECT 'Department C' , 'Steve Rogers', 'Steve.Rogers@CompanyX.com' , '300' , '290'

This will create a virtual table as shown below.


Create Dataset

From the virtual table, create the KPI/Dataset as shown below. Net Income is a calculated measure and gets the difference of Revenue and Expenditure.



On the dashboard, create a datagrid as shown below. You can use any other data control. The process and the scripting will remain the same.


Add the script

Add the following script to the Click Interaction of the dashboard.

if(e.DataPoint!=null) { //Recipient’s email string email = e.GetDataPointColumnValue("Email");

//Subject of the mail. string subject = "?subject=Departmental performance as of " + DateTime.Now.ToShortDateString();

//Insert a cc or a bcc recipient to the message. For bcc, replace “cc” with “bcc” tag. string cc = "&cc=Nick.Fury@CompanyX.com"; //

//Create the mailto string by appending all the above properties string mailto = "mailto:" + email + subject + cc; services.NavigateToUrl(mailto,"_self"); }

You can also use JavaScript to implement the mailto: feature. To do this, place the JavaScript in the Click interaction of the control using the services.EvalJavaScript() method in the dashboard. For example, in the above script replace services.NavigateToUrl() with:

string javascript = "parent.location = '"+ mailto + "'"; services.EvalJavaScript(javascript);

For more information on services.EvalJavaScript(), see: Library Services


When you click on the datagrid, the default email client will open with the fields populated as shown below:


Related Topics

About Dundas | Contact Us Follow us on Twitter! | Privacy Statement | Report Site Issues

Copyright © 2009-2014 Dundas Data Visualization, Inc.