Integrating Izenda Reports into your application which uses a...

Expand / Collapse
 

Integrating Izenda Reports into your application which uses a master page


This is a 2 part process.

  • First, copy the files into the correct locations in your application
  • Second, tell our pages which master page to use

Step 1: Copying the files

Where do I get the files?

The files are found either in the directory to which you installed them if you used the wizard installer or in the 4 folders of the Izenda Reports ZIP file which you downloaded for a manual installation. Currently, the versions available correspond to these environments:

  • DotNet20CS: ASP.NET ver. 2.0, C# recommended by Izenda
  • DotNet20VB: ASP.NET ver. 2.0, VB
  • DotNet11CS: ASP.NET ver. 1.1, C#
  • DotNet11VB: ASP.NET ver. 1.1, VB

Where do I place the Izenda files?

Now that you have the files, you will only need to copy some of them in order for Izenda Reports to run as a page inside of your application. All of the Izenda Reports files and folders (pages, DLLs, etc) require that the "NT AUTHORITY\NETWORK SERVICE" user under Windows 2003 or the "ASPNET" user under Windows XP has FULL CONTROL file system permissions. This is because the the application runs under the web server's service account. Please note that it can be something different if your Administrator has changed it or you are running Microsoft Exchange on the same server. In most cases, it will not have changed.

You will need these files to allow Izenda Reports to run in your application:

File/Folder Name
Purpose
reportviewer.aspx, reportviewer.aspx.cs page required for end-users to view reports, code behind for this page
reportlist.aspx, reportlist.aspx.cs
page required for listing of reports and categories, code behind for this page
reportdesigner.aspx, reportdesigner.cs page required for created new reports, code behind for this page
Header.ascx, Header.ascx.cs
header page, code behind for this page
Settings.aspx page allows settings changes in Izenda Reports without code changes
Rs.aspx
CAN NOT be altered in any way. response server page used for ajax and other functions
Izenda.adhoc.dll main file needed to run Izenda Reports
Izenda.config configuration file in xml format which settings.aspx uses
Global.asax
file needed to run Izenda Reports. Note: the content of this global.asax can be integrated into your global.asax if you already have one.
"Reports" folder
folder required for storing reports on file system



Directions for copying files:


1. Copy our Izenda.adhoc.dll into your application's bin folder.


2. Copy the Global.asax, Izenda.config and rs.aspx into your application's root folder.


3. Make a subfolder off of your applications root directory called "Reporting".


4. Copy the following files into the "Reporting" subfolder. The Rs.aspx page should be in both root and "Reporting" folders.



  • Settings.asxpx
  • ReportViewer.aspx
  • ReportViewer.aspx.cs
  • ReportList.aspx
  • ReportList.aspx.cs
  • ReportDesigner.aspx
  • ReportDesigner.aspx.cs,
  • RS.aspx
  • Header.ascx
  • Header.ascx.cs


5. Inside of the "Reporting" folder, create a folder in the "Reporting" folder named "Reports".



6. Navigate to the Settings.aspx page. For example, http://localhost/SampleApplicationWebsite/reporting/Settings.aspx . Click on the "Database" tab and set your key and connection string if you have not already done so.

Step 2: Apply your Master Page to the Izenda Reports files

There are two steps to doing this.

Add the "MasterPageFile" attribute


In the page directives of the following files, you will need to add an master page location attribute:

  • ReportDesigner.aspx
  • ReportList.aspx
  • ReportViewer.aspx

You will need to add the attribute to each of the above files, as these files are always seen by an end-user. Add the attribute:


  • Find the page directive, which looks like: <%@ Page language="c#" etc etc... %>
  • Add the location of your master page using this attribute: MasterPageFile="~/DefaultHeader.master"
  • Now, the page directive becomes <%@ Page language="c#" MasterPageFile="~/DefaultHeader.master" etc etc... %>
  • Finally, you may also wish to add a title, using Title="Report Designer"


Wrap the pages content in a placeholder tag


As an example, we will edit the ReportDesigner.aspx. Your master page already has the needed html content. By default, our report designer page contains the following html:

<HTML>
    <HEAD>
<title>Izenda Ad Hoc - Query and Reporting</title> </HEAD> <body> <uc1:Header ID="Header1" runat="server" /> <FORM id="Form1" method="post" runat="server"> <cc1:adhocreportdesigner id=queryBuilder runat="server"> </cc1:adhocreportdesigner> </FORM> </body> </HTML>

Remove all of the html tags and place the remaining Izenda Reports user control into a placeholder following the below example. Remember that the "ContentPlaceHolderID" must be set equal to the ID currently used by your master page.

<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" Runat="Server">
        <cc1:adhocreportdesigner id=queryBuilder runat="server">
        </cc1:adhocreportdesigner>
</asp:Content>  


Follow the same procedure on the remaining pages and your master page should now be applied to Izenda Reports.



Details
Type: How-To
Options