Chapter 6 [ 235 ] • Run reports from EAS • Run reports using EssCmd • Run reports using MaxL • Run reports using API calls (as discussed in Chapter 8) Run reports using EAS Upto now you have learned many tasks that an Essbase developer or administrator can do through EAS. Running report scripts is just one more better example of how you can effectively use EAS. Like we discussed running calc scripts from EAS before, there are also many ways to execute report scripts from EAS. From EAS, drill-down to your Application | Database | Report Scripts and you will see your report script test. Right-click on the test report script and then click on the Execute button as shown: This material is copyright and is licensed for the sole use by Paul Corcorran on 5th July 2009 8601 ave. p #1, , lubbock, , 79423 Download at Boykma.Com Using your Essbase Cube [ 236 ] Once you click the Execute button a dialog box will open which asks if you want to execute the script in the background and send the results to the Console or to the Printer. You can also specify if you want to send the retrieved results to an output le. Isn't this the coolest feature? You can then send this output le to your customers to tell them that your data load and calc are completed and here is what your data now looks like. The output le can be .rpt or .txt le. These are the two options that are provided through EAS. If you wish to save an output le, just provide an output le path and le name and click OK, as shown and the report will then be executed: There are also other ways you can execute a report script from within EAS. For instance, you can open a report script and then click on the Execute button of the Report menu or you can click on Options | Execute in the EAS menu or by pressing the F5 button on your keyboard. Running a report script using an Essbase command script As we have discussed in previous chapters about being able to execute calculation scripts using Essbase command scripts, you are also able to run database report scripts from an EssCmd as well. When you run a report from an EssCmd, you have the option to save the output in an ASCII text le or a formatted report le. EssCmd Syntax: RUNREPT numeric reportscript outputfile • numeric (possible 1, 2, or 3)—species the physical location of the report script. This material is copyright and is licensed for the sole use by Paul Corcorran on 5th July 2009 8601 ave. p #1, , lubbock, , 79423 Download at Boykma.Com Chapter 6 [ 237 ] i) Local/Client based report script. ii) Remote/Server report script. iii) Species that the le is not an Essbase default object and you need to provide the fully qualied path with the name of the report script. • reportscript—name of the report script. This parameter will depend on the numeric value chosen for the rst parameter. • Outputfile—fully qualied name and path for the output le. If no path is specied, Essbase will place the le in the default database folder. OUTPUT 1 "c:\EsscmdReport.log"; LOGIN "EssServerID" "EssID" "EssPass" "ESSCAR" "ESSCAR"; SELECT "ESSCAR" "ESSCAR" RUNREPT 2 "test" "c:/book/test.dat" LOGOUT; EXIT; Once you have executed the above EssCmd at the DOS prompt (as shown in the following screenshot), the output data will be saved in the text le called test.dat, which will be created in the path described. As you can see, we have created a le with a .dat extension, instead of creating an .rpt or .txt le. We just want to make you aware that when you are saving an output le from an EssCmd, you are not obligated to use any particular le extension and may choose any one you wish. Upon the execution of the command, you will see the return code in the form of sts (Status code). If sts is 0, that means there is no error. If the return code is not zero, it will provide you an error message as shown: This material is copyright and is licensed for the sole use by Paul Corcorran on 5th July 2009 8601 ave. p #1, , lubbock, , 79423 Download at Boykma.Com Using your Essbase Cube [ 238 ] Running calc using a MaxL script How can we forget MaxL? There is no way we can forget MaxL. MaxL is the new generation of command scripting language used by Essbase. If you look closely at the MaxL statements, you will see that they are very close to your typical SQL statements. Since you will be exporting data, you will use the EXPORT MaxL statement to run the report script. Syntax: EXPORT DATABASE database name USING LOCAL/SERVER REPORT_FILE report script name TO DATA_FILE output data file name. Code: export database 'ESSCAR'.'ESSCAR' using server report_file 'Test' to data_file 'c:/book/test.rpt'; This code, when executed from MaxL, will execute the Test.rep against the ESSCAR application/ESSCAR database. To create a MaxL script le object, simply open the MaxL Script Editor in the EAS tool by clicking the Editors menu pick, then click on MaxL Script Editor. The MaxL Script Editor is shown in the following screenshot: You can execute the script by clicking on the Execute Script button on the MaxL menu or on the EAS | Execute on the EAS menu or press F5 to execute the script. Once the script is executed, you will see the validation_6.rpt le in the location specied. This material is copyright and is licensed for the sole use by Paul Corcorran on 5th July 2009 8601 ave. p #1, , lubbock, , 79423 Download at Boykma.Com Chapter 6 [ 239 ] Previewing data in EAS Until now you have used EAS to create users, update the outline, load data, calculate the data, and so forth. You will now see how EAS can also be used to preview the data in an Essbase cube. You can preview data for both aggregate storage and block storage databases. You can preview the data in spreadsheet format or in HTML format. Here are the steps to preview data in EAS: 1. In EAS, select the database and click on Actions | Preview data or right-click on the database and select Preview data. 2. On the right side of the EAS frame, you will see the Data Preview Grid screen with two tabs, a Cubeview tab and a Properties tab as shown here: Here, you can see there are two tabs, one is for the Cubeview and other tab is for the Properties. The Cubeview is the view that shows the data and is always defaulted to the Dimension level view. In order for you to look at the lower levels, you will need to drill-down. The properties for the Cubeview can be set in the Properties tab. This material is copyright and is licensed for the sole use by Paul Corcorran on 5th July 2009 8601 ave. p #1, , lubbock, , 79423 Download at Boykma.Com . is licensed for the sole use by Paul Corcorran on 5th July 20 09 8601 ave. p #1, , lubbock, , 794 23 Download at Boykma.Com Using your Essbase Cube [ 236 ] Once you click the Execute button a dialog. 20 09 8601 ave. p #1, , lubbock, , 794 23 Download at Boykma.Com Chapter 6 [ 237 ] i) Local/Client based report script. ii) Remote/Server report script. iii) Species that the le is not an Essbase. is licensed for the sole use by Paul Corcorran on 5th July 20 09 8601 ave. p #1, , lubbock, , 794 23 Download at Boykma.Com Using your Essbase Cube [ 238 ] Running calc using a MaxL script How can