Documente Academic
Documente Profesional
Documente Cultură
BusinessObjects 11 Windows
Designers Guide
Copyright
Copyright 2004 Business Objects. All rights reserved. If you find any problems with this documentation, please report them to Business Objects in writing at documentation@businessobjects.com.
Trademarks
Business Objects, the Business Objects logo, Crystal Reports, and Crystal Enterprise are trademarks or registered trademarks of Business Objects SA or its affiliated companies in the United States and other countries. All other names mentioned herein may be trademarks of their respective owners. Contains IBM Runtime Environment for AIX(R), Java(TM) 2 Technology Edition Runtime Modules (c) Copyright IBM Corporation 1999, 2000. All Rights Reserved. This product includes code licensed from RSA Security, Inc. Some portions licensed from IBM are available at http://oss.software.ibm.com/icu4j.
Use restrictions
This software and documentation is commercial computer software under Federal Acquisition regulations, and is provided only under the Restricted Rights of the Federal Acquisition Regulations applicable to commercial computer software provided at private expense. The use, duplication, or disclosure by the U.S. Government is subject to restrictions set forth in subdivision (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at 252.2277013. Business Objects owns the following U.S. patents, which may cover products that are offered and sold by Business Objects: 5,555,403, 6,247,008 B1, 6,578,027 B2, 6,490,593 and 6,289,352. 307-10-610-01
Patents
Part Number
Contents
Chapter 1 Introduction 3 Using the SDK Java tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Before you start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Chapter 2 Navigating through folders 5
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Navigating through folders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Navigating through folders to list Web Intelligence document in the CMS . . 7 Searching for and listing universes in the CMS . . . . . . . . . . . . . . . . . . . . . . 9 Chapter 3 Viewing a Web Intelligence document 11
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Opening a Web Intelligence document . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Selecting a WebIntelligence report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Setting a pagination mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Setting the image viewing callback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Displaying the report in HTML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Chapter 4 Detecting and refreshing prompts 19
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Detecting a prompt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Retrieving available prompts in the document . . . . . . . . . . . . . . . . . . . . . . 21 Retrieving a list of values (LOV) for prompts . . . . . . . . . . . . . . . . . . . . . . . 22 Setting values to a prompt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Chapter 5 Drilling in a document 25
Contents
Drilling on a dimension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Retrieving and populating the Drill Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Chapter 6 Saving a Web Intelligence document 31
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Saving a document in Personal and Corporate categories . . . . . . . . . . . . . 32 Chapter 7 Creating a Web Intelligence document 35
Introduction
chapte r
Retrieve the list of Web Intelligence documents and universe files available in the repository. Refresh Web Intelligence documents. Manage prompts Activate drill mode, specify drill on a dimension, and filter on dimension values. Save a document and set the documents properties. Create and save a new document.
ssio : This object is created when the user completes n a successful login. R epor tEngine : This object is created when the user completes a successful login and is stored in the users jsp session variable. IS ss ionMgr : This object is created when the user completes a e successful login and is stored in the users jsp session variable. IIn Sto : This object is created when the user completes a fo re successful login and is stored in the users jsp session variable. IE te rp n riseS e
Refer to the file login.jsp for information on these objects. Syntax specific to each tutorial is described before the code examples. For explanations of all other syntax, refer to the REBean Reference Guide. A document can be opened in 2 different ways:
When a document is refreshed, a new storage token is created. This token can be used in another jsp page. Opening a document using a storage token provides better Web Intelligence server performance than using a document ID. Refer to the Customizing Web Intelligence with REBean guide for more information.
chapte r
Overview
This chapter describes how to navigate through folders in the Central Management System (CMS), and retrieve a list of documents and universes. Before running this tutorial, you must understand how to navigate through folders and categories to search for Web Intelligence documents and universes using InfoView. The code used in this tutorial to navigate and view available Web Intelligence documents can be found in docNav.jsp. The code to navigate and view available universes can be found in unvNav.jsp. The following table helps you keep track of your position in the tutorials. The current stage is highlighted. Stage Navigating through folders Viewing a Web Intelligence document Detecting and refreshing prompts Drilling in a document Saving a Web Intelligence document Creating a Web Intelligence document You learn how to... Navigate through folders to retrieve a list of Web Intelligence documents and universes. View, refresh and navigate through a Web Intelligence document. Retrieve a document that contains prompts, refresh and set the document prompts. Activate drill mode on a document, drill or filter on a dimension. Save a document. Create a new Web Intelligence document and save it.
Learnin g objective
In this chapter you will learn how to program the following:
Query the CMS to retrieve folder information. Navigate through folders Retrieve a list of Web Intelligence documents from the CMS. Retrieve a list of universes from the CMS.
In this tutorial, when you open a folder, available sub folders and Web Intelligence documents are listed. The code used to browse sub folders and retrieve the documents and universes is described below.
2. 3.
Retrieve the II nfoO jec ts representing sub folders contained in the b top folder. Create links to docNav.jsp for each sub folder, pass the ID of the folder to be navigated in the sID parameter. Retrieve and list the IInfoO jects representing Web Intelligence b documents contained in the top folder.
4.
Navigating through folders Navigating through folders to list Web Intelligence document in the CMS
Note: In these tutorials, the ISessionM r, IInfoS g tore , ReportE ngine and IU rInfo objects are created when the use logs in (login.jsp) and se stored in the users jsp session attributes for later use. These objects are retrieved when necessary using s ssi on e t trib te e .g tA u ( attr u ib t eName ). By querying on the SI_ID , for a specified kind (CeKind.F OLDER ) only the top or root folder is returned. To query for a list of sub folders, SI_PARENTID is used in the query. The result of this query is used to create the navigation mechanism. The following code shows the navigation functionality in docNav.jsp. Example: The navigation functionality in docNav.jsp.
sQuery = "SELECT SI_I D, SI_NAME SI_PARENTID FRO M , + CI_INFOOBJ ECTS W H ER E ( SI_PARENTID = " + iID + " A N D SI_KIND = ) \'" + CeK ind.FOLD ER + "' ORDER BY SI_NAME ASC " \ ; IInfo Objects subF olde rs = (II nfo b c O je t s) iI f query(sQ ue ); n. ry in iSiz = subF t e older s.sz ( ; i e) .. . fo (int i= ; i< ize; r 0 iS i+ ) { + IF old er iF ld = (IF old er)subFol de s e r .g t (i ; ) .. . <% <A HREF="docN av p s ID=<%=iFl d.g tID )%>" .js ? e (
Navigating through folders Searching for and listing universes in the CMS
.. } .
(j ; )
Note: Web Intelligence documents are represented by an IInfoObject in the CMS, their is no specialized object such as IFold er used for folders.
You select objects from CI_APPOBJECTS to navigate to and list universes. To navigate and list documents, IInf oO jects are retrieved from b CI_INFOO BJECTS . The Root folder ID for Universes is 95
Navigating through folders Searching for and listing universes in the CMS
The following code is taken from from unvNav. jsp shows how to retrieve the top folder of the universe file structure in the CMS. Note that although the query searches in CI_APPOBJECTS, it is still an object of SI_KIND , CeKin d.FOLDER that is being searched for. Example: Retrieve the top folder of the universe file structure in the CMS.
String sQ uery = "SELECT SI_ID SI_NAME, SI_PARENTID FROM , CI_APPOBJECTS W H ER E ( S ID \'" I_ = + iID + "' ) A N D SI_K IN D = \ \'" + CeK ind.FOLD ER + "' ORDER BY SI_NAME ASC " \ ;
To query for a list of sub folders, SI_PARENTID is used in the query in the place of SI_ID .
ge() tj;
chapte r
Overview
This chapter describes how to view a Web Intelligence document. The following table helps you keep track of where you are in the tutorial. The current stage is highlighted. Stage Navigating through folders You learn how to... Navigate through repository folders to retrieve a list of Web Intelligence documents and universes. View, refresh and navigate through a Web Intelligence document. Retrieve a document that contains prompts, refresh and set the document prompts. Activate drill mode on a document, drill or filter on a dimension. Save a document. Create a new Web Intelligence document and save it.
Viewing a Web Intelligence document Detecting and refreshing prompts Drilling in a document Saving a Web Intelligence document Creating a Web Intelligence document
Learnin g objective
In this chapter you will learn how to program the following:
Open a Web Intelligence document. Select a report to view from the list of available reports. Set a pagination mode to display a specific page in full page mode. Set the callback script for image viewing Display the results in HTML
R epor ts cdzR ports = cdzDocum en etR e t.g e R eport cdzRep or = cd zR o t ep rts .g tIte ( e m
The code below shows how a report is opened to a specific page requested by the current user. Once the page has been set, the document has changed state (see Chapter 3: Opening a Web Intelligence document); a new storage token is retrieved so the user can navigate through report states, that is to say, undo or redo changes that have been made to the document. Example: Setting the report page and status navigation
Strin g strPage = getNonNu llV e( re u alu q est. getParam ete a r("p g e", " ) ) "; .. . PageNavi ga n cdzPageN vigation = tio a cdzR epor t.g ag eN etP avigat io (); n if (s trP ag u e.eq a ls(C_STR _PAGE_FIRST)){ cdzPageN av a ig tio n. i s( fr t ); //S t strE e ntry to so a new sto g ra e to e k n is cre ted a strE try n = "; " } .. . els if (strP g e a e .equals( C_STR_PAGE_PREVIOUS )){ cdzPageN av a ig tio n.p io us) rev (; // Remembe th t a new tok n is requ r a e ired strE try n = "; " } .. . if (strE ntry u als " ) .eq ( ") //G et st ora e to ken g strE try n = cdzDo cum ent.g etS rag eT to oken();
Note: The document cdzDocument is retrieved in retrieveReDoc.jsp, see Chapter 3: Selecting a WebIntelligence report for more information. Note: The variables C_STR_PAGE_FIRST, C_STR_PAGE_PREVIOUS etc. are declared in wistartpage.jsp.
The following code example from view_doc_HTML.jsp shows how to set an image callback script so charts can be displayed correctly when a report is viewed in HTML format. Example: Setting an image callback script
Image cdzIm cdzIm cdzIm Option cdzImageO ption = cdzDocume nt.g etIm ageO ptio n( ; ) ageO ptio n.setIm geC a allba ck("view _ im age.js p"; ) ageO ptio n.setIm geNameHo lder("im ge ) a a "; ageO ptio n.s tS e to rageToke nH older(" en " try );
chapte r
Overview
This chapter describes how to detect prompts in a Web Intelligence document, and to retrieve and set the prompts contained within it. The following table helps you keep track of where you are in the tutorial. The current stage is highlighted. Stage Navigating through folders You learn how to... Navigate through repository folders to retrieve a list of Web Intelligence documents and universes. View, refresh and navigate through a Web Intelligence document. Retrieve a document that contains prompts, refresh and set the document prompts. Activate drill mode on a document, drill or filter on a dimension. Save a document. Create a new Web Intelligence document and save it.
Viewing a Web Intelligence document Detecting and refreshing prompts Drilling in a document Saving a Web Intelligence document Creating a Web Intelligence document
Learnin g objective
In this chapter you will learn how to program the following:
Detect prompts in a document. Retrieve a list of prompts to be filled. View and refresh the list of values (LOV). Set the prompts in a document.
Detectin g a prompt
In this tutorial, prompt detection, filling and setting is achieved by repeat passes through refresh.jsp and associated files. On the first pass, a document ID or storage token is passed to the jsp script, which opens the corresponding document using the ReportEn gin . If the current user has e the appropriate rights, prompts are detected by refreshing a document. Prompts
are detected by calling Docum en sta nce.getM us illP tIn tF r prompts are detected the method getProm ptsHtml in processTC_Prompts_methods.jsp is called.
om pts( ). If
The method getPromp tsHtml generates a form containing the list of prompts with their current values in HTML text boxes, and buttons permitting the user to view List Of Values (LOV) values assigned to a prompt. When prompt values are filled, the user is redirected to refresh.jsp, prompt values are passed via the parameter string. If the document contains nested prompts, getPrompts Html is called recursively until all prompts are filled.
Detecting and refreshing prompts Retrieving a list of values (LOV) for prompts
Retrieve the List Of Values (LOV) for the prompt Parse all values in the LOV
The user now has a list of values they can select from for the prompt. The following code is taken from processTC_Prompts_methods.jsp. Example: Retrieving LOV from a document
//R t rie e th L e v e ist Of Values (LOV) fo th pr om r e pt. Values cdzLov Values = cdzLov. getA al ue ( ; llV s) / P rs a / a e ll valu es in th e LOV. fo (int iV ueIndex = 0 r al ; iV alu eIndex < cdzL ovV alues.get Count(); iV alueI ndex++) { S g trin strL ov Valu e, strCom plet eLovValu e; / For a m / ulti column LOV. i (c dzLovVal ues.isM ltiColum s( ) f u n ) { RowVa lue objR owValue = cdzLo vV alues. getRowVal ue(iV alu eIn e ); dx strLo vV alue = objRowV alu .g tI e e tem (0); o jS ringB b t uff erCom ple teLovValu e.setL en gth0; () / D splay ea ch value /row a the c n a te a n / i s oc n tio o th f e //v l ue o ea ch colum a f n of the row. fo (int iRow ValueInd ex = 0; iRowValue Index < r objR wV o alue.g etC ount(); iRowVa lueIndex ++) .. .
} e e ls { }
strLo vV alue = cdzLovV alu es.get Value(iV alueInde x) ; strCo mpleteLo vV alue = strLovV lu ; a e
Once
the
user
has
entered
values,
call
the
//The
(above)
Lov cdzL ov = cdz Docum ent .getLOV( strL v , o Id LovType. LOV_OBJECT ); // Set each nest ed prom pt Prompts cdzPromp tsNested = cdzLo v.g est etN int iPro mptNeste dCount = cdzProm ptsN ste e d setProm ts(req e st cdzP romptsNe ste , p u , d iPromptN estedCou nt s , trP re ix; f ) // The nested pr om pts ha ve been fille d cdzLov.s etN ested Prom pts( ); edPrompt s(; ) .getC oun t( ; )
Drillin g in a document
chapte r
Overview
This chapter describes how to activate drill mode, then drill or filter on a dimension in a report. The following table helps keep track of where you are in the tutorial. The current stage is highlighted. Stage Navigating through folders You learn how to... Navigate through repository folders to retrieve a list of Web Intelligence documents and universes. View, refresh and navigate through a Web Intelligence document. Retrieve a document that contains prompts, refresh and set the document prompts. Activate drill mode on a document, drill or filter on a dimension. Save a document. Create a new Web Intelligence document and save it.
Viewing a Web Intelligence document Detecting and refreshing prompts Drilling in a document Saving a Web Intelligence document Creating a Web Intelligence document
Learnin g objective
In this chapter you will learn how to program the following:
Before drilling in a document Activate drill mode. Drill on a dimension. Apply a filter on a dimension value.
Before drilling
Before drilling in to a document certain operations have to be completed. The document has to be opened, contexts and prompts filled. It is also necessary to validate that the user has the right to drill in to documents. For information on opening documents and prompts see Chapter 3: Viewing a Web Intelligence document and Chapter 4: Detecting and refreshing prompts respectively.
Drill rights are part of a users Web Intelligence rights. In these tutorials the CeW ebInt ellig n e c eR ightID .DRILLMO right is validated when the user DE logs in (login.jsp) and added to the jsp session attribute "userRights". See rights_method.jsp:checkO bjectR ig ht to see how this is done. Before drilling in to a document, you must validate that the current user has the right to use the drill functionality. The following code is taken from view.jsp. Example: Validating the current users right to drill a document
// f (DRILL_MODE = f ls ), the docum I ae ent cannot //b d played e is Ha ta le sh b rig ts h = (H ashtab le)s s i on e t trib te es .g tA u ( "u serR igh ts ) "; boolean bC rill anD = ( Boolean ) ( rig ts h .g et("DRIL L_MODE") ).b o o lea nV lu a e(); if ( bCan rill) ! D response .sendRed ir c e t( "../ r o r_cantD illDocum en tm er r t.h l"
);
ProcessTC_Drill.jsp
//tu rn to A nalys is m ode cdzReport = cdzD ri l no .beginD il(; lI f r l) .. . cd D z rill In fo = (Dr n illI f o) cdzR epor t.getNam ed te In rf ac (" ri llI f " ; e D no ) .. . //S t th dill e e r op n tio Dr p illO t ion cdzD rillO pti on = cdz Drll no iIf .g tD e ril cdzD rill Op n tio .s etC a ckFrame( "view allB repo rt ) ";
lO tio p n(
);
S g strD llU trin ri rl = "re esh ? re o fr .jsp p rt= " + strR ep ortIn e ; dx cdzD illO tio n.s tC l lB r p e a ackScr ip trD t(s r illUl) r; s r illU trD rl = "viewTC Doc_ambi gu u ril lForm o sD .js p?rep ort =" + str Rep ortIn de ; x cdzD illO tio n.setA b iguousD illC a ck c t (s Dil r p m r allB S rip tr r lU rl); cdzD illO tio n.se lo ckH r p tB older (" r b d ill_ lo k c "); cdzD illO tio n.setFro mH r p older( "dill_r r f om "); cdzD illO tio n.s tDi llAction Ho e r p e r ld r("d ri l a t l_c io " n ); cdzD illO tio n.s t i r p eFl terH olde r( dill_ "r fi t r ) l e"; cdzD illO tio n.setToH old r(" r p e d rill_ " ; to ) cdzD illO tio n.s tH r p e ie rarchyHo ld r d e (" ri ll_ _ i erarch " ); to h y cdzD illO tio n.s tS r p e to rageToke nH older(" en y ); tr "
Drillin g on a dimension
When a document is displayed for drilling, the current user chooses a dimension on which to drill. When the drill action has been called, define the drill path and set the hierarchy to allow the drill action programatically. The following code is taken from processTC_Drill.jsp. Example: Drilling on a dimension
//D f in th drl e e e il pa th and execute the di l rl es l e if (strD rillA ti on n t h() != 0 c .le g ) { cd r illP zD ath = cd ri llIn o e zD f .g tD a th) rillP (; cdzD illP th r a . setB lock ID (strD ri llB c ); lo k D rill Elem ents cdzD ril lFrom lem ents = E cdzD illP th getFrom ); r a . ( Drill From Elem ent cdzD rillFrom lem E ent = (D lFromEle men ) cd zD ril t rillFro mElem ent s.a d ; d () fo r { (int iFro mIndex iFrom Index++) = 0; iF rom Index < iFromCou nt ;
cdzD illFrom lem r E ent.s etO bjectI D( astrD rillF m s[iFrom ro In de ]); x i (i From f Index < i i terC Fl ount) { cdzD illFrom lem t.se tF r r E en ilte ( astrD ri l i t l Fl ers[iF m In ex ro d ]); } i (iToC f ount != 0 ) { D rill Elem ents cdzD rill ToE en ts = lem cdzD illP th ge o r a . tT (); fo r { (int iToI ndex = 0 iT Ind ; o ex iToIn dex++) D rill ToElem ent c z ril dD < iToC ou t; n
lToEleme nt =
} } if (strD rillA ti on q al s("dow c .e u n")) { cdzD rill Path .set Actio n(D rillA tio c } cd D z rill In .ex cu D fo e te ril l( ; )
(D rillTo Elem t) cdzD en rill ToElemen ts d (); .a d cdzD rill ToElemen t.setO je ctID as Dil b ( tr r lT o s[iT In ex o d ]); // S tti ng th hierarch e e y id i mandato s ry cdzD rill ToElemen t.se ie tH r archyID as D ( tr r il lToH iera rch ies[iT oIn e ]); dx
nType.DOWN );
} DrillD im en n sio s cdzD rill Dim ensio nsFree = cd D z rill Info et Fre D .g e ril lDimensi on ( ; s)
Note: The function ge tD rillD mensions Htm is used to create a drop i l down combo box containing D Dim rill ensio ns that are not in the Dil lBa r. r
chapte r
Overview
This chapter describes how to save a Web Intelligence document. The following table helps you keep track of where you are in the tutorial. The current stage is highlighted. Stage Navigating through folders You learn how to... Navigate through repository folders to retrieve a list of Web Intelligence documents and universes. View, refresh and navigate through a Web Intelligence document. Retrieve a document that contains prompts, refresh and set the document prompts. Activate drill mode on a document, drill or filter on a dimension. Save a document and set document properties. Create a new Web Intelligence document and save it.
Viewing a Web Intelligence document Detecting and refreshing prompts Drilling in a document Saving a Web Intelligence document Creating a Web Intelligence document
Learnin g objective
In this chapter you will learn how to program the following:
Save a Web Intelligence document. Reopen the document and set properties.
Save the document in a corporate folder with a new name. Attach the new document to the users personal root category. Attach the new document to corporate categories
Saving a Web Intelligence document Saving a document in Personal and Corporate categories
Note: This tutorial will not overwrite a document with the same name in the same folder. The following code is taken from save.jsp. Example: Save a document copy in a folder and attach specified categories.
IInfoO bj ec ts p so alC er n at eg ries = n ll; o u .. . // CeSec urity . Folder.P ERSONAL_ ID CATEGORY is t e pare t h n // fo e ld r fo ro ot p r erso nal cate go ry obje ct s Strin g sQuery = "SELECT SI_ID FROM CI_INFOOBJECTS W H ER E + (SI_N AM E l k i e '" + us erName + " ') A N D (SI_PA RENTID = " + CeSecu rity .F older.PE RSONAL_CA ID TEGORIES + " ) A N D SI_KIND = \ '" + CeKind. PERSONAL CAT + "'" \; perso al Categ ri es = (II nfo b c ts) iI f query(sQ ue y n o O je n. r ); .. . //R trie ve P e erso nal Cate gory Ve to c r objC ist atL = new Ve to ( ; c r ) ICategory iP erso nalC at = (IC atego ry)p erso nalC ateg or s e t( ) ie .g 0; In g r te e iCatID = new In eger (iP rso alC t e n at .g tID e () ); objC i st.a d atL d (i Ca ); tID .. . //R trie ve C e orpo rate c t egory a Ve to c r objC or pL atC ist = new Vect or ) (; .. . ICategory iCorpC at = (ICateg ory )ca g rie s.g t( ) te o e 0; In g r te e iCatCorp ID = new In g r ( iCorpCa t.g tID )) te e e ( ; objCatCo rp ist.a dd(iCatC orp ); L ID .. . //Save the docum en t cdzDocum ent.save As(strN me o a ,iF ld erID , (L t )o jC tL is b a ist ,(L t )o bjC or pL t) is atC is ; .. . //Open the docum en p t rev io sly saved u cdzDocum en = cd zReportE ng e.o enDocumen t(strN t in p am e, Strin .v alueO g f(i Docum ent .g tID e () ), " o o ra ", "wid ) c rp te "; //S t th p p r ties d in e e ro e ef ed by the u ser Pro e p rti es strD cProps = cdzDocu me t.g tP ro e o n e p rtie s(; ) strD ocPr op .s tP ro erty s e p ( Pro e p rti esType.K EY W O R D,strKeywo rd ) S s; strD ocPr op .s tP ro erty Pro e s e p ( p rti esType.DE SCRIPTION , strComme nt ) s; cdzDocum en e t.s tP ro e p rtie s(strD oc Pro s); p
Saving a Web Intelligence document Saving a document in Personal and Corporate categories
chapte r
Overview
This chapter describes how to create and save a new Web Intelligence document. The following table helps you keep track of where you are in the tutorial. The current stage is highlighted. Stage Navigating through folders You learn how to... Navigate through repository folders to retrieve a list of Web Intelligence documents and universes. View, refresh and navigate through a Web Intelligence document. Retrieve a document that contains prompts, refresh and set the document prompts. Activate drill mode on a document, drill or filter on a dimension. Save a document and set document properties. Create a new Web Intelligence document and save it.
Viewing a Web Intelligence document Detecting and refreshing prompts Drilling in a document Saving a Web Intelligence document Creating a Web Intelligence document
Learnin g objective
In this chapter you will learn how to program the following:
Create a Web Intelligence document. Define parameters for the document. Save the newly created document in the CMS.
Creatin g a document
The following code example shows how to run the document viewer java applet in an HTML page. It contains a list of parameters that apply to the Web Intelligence server. In this tutuorial the java applet is used to create a new document. The following parameters are set to run the applet that are specific to document creation:
server instance is created by calling . DocumentID: a string containing the unique ID for the target document. To create a document an empty string is passed. UniverseID: A string containing the CUID for the universe to be used to create a document. A CUID is a unique identifier for an object in the central management system (CMS). The UniverseID string is set in the following format UnivCUID=CUID value for universe. Save As: A link to the JSP page which generates a form used to gather information used to save the document.
rIn n e sta c
To create a new document, pass an empty string as the docID parameter. Before you save a document, the document does not exist in the CMS, thus, the document has no ID. When you save a new document in this tutorial, a save page appears. Enter the document title and description information. This information is sent back to the applet which in turns tells the Web Intelligence server to save the document. The server now creates an IInfoObje ct containing the document with the information that has been passed. The following code is taken from CreateWebiDoc.jsp. Example: Running the Web Intelligence applet
docum ent .w ln rite ( '<APPLET name="w ebiA pple t" + embed_size_ atr + ' t 'codebas e=" <%= req est .g etC n t Path u o tex () %>/ creating WebiDoc/ webiA ppl et" /' + 'archi ve= hin Cadenza. jar" ' "T + 'code= "com .bus inessob ec .w . tc.TCMain "> ' j ts p + '<param name=" Isa i" p value= <%= currP ath % >cd zS let" ></param >' " erv + '<param name=" Se e rv r" value= <%= reque st.g tS rverName() " e e % >"></ param >' + '<param nam e=" Protocol" value= "http"> / param < >' + '<param name=" Po rt" value= <%= reque st.g tS rv rP rt() " e e e o % >"></ param >' + '<param name=" Type" v lue="sig ned"></pa ram>' a + '<param name="We iS ss ion" b e value= <%= strW Session %>">< " I /par am>' + '<param name=" CdzS essi on" value= <%= insta nceID % >"></param >' " + '<param name=" Document ID" valu e="<%="" %>"> </par am>' + '<param name=" Un e iv rse ID" value="U nivCUID= <%=webiU niv rse e .g etCUID() %>"> </param >' + '<param name=" bRobot" valu "f alse"> /p aram e= < >' + '<param nam e=" bTraceIn LogFile" value= "f alse"> / param < >' + '<param name=" HelpR oot" value= <%= reque st.getC nte tP th () u s " o x a .s b t rin (1 g ) %>"> </param >'
+ '<p aram name="SaveA s" value ="<%= re qu est .g tC n tP ath e o tex () %> /c e tingWebi Do v ra c/sa e .jsp fo ? ld erID= <%=iF olderID % >&unvId =<%=sID % >"></param >' + '<p aram name="Lang" value ="<%= re qu s .g tA u et e ttrib t e( " n " la g ) % >"> < ar am>' /p + '</ APPLET>' ) ;
You can use the liveConnect technique to call an applet using javascript. See http://java.sun.com/products/plugin/1.3/docs/jsobject.html and http://www.sislands.com/javascript/week9/java/example.htm for more information.
Index
C
categories 32 corporate 32 personal 32 categories example 33 CESDK navigating 7 searching 7 CMS query objects 8 searching 7
L
LOV prompt 22
N
navigating 7
P
pagination example 15 mode 15 prompt detecting 20 LOV 22 retrieving 22 retrieving example 22 retrieving 21 retrieving example 21 setting 22 setting example 23 values 22
D
document example opening 13 opening 13 saving 32 searching 7 documents listing 9 drill 27 activating 27 activating example 27 dimension 28 dimension example 28
R
report 14 display html 17 displaying 17 example 14 HTML 17 opening 14, 14
F
folders navigation 7, 8 retrieve current 8 retrieve subfolders 8
S
saving 33 searching 7
I
images 16 example callback 16 viewing 16
U
universe
DRAFT
39
Index
searching 9
W
WebIntelligence opening 13 searching 7
DRAFT