Intersoft WebGrid Documentation
DynARInfo Class
Members  Example  See Also  Send Feedback
ISNet.WebUI.WebGrid Namespace : DynARInfo Class






Provides data for parameters to export WebGrid reports. The reports use ActiveReport engine from Data Dynamic Ltd.

Object Model

DynARInfo Class

Syntax

Visual Basic (Declaration) 
Public Class DynARInfo 
Visual Basic (Usage)Copy Code
Dim instance As DynARInfo
C# 
public class DynARInfo 
Delphi 
public class DynARInfo 
JScript 
public class DynARInfo 
Managed Extensions for C++ 
public __gc class DynARInfo 
C++/CLI 
public ref class DynARInfo 

Example

 

This sample code below shows you how to export data using programmatically.
C#Copy Code
private void Button1_Click(object sender, System.EventArgs e)
{
     // invoke the grid's export feature
     // through the server side

     WebGrid1.ExportGrid(SetDynInfo());
}

 private DynARInfo SetDynInfo()
{

      // configure the DynARInfo object
      // as the parameter for the ExportGrid() method

      // need to configure 4 things :
      // dynInfo.ReportType 
      // dynInfo.ReportPath
      // dynInfo.IISReportPath
      // dynInfo.DynPageOrientation

      DynARInfo dynInfo = new DynARInfo("html", Server.MapPath("~/TempReports") + @"\");
      dynInfo.IISReportPath = "/TempReports/";
      private DynARInfo SetDynInfo()

      return dynInfo;
}

Remarks

WebGrid.NET Enterprise provides built-in exporting functionality to HTML, PDF, TIFF, RTF, Excel, Text and XML format. The exporting process will take client's latest UI layout such as visible columns, columns order, grouped columns, sorted columns and filtered columns. The built-in exporting feature integrates DataDynamic's ActiveReports runtime engine to generate the reports to HTML and PDF format. The ActiveReport's engine is only used internally by WebGrid.NET at runtime and doesn't require you to add references of ActiveReport's assembly in your VS.NET solution.  

Alternatively, WebGrid.NET Enterprise also allows you to use your own exporting codes or module to handle exporting functionality instead using the built-in exporting feature. When using your own custom exporting, you can skip the inclusion of built-in exporting runtime assemblies. That means WebGrid.NET assembly does not depend on the built-in exporting runtime assemblies on deployment time. This makes the WebGrid.NET totally independent, fully customizable and extensible.

Before the exporting process, you will need to create a folder to hold the generated output files. By default, the ReportPath is assigned to "~/TempReports" which means the "TempReports" folder should be created under the root of the web application. The folder also need to have enough permission to allow the asp-net worker process to write the generated output files into the folder. You can always change the ReportPath property and other report-specific property such as paper-type, orientation etc, in the ReportInfo object provided by the event argument in OnExport event.

For deployment process, these assemblies needed to be installed in server's GAC for the built-in exporting to work properly: ActiveReports.dll, ActiveReports.HtmlExport.dll, ActiveReports.PdfExport.dll, ActiveReports.XlsExport.dll, ActiveReports.TiffExport.dll, ActiveReports.RtfExport.dll, ActiveReports.TextExport.dll and ActiveReports.Viewer.dll

WebGrid.NET Enterprise 5.0 comes with newer version of ActiveReports and simpler assembly deployment for Exporting feature. Now you only need to include one assembly reference for Exporting feature.

If your existing web application used WebGrid’s Exporting feature, you only need Add ISNet.ActiveReports.Exporting assembly from [Installation Folder]\WebGrid.NET 5.0\Bin

For more information regarding the references, you can read the Assembly References.

WebGrid.NET 5.0 Enterprise also brings some improvement on the Exporting:

  • Added OutputType property to ReportInfo. The temporary report file name format is now set to use GUID by default. In previous version, the default value is ExecutionTime.
  • Reduced memory usage and fixed leaks. 
  • Exporting is now working properly without default printer installed. The error message like “Printer not Installed” or “PaperKind does not supported” has been completely eliminated.
  • Core engine has been rewritten for better performance.
  • Added CacheToDisk property to ReportInfo. This feature allows the exporting to write temporary cache to disk instead of using memory.
  • Added CacheToDiskLocation property to ReportInfo. You can customize the folder to store the cache. By default, you don’t have to set this property.
  • Improved exporting menu. The export types are now represented with icons.
  • Added exporting command to row/cell context menu. This allows you to easily perform exporting from your current mouse position in the Grid. 

Inheritance Hierarchy

System.Object
   ISNet.WebUI.WebGrid.DynARInfo

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.