Webfocus Basics Tutorial

26
Hey Buddy… Don’t worry… Here is some useful stuff from ramkumarn.com on Webfoucs basics… This is the very first tutorial… You defenitely can expect much more very sooooon.. Is It !!!!!!!!! That’s definitely a Great news… Am Eager to go through…. Happieeee… Happieeeee…

Transcript of Webfocus Basics Tutorial

Page 1: Webfocus Basics Tutorial

Hey Buddy… Don’t worry… Here is some useful stuff from ramkumarn.com on Webfoucs basics… This is the very first tutorial… You defenitely can expect much more very sooooon..

Is It !!!!!!!!! That’s definitely a Great news…

Am Eager to go through….

Happieeee… Happieeeee…

Page 2: Webfocus Basics Tutorial

Webfocus Basics

http://www.ramkumarn.com

Page 3: Webfocus Basics Tutorial

Hey Techies !!! Webfocus – So what's that?

To say simply - Webfocus is a BI tool.

Oh Oh Oh !!! What’s BI ? Business Intelligence… Move on to Next Page…

Before Which…Before Which…

In the words of Grzegorz Swietlik

“Webfocus is the reporting engine that turns corporate data into meaningful information, complemented with Web components for presenting information and interacting with end users. “

http://www.ramkumarn.com

Page 4: Webfocus Basics Tutorial

Hmmm… So What is BI ?• BI is an art of making your customers to do better, than they do

themselves. - Activities include decision making support, query and reporting, online analytical processing, statistical analysis, forecasting, and data mining.

• Need of BI– Database Compatibility – Scalability– Adhoc Reporting– Presentation Format– OLAP Support– Integration with existing Web-applications– Security

http://www.ramkumarn.com

Page 5: Webfocus Basics Tutorial

Samigoooo.. Here is the WF Architecture…

http://www.ramkumarn.com

Page 6: Webfocus Basics Tutorial

Webfocus Anatomy…

Nothing Nothing… Jus to say following are the organs of Webfocus… The Webfocus server and Client are like

heart and Lungs of Webfocus architecture…

ü Internet Explorerü Internet Explorerü Web Serverü WebFocus Clientü WebFocus Reporting Serverü Report Caster

üDistribution Server – Scheduler Componentü Managed Reporting Environment

üBusiness Intelligence Dashboardü Resource Analyzer & Governor

http://www.ramkumarn.com

WebFocus Products - To develop Web-based reporting applications, WebFOCUS provides integrated Java-based development tools that are seamlessly integrated with the WebFOCUS server-side software components. WebFOCUS enables Developers to prototype, test, and deploy Web-based reporting applications quickly, without requiring knowledge of HTML, Web server administration, or the FOCUS 4GL reporting language. The WebFOCUS Business Intelligence Dashboard is an HTML-based thin client that allows you to create a customized user interface for access to WebFOCUS Managed Reporting. Managed Reporting Environment- An optional product that provides a streamlined reporting environment in which users can create and save reports that meet their business needs without knowing the details and complexities of the underlying database or of the FOCUS reporting language. To protect sensitive or confidential data, Managed Reporting permits only authorized users access to the information they need, while restricting unauthorized users from corporate data. ReportCaster is an optional Java-based tool that provides a single point of management for report scheduling and distribution via the Web, e-mail, Managed Reporting, or a printer.ReportCaster enables you to provide essential, updated information directly to the people that need it, on time, automatically. WebFOCUS Resource Governor protects mission-critical enterprise systems and data with preemptive query governing based on past performance and a complete query management environment. WebFOCUS Resource Analyzer offers powerful,unique performance-monitoring,management,and optimization tools that help your BI applications operate at peak efficiency. With Two-Way Email, mobile business professionals have access to their company’s enterprise data, from any location, at any time.
Page 7: Webfocus Basics Tutorial

Webconsole – Most Imp Thing on WF – So whatz that ?

• Webfocus Utility that helps in– Editing/Executing Code Files– Setting Server/Client Configurations– Overall monitoring of all the process that run in the

serverside

• WebConsole is used to Manage :-– Data Adapter`– Procedure(Fex Codes)– WorkSpace

http://www.ramkumarn.com

Page 8: Webfocus Basics Tutorial

Fex – Oops !!! What is that ?

• The code that is created using Webfocus Tool is called Fex

• File extension is (*.fex)

• The Fex code can be created and executed via – Webfocus Developer Studio (Report painter and other

GUIs)– Webfocus Console

Fex>>FOCEXEC >>Webfocus Executablehttp://www.ramkumarn.com

Page 9: Webfocus Basics Tutorial

Hey Buddy… What will Happen If a Fex file is executed ?

Usually, The purpose of the FEX code is to query/fetch the data from some database, format it, manipulate it and present some useful stuff to the User…

The Following Two Files will be created in the Webfocus server whenever a Fex file is executed

• MASTER File(*.mas)– A Master File describes a data source using a series of declarations

(almost kind of Metadata)– FIELDNAME = EMP_ID, ALIAS = EID, ACTUAL=A4,$– FIELDNAME = EMP_NAME, ALIAS = ENAME,ACTUAL=A50,$

• FOCUS File(*.ftm) (Raw data File)• The actual data (i.e the Resultset of the query).

http://www.ramkumarn.com

Page 10: Webfocus Basics Tutorial

A heads up…Do I need to know the Syntax of all FEX stuff?

The answer is “definitely NOT”…

Then ???Practice with Developer Studio on various reporting options and GUIs… You will be given with the FEX options and GUIs… You will be given with the FEX

code, generated as code behind.

Yipeeee… So Just the Drag and Drop stuff.. Aha ? Am Happppieeee…Thanks Buddy…

Hellaoo… Wait… Wait… But understanding the FOCUS reporting language helps to realize what is

going on behind the scenes.

Page 11: Webfocus Basics Tutorial

Okieee…Okieee… So what is that I have to learn as my First FEX lesson…??

Nothing but the Table File and SQL Query

Thatz ok Man… I can definitely do that… Come… !!! Let us Go…

http://www.ramkumarn.com

Page 12: Webfocus Basics Tutorial

For you my Pal…A much Simple Report…

TABLE FILE CARPRINTCOUNTRYCARCAREND

This is the simplest Fex code that anyone can write as a “Hello world” in webfocus. This Fex uses the CAR hold file (already available in webfocus) and print the country

and car columns in Tabular Format.

http://www.ramkumarn.com

Page 13: Webfocus Basics Tutorial

Overall Structure of a TABLE Request… Anyways many of them are

optional… But are needed often…TABLE FILE data_source

[ print_phrase ]

[ sort_phrase ]

[ filter_phrase ]

[ output_section ]

[ styling_section ]

END http://www.ramkumarn.com

Page 14: Webfocus Basics Tutorial

data_source

Specifies the name of the configured synonym, which will be used as the data source for the report.

Example

TABLE FILE CAR (use CAR synonym as the data source)

Phrase By Phrase… Jus a quick View Through…

print_phrase

Specifies the fields from the data source to be printed within the report. Similar to the SQL SELECT statement.

TABLE FILE CAR PRINT * END

PRINT

http://www.ramkumarn.com

Page 15: Webfocus Basics Tutorial

TABLE FILE CAR SUM SALES AS TotalAVE RETAIL_COST MAX DEALER_COSTEND

sort_phrase

SUM, AVE, MAX, MIN

BY

TABLE FILE CAR SUM SALES BY COUNTRY BY CARBY MODELEND

Similar to the SQL Group By.

http://www.ramkumarn.com

Page 16: Webfocus Basics Tutorial

TABLE FILE CAR SUM SALES ACROSS CAR AS '' ACROSS MODEL AS '' BY COUNTRY END

ACROSS

SUBHEAD

TABLE FILE CAR SUM SALES ACROSS CAR AS '' ACROSS MODEL AS '' BY COUNTRY NOPRINT SUBHEAD "<COUNTRY" END

SUBHEAD

http://www.ramkumarn.com

Page 17: Webfocus Basics Tutorial

filter_phrase

Similar to the SQL WHERE clause.

TABLE FILE CAR SUM SALES BY COUNTRY WHERE COUNTRY EQ 'ENGLAND' END

Example 1

Example 2

TABLE FILE CAR SUM SALES BY COUNTRY WHERE COUNTRY LIKE '%G%'END

END

http://www.ramkumarn.com

Page 18: Webfocus Basics Tutorial

output_section

Specifies the format of the report to be generated.

ON TABLE PCHOLD FORMAT output_format

where output_format is one of the following: HTML, PDF, EXL2K,AHTML etc…

Example

TABLE FILE CAR SUM SALES BY COUNTRY ON TABLE PCHOLD FORMAT EXL2K END

http://www.ramkumarn.com

Page 19: Webfocus Basics Tutorial

styling_section

Specifies the formatting options (fonts, colors, etc.) for the report elements.

Syntax

ON TABLE SET STYLESHEET * TYPE=type, [COLUMN=column_name], property=value,[property=value,]...$ [TYPE=type, [COLUMN=column_name],

where type may be REPORT, DATA, TITLE, TABHEADING, etc.

The most common format properties include COLOR, SIZE, FONT, BACKCOLOR, JUSTIFY, etc.

[TYPE=type, [COLUMN=column_name], property=value, [property=value,]...$]…ENDSTYLE

http://www.ramkumarn.com

Page 20: Webfocus Basics Tutorial

A Much Simple Example …TABLE FILE CAR PRINT * ON TABLE PCHOLD FORMAT HTML ON TABLE SET STYLESHEET *

TYPE=REPORT, GRID = ON, SIZE=8, FONT='ARIAL, VERDANA, HELVETICA, SAN-SERIF', $ FONT='ARIAL, VERDANA, HELVETICA, SAN-SERIF', $

TYPE=TITLE,BACKCOLOR=RGB(0 51 153), COLOR=WHITE, STYLE=BOLD, SIZE=9, JUSTIFY=CENTER, $

TYPE=DATA,COLOR=BLACK, SIZE=8, $

ENDSTYLEEND

http://www.ramkumarn.com

Page 21: Webfocus Basics Tutorial

Heads Up…

Well What Next ?HTML Coding is an inseparable part of any Reporting Language… Do you accept that?that?

Yes.. So How to get that done ?Just Move on….

Page 22: Webfocus Basics Tutorial

A BASIC HTML ExampleTo create a HTML page in Webfocus you must edit the source of the document. There

is a GUI tool called the resource layout painter that does much of this work for you if you wish but this technique works well.

In .fex file, try the following code

-HTMLFORM BEGIN<html><body><body>Hello world!!

</body></html>-HTMLFORM END

Produces the output: Hello World!!

Page 23: Webfocus Basics Tutorial

Snippet …It is possible for you to do all the stuff in Webfocus, that you can do in HTML and JavaScript.

Starting from including <input> elements to create a dynamically embedded <div> tag, create a dynamically embedded <div> tag, everything can be done.

Using this you can create user friendly and Parameterized reports and rich user front ends

Page 24: Webfocus Basics Tutorial

Hey… That’s enough with the Fex stuff…

Ok… But Try to text view the code for any report that you develop with Dev Studio… So that you will get to know the Syntax..

Sure… Sure… Will do that… Then, What are the different Types of Reportsthat can be developed with Webfocus?

Page 25: Webfocus Basics Tutorial

Here It Goes…

Parameter-driven ReportsGraphical ReportsCompound ReportsFinancial ReportsExcel ReportsFree-Form ReportsDrill-down Reports

Page 26: Webfocus Basics Tutorial

A lot more to follow on WF basics…Expect soon…Expect soon…

http://www.ramkumarn.com