You can use ActiveReports 6 on Windows Azure in full trust or partial trust modes, but with limitations on some of the features.
|
Note: If you see an evaluation banner when deploying your ActiveReports 6 project, you shoud use the Web Key Generator utility to create the Web Key and integrate the license information into your project. |
Full Trust Feature Limitations
- Rtf and Text filters are not supported on Windows Azure.
Partial Trust Feature Limitations
- Exporting limitations
- Rtf, Text, Tiff and Excel filters are not supported in Azure partial trust.
- Digital signatures for the Pdf export filter are not supported.
- The Picture control does not support metafiles in Azure partial trust.
- Chart and Custom controls with the ImageType property set to metafiles also require Full trust.
- The OleObject control requires Full trust.
- Scripting requires Full trust, so if you need to use code in reports under partial trust, use code-based reports rather than RPX format.
- The OLE DB data source is not supported in Azure partial trust.
Recommended Development Environment for Azure Partial Trust
To set up Partial trust in an Azure Web Role Application
- In Solution Explorer, expand the Roles folder of your Azure project and double-click the role reference WebRole1.
- On the Configuration page that appears, select Windows Azure partial trust under .Net trust level.
- In Solution Explorer under WebRole1, double-click Web.config.
- In the Web.config file that opens, remove the <System.Diagnostics> tag.
- In Solution Explorer under WebRole1, double-click WebRole.cs.
- In the WebRole.cs file that opens, remove or comment the following line as the diagnostics library does not support partial trust callers:
DiagnosticMonitor.Start("DiagnosticsConnectionString")
To set up Partial trust in an Azure Worker Role Application
- In Solution Explorer, expand the Roles folder of your Azure project and double-click the role reference WorkerRole1.
- On the Configuration page that appears, select Windows Azure partial trust under .Net trust level.
- In Solution Explorer under WorkerRole1, double-click App.config.
- In the App.config file that opens, remove the <System.Diagnostics> tag.
- In Solution Explorer under WorkerRole1, double-click WorkerRole.cs.
- In the WorkerRole.cs file that opens, remove or comment the following line as the diagnostics library does not support partial trust callers:
DiagnosticMonitor.Start("DiagnosticsConnectionString")
To set up a local storage resource in a Web Role partial trust Application
- Open the service definition file (ServiceDefinition.csdef) and add the following tag after<WebRole name=”WebRole1”>:
Paste into ServiceDefinition.csdef after <WebRole name=”WebRole1”> |
Copy Code |
<LocalStorage name="WebRoleStorage" cleanOnRoleRecycle="true" />
|
- To export to PDF, paste the following code into Default.aspx.cs to the button_Click event:
Paste into Default.aspx.cs to the button_Click event |
Copy Code |
NewActiveReport1 rpt=new NewActiveReport1 ();
rpt.Run ();
DataDynamics.ActiveReports.Export.Pdf.PdfExport pdfe = new DataDynamics.ActiveReports.Export.Pdf.PdfExport ();
string webrolestorageName = "WebRoleStorage";
string webRoleFileName = "Test.pdf";
LocalResource lr = RoleEnvironment.GetLocalResource (webrolestorageName);
string path = lr.RootPath + webRoleFileName;
pdfe.Export(rpt.Document, path);
|
- You can find the exported PDF file at the following location: C:\Users\stduser\AppData\Local\dftmp\s0\deployment (0)\res\deployment (0).CloudService1.WebRole1.0\directory.
|
Note: The file is available only at the application runtime. |
To set up a local storage resource in a Worker Role partial trust Application
- Open the service definition file (ServiceDefinition.csdef) and add the following tag after <WorkerRole name=”WorkerRole1”>:
Paste into ServiceDefinition.csdef after <WorkerRole name=”WorkerRole1”> |
Copy Code |
<LocalStorage name="WorkerRoleStorage" cleanOnRoleRecycle="true" />
|
- To export to PDF, add the following code into Default.aspx.cs to the button_Click event:
Paste into Default.aspx.cs to the button_Click event |
Copy Code |
NewActiveReport1 rpt=new NewActiveReport1 ();
rpt.Run ();
DataDynamics.ActiveReports.Export.Pdf.PdfExport pdfe = new DataDynamics.ActiveReports.Export.Pdf.PdfExport ();
string workerrolestorageName = "WorkerRoleStorage";
string workerRoleFileName = "Test.pdf";
LocalResource lr = RoleEnvironment.GetLocalResource (workerrolestorageName);
string path = lr.RootPath + workerRoleFileName;
pdfe.Export (rpt.document, path);
|
- You can find the exported PDF file at the following location: C:\Users\stduser\AppData\Local\dftmp\s0\deployment (0)\res\deployment (0).CloudService1.WorkerRole1.0\directory.
|
Note: The file is available only at the application runtime. |
See Also