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 a file from within the dashboard

Hide navigation
RSS
Modified on Wed, 12 Mar 2014 09:53 AM Categorized as Button, Data Controls, General Controls, Script Library, Scripting

Overview

This article show how you can open a file such as word document, excel spreadsheet, pdf, etc. from within the dashboard.

To open a file, place it in a web folder on the local machine or on a web server. Once it’s in a web folder, it can be accessed using either the services.NavigateToUrl() method or a Hyperlink control.

Note that, due to Silverlight’s limitation, it is not possible to hyperlink to a file if it’s placed on the local drive. This is because Silverlight cannot access the local machine’s C:\ drive.

Steps

Web Folder

The first step is to create a web folder on the local machine or on the web server and make it accessible to the user on the network.

In this example, the folder is on the Dundas web server in the www folder of the installation:
C:\Program Files\Dundas Data Visualization Inc\Dundas Dashboard\Instance1\www\My_Web_Folder

Once the folder is created, place the files that you wish to open in it. This example uses the following files placed in My_Web_Folder:

Image

These file formats are not limiting. Other formats can also be used.

NavigateToUrl

Once the file(s) is placed, use services.NavigateToUrl() method to navigate to the file and open it. Place the code below in a suitable interaction. In this example, this is used in a Click Interaction of a Button control.

//Text File services.NavigateToUrl("http://dashboard_url/My_Web_Folder/Test.txt");

//Word document services.NavigateToUrl("http://dashboard_url/My_Web_Folder/Test.docx");

//Excel Spreadsheet services.NavigateToUrl("http://dashboard_url/My_Web_Folder/Test.xlsx");

//PDF file services.NavigateToUrl("http://dashboard_url/My_Web_Folder/Test.pdf");

//JPEG file services.NavigateToUrl("http://dashboard_url/My_Web_Folder/Test.jpg");


Hyperlink

The Hyperlink control allows you to open the file by placing it’s url in the Url property as shown below:


//Text http://dashboard_url/My_Web_Folder/Test.txt

//Word http://dashboard_url/My_Web_Folder/Test.docx

//Excel http://dashboard_url/My_Web_Folder/Test.xlsx

//PDF http://dashboard_url/My_Web_Folder/Test.pdf

//JPEG http://dashboard_url/My_Web_Folder/Test.jpg



Related Topics

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

Copyright © 2009-2014 Dundas Data Visualization, Inc.