- <%@ Page Language="C#" MasterPageFile="~/masters/m2.master" AutoEventWireup="true" CodeFile="RunReportDemo.aspx.cs" Inherits="RunReportDemo" Title="Untitled Page" ValidateRequest="false" %>
- <asp:Content ID="Content1" ContentPlaceHolderID="m2hcph" Runat="Server">
- link href="css/global.css" rel="stylesheet" type="text/css" />
- link href="css/RunReportDemo.css" rel="stylesheet" type="text/css" />
- </asp:Content>
- <asp:Content ID="Content2" ContentPlaceHolderID="m2bcp" Runat="Server">
- div id="inputOutputFields">
- <div class="row" style="margin-left:30px">
- <asp:Label runat="server" ID="labError" style="margin-left:160px">This
simple demo demonstrates the running of any report on a local
essbase server and with locally installed Essbase Deployment Services. Please, remember to write "password" - for the password text field without the quotes. You can use the example report scripts on the example Application Databases installed with Essbase 7.1.5 , do not use any other login credentials - e.g. for simplicity only the system account with password are used.
- </asp:Label>
- <div class="row" style="margin-left:160px">
- <a href="please here link to example scripts/test/essbase_scripts/"> click here to copy paste other script examples from the <strong>Demo Basic database</strong></a>
- </div>
- <div class="row">
- <span class="label"><span class="asterix"> * </span> Essbase User Name :</span><span
- class="formw"> <asp:TextBox ID="txtEssbaseUserName" runat="server" MaxLength="30" Width="170px"
- ToolTip="Enter your domain name here "></asp:TextBox></span>
- </div>
- <div class="row">
- <div class="row">
- <span class="label"><span class="asterix"> * </span>Essbase Password ( REMEMBER TO FILL IT IN WITH "password" ):</span><span
- class="formw"><asp:TextBox id="txtPassword" runat="server" TextMode="Password"
- MaxLength="30" ToolTip="Enter your password here" Width="169px"></asp:TextBox></span>
- </div>
- <span class="label"><span class="asterix"> * </span> EDS server :</span><span
- class="formw"> <asp:TextBox ID="txtEDSServer" runat="server" MaxLength="30" Width="170px"
- ToolTip="Enter the PRS Server here "></asp:TextBox></span>
- </div>
- <div class="row">
- <span class="label"><span class="asterix"> * </span> OLAP server :</span><span
- class="formw"> <asp:TextBox ID="txtOLAPServer" runat="server" MaxLength="30" Width="170px"
- ToolTip="Enter the PRS Server here "></asp:TextBox></span>
- </div>
- <div class="row">
- <span class="label"><span class="asterix"> * </span> Servlet path :</span><span
- class="formw"> <asp:TextBox ID="txtServletPath" runat="server" MaxLength="70" Width="300px"
- ToolTip="Enter the PRS Server here "></asp:TextBox></span>
- </div>
- <div class="row">
- <span class="label"><span class="asterix"> * </span> Essbase domain :</span><span
- class="formw"> <asp:TextBox ID="txtEssbaseDomain" runat="server" MaxLength="30" Width="170px"
- ToolTip="Enter the PRS Server here "></asp:TextBox></span>
- </div>
- <div class="row">
- <span class="label"><span class="asterix"> * </span> Application</span><span
- class="formw"> <asp:TextBox ID="txtApplication" runat="server" MaxLength="30" Width="170px"
- ToolTip="Enter your domain name here "></asp:TextBox></span>
- </div>
- <div class="row">
- <span class="label"><span class="asterix"> * </span> DataBase</span><span
- class="formw"> <asp:TextBox ID="txtDataBase" runat="server" MaxLength="30" Width="170px"
- ToolTip="Enter the PRS Server here "></asp:TextBox></span>
- </div>
- <div class="row">
- <span class="label"><span class="asterix"> * </span>Cube View Name:</span><span
- class="formw"><asp:TextBox id="txtCubeViewName" runat="server" MaxLength="8000"
- ToolTip="Enter your Command here" Width="70px" Rows="1"></asp:TextBox></span>
- </div>
- <div class="row">
- <span class="label"><span class="asterix"> * </span> Report To Run :</span>
- <span><asp:TextBox id="txtReport" CssClass="txtInformer" runat="server" TextMode="MultiLine" MaxLength="8000"
- ToolTip="Enter your Command here" Width="700px" Rows="10"></asp:TextBox></span>
- </div>
- <div class="row">
- <span class="label"></span><span
- class="formw"><asp:Button ID="ButLogin" runat="server" OnClick="ClickRunReport"
- Text=" Login & Run " Width="100px" ToolTip = " Press the button or hit Enter to login to the POC System"/> </span>
- </div>
- <div class="row">
- <asp:TextBox runat="server" ID="txtInformer" MaxLength="25"
- TextMode="MultiLine" CssClass="txtInformer" Height="600px"
- ></asp:TextBox>
- </div>
- </div>
- <!-- eof inputOutputFields -->
- </asp:Content>
- ///////////////////////////////////////////////////////////////////// CODE BEHIND ..
- using System;
- using System.Collections;
- using System.Configuration;
- using System.Data;
- using System.Linq;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.HtmlControls;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- using Hyperion.Objects.Essbase.Common;
- public partial class RunReportDemo : CustomBasePage
- {
- #region TemplateMethods
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
TEMPLATE METHODS START - protected override void OnInit(EventArgs e)
- {
- base.OnInit(e);
- } //eof OnInit
- protected override void CreateChildControls()
- {
- base.CreateChildControls();
- CreateDynamicControls();
- }
- protected override object SaveViewState()
- {
- }
- protected override void LoadViewState(object savedState)
- {
- base.LoadViewState(((Pair)savedState).First);
- EnsureChildControls();
- }
- protected void Page_Load(object sender, EventArgs e)
- { //comm -- the controls should be generated at the init stage and the databinding happens here
- if (Page.IsPostBack == false)
- { //comm -- databindings here
- //this.DataBind ( );
- } //eof if(Page.IsPostBack == false)
- } //eof Page_Load
- //////////////////////////////////////////////////////////////////////////////////////////////////////////////////
TEMPLATE METHODS END - #endregion //TemplateMethods
- #region CreateDynamicControls
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CREATE DYNAMIC CONTROLS START - private void CreateDynamicControls()
- {
- //set the default values so that the users should not be quessing and copy pasting
- this.DisplaySetDefaults();
- string echo = (string)Session["RunReport.echo"];
- //run the query
- if (this.IsPostBack)
- {
- } //eof if ( this.IsPostBack )
- } //eof CreateDynamincControls
- /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
CREATE DYNAMIC CONTROLS END - #endregion CreateDynamicControls
- #region DisplayMethods
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
DISPLAY METHODS START - private void DisplaySetDefaults()
- {
- txtEssbaseUserName.Text = "your_configured_user_name";
- txtPassword.Text = "your_configured_pass";
- txtServletPath.Text = "http://localhost:8080/EssbaseObjects"; //or whatever
- txtEDSServer.Text = "localhost";
- txtEssbaseDomain.Text = "essbase";
- txtOLAPServer.Text = "localhost";
- txtApplication.Text = "Samppart";
- txtDataBase.Text = "Company";
- txtCubeViewName.Text = "default";
- txtReport.Text = "{TABDELIMIT}" +
- "add here your report!";
- } //eof method DisplaySetDefaults
- private FB.CubeTransaction FromScreenToObj(ref string echo)
- {
- try
- {
- ct.UserName = txtEssbaseUserName.Text;
- ct.Password = txtPassword.Text;
- ct.ServletPath = txtServletPath.Text;
- ct.ReportString = txtReport.Text;
- ct.EDSServer = txtEDSServer.Text;
- ct.EssbaseDomain = txtEssbaseDomain.Text;
- ct.OLAPServer = txtOLAPServer.Text;
- ct.Application = txtApplication.Text;
- ct.DataBase = txtDataBase.Text;
- ct.CubeViewName = txtCubeViewName.Text;
- ct.ReportString = txtReport.Text;
- //TODO : add input check here
- return ct;
- }
- catch (Exception e)
- {
- echo = echo + "An exception ocurred while retrieving the values ! " +
- "Report to Advanced Application Suport the following error : \n" + e.Message;
- return null;
- } //eof catch
- } //eof FromScreenToObj
- private void DisplayResults(ref string msg, ref string echo)
- {
- txtInformer.Text = echo;
- labError.Text = msg;
- } //eof DisplayResults
- ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
DISPLAY METHODS END - #endregion DisplayMethods
- #region DataMethods
- private void RunReport(ref string msg, ref string echo)
- {
- FB.CubeTransaction ct = (FB.CubeTransaction)Session["RunReport.ct"];
- cw.RunReport(ref msg, ref echo, ref ct);
- } //eof RunQuery
- #endregion //DisplayMethods
- #region ClickEventHandlers
- protected void ClickRunReport(object sender, EventArgs e)
- {
- string msg = String.Empty;
- string echo = String.Empty;
- //get the values into the bean
- FB.CubeTransaction ct = this.FromScreenToObj(ref echo);
- Session["RunReport.ct"] = ct; //store them for the PostBack
- Session["RunReport.echo"] = null;
- Session["RunReport.echo"] = echo;
- this.RunReport(ref msg, ref echo);
- this.DisplayResults(ref msg, ref echo);
- } //eof method ClickButLogin
- #endregion //ClickEventHandlers
- } //eof class RunReport
not so active anymore, yet still stuff and code that works in Perl, bash, sh, PLSQL, TSQL, NZPLSQL , XML, HTML, XSL, C#, Scala , Python, Teradata SQL, cmd batch scripts, Oracle , MySql some old Java stuff , Linux , DB2 , Sun Solaris , NSIS , VB 6.0 , some old Essbase VB API and plain English - all this in non-user friendly fashion combined with occasionally strong statements and opinions about IT best practices, Agile Development , energy ... dump end ...Wait - https://qto.fi
Search This Blog
2008-09-02
How-to connect to Essbase cube via asp.net and C# - A generic web based report runner
3 comments:
- the first minus - Comments have to be moderated because of the spammers
- the second minus - I am very lazy at moderating comments ... hardly find time ...
- the third minus - Short links are no good for security ...
- The REAL PLUS : Any critic and positive feedback is better than none, so your comments will be published sooner or later !!!!
About Me
Labels
Blog Archive
- November (1)
- December (1)
- November (1)
- January (3)
- December (1)
- November (2)
- August (7)
- July (1)
- May (3)
- April (1)
- March (5)
- February (1)
- January (1)
- December (7)
- November (1)
- October (2)
- September (3)
- August (4)
- July (1)
- June (1)
- May (7)
- April (5)
- March (3)
- January (2)
- December (3)
- November (1)
- October (5)
- September (3)
- July (3)
- April (1)
- March (4)
- February (4)
- November (2)
- September (5)
- August (3)
- June (3)
- May (6)
- April (8)
- March (1)
- February (4)
- January (1)
- December (5)
- November (4)
- October (7)
- September (3)
- August (3)
- May (1)
- April (2)
- March (1)
- December (5)
- November (5)
- October (4)
- September (4)
- August (1)
- July (13)
- June (1)
- May (13)
- April (14)
- March (10)
- February (7)
- January (3)
- December (4)
- November (3)
- October (8)
- September (5)
- August (9)
- July (4)
- May (10)
- April (6)
- March (11)
- February (4)
- January (13)
- December (19)
- November (15)
- October (32)
- September (16)
- August (26)
- July (37)
- June (34)
- May (26)
- April (32)
- March (26)
- February (8)
- December (2)
- November (5)
- October (10)
- September (17)
- August (6)
- July (15)
- June (24)
- May (26)
- April (29)
- March (18)
- February (26)
- January (16)
- December (7)
- November (16)
- October (4)
- September (10)
- June (3)
- May (21)
- April (4)
- March (13)
- February (3)
- January (14)
- December (12)
- November (1)
- October (3)
- September (6)
- August (2)
- July (4)
- June (4)
- May (3)
- April (11)
- March (11)
- February (16)
- January (5)
- December (22)
- November (23)
- October (5)
- July (14)
Translate with Google Translate
My Blog List
-
Getting the Current TabItem when the Tab is not selected in WPF - [image: Banner] This is a quick reminder to self on how to retrieve a TabItem from a WPF TabControl *when the tab is not currently selected* because I ru...1 week ago
-
Major solar energy project operational in western Michigan - TV reports 11,000 solar panels are installed on a 17-acre plot of land just south of Grand Valley State University's main campus in Allendale. Consumers ...8 years ago
-
-
-
On line 40 there is a reference to the hyperion objects. Is there an sdk for this? What is the dll name I need and can I take it off of the server where a standard install was done on a windows box?
ReplyDeleteWhat refenece do I need to add for Hyperion.Objects.Essbase.Common; ?????
ReplyDeleteyou needo to download the dll file(s) from the Essabase API and add "using Hyperion.Objects.Essbase.Common; "
ReplyDelete