Presentation is loading. Please wait.

Presentation is loading. Please wait.

WebFOCUS Tips and Techniques WebFOCUS Tips and Techniques The Next Generation.

Similar presentations


Presentation on theme: "WebFOCUS Tips and Techniques WebFOCUS Tips and Techniques The Next Generation."— Presentation transcript:

1 WebFOCUS Tips and Techniques WebFOCUS Tips and Techniques The Next Generation

2 WebFOCUS Tips and Techniques Joyce Halford John Kutasz Summit User Conference June 2008

3 WebFOCUS Tips and Techniques Joyce Halford

4 WebFOCUS Tips and Techniques Order Report By or BY TOTAL

5 WebFOCUS Tips and Techniques Order Report By or BY TOTAL

6 WebFOCUS Tips and Techniques Order Report By or BY TOTAL

7 WebFOCUS Tips and Techniques Order Report By or BY TOTAL

8 WebFOCUS Tips and Techniques Order Report By or BY TOTAL

9 WebFOCUS Tips and Techniques Order Report By or BY TOTAL

10 WebFOCUS Tips and Techniques Order Report By or BY TOTAL

11 WebFOCUS Tips and Techniques Order Report By or BY TOTAL

12 WebFOCUS Tips and Techniques WHENCE

13 WebFOCUS Tips and Techniques WHENCE How can you determine which MASTER is being used when MASTER files exist on multiple platforms for the same data source? WHENCE filename MASTER This is only an issue if the MASTER files are different. An example of this problem can happen if MASTER files are created on a mainframe, copied to a local environment and at a later date, the MASTER files on the mainframe are updated but not copied to the local environment.

14 WebFOCUS Tips and Techniques WHENCE WHENCE CAR MASTER

15 WebFOCUS Tips and Techniques WHENCE FOCEXEC and FOCUS file locations can also be determined using WHENCE WHENCE filename FOCEXEC WHENCE filename FOCUS

16 WebFOCUS Tips and Techniques WHERE TOTAL

17 WebFOCUS Tips and Techniques WHERE TOTAL WHERE SALARY GT 56200

18 WebFOCUS Tips and Techniques WHERE SALARY GT 56200 WHERE TOTAL

19 WebFOCUS Tips and Techniques WHERE TOTAL Subset of Previous Page

20 WebFOCUS Tips and Techniques WHERE TOTAL

21 WebFOCUS Tips and Techniques WHERE TOTAL

22 WebFOCUS Tips and Techniques WHERE TOTAL

23 WebFOCUS Tips and Techniques WHERE TOTAL

24 WebFOCUS Tips and Techniques WHERE TOTAL

25 WebFOCUS Tips and Techniques WHERE TOTAL

26 WebFOCUS Tips and Techniques WHERE TOTAL

27 WebFOCUS Tips and Techniques Concatenate Fields for Sorting

28 WebFOCUS Tips and Techniques Concatenate Fields for Sorting Report Caster Bursting is on the primary sort field By concatenating multiple sort fields you can burst at a more detailed level.

29 WebFOCUS Tips and Techniques Concatenate Fields for Sorting

30 WebFOCUS Tips and Techniques Concatenate Fields for Sorting

31 WebFOCUS Tips and Techniques Concatenate Fields for Sorting

32 WebFOCUS Tips and Techniques Concatenate Fields for Sorting

33 WebFOCUS Tips and Techniques Concatenate Fields for Sorting

34 WebFOCUS Tips and Techniques Concatenate Fields for Sorting

35 WebFOCUS Tips and Techniques Concatenate Fields for Sorting

36 WebFOCUS Tips and Techniques How to Build a Dynamic Dropdown Box

37 WebFOCUS Tips and Techniques How to Build a Dynamic Dropdown Box

38 WebFOCUS Tips and Techniques How to Build a Dynamic Dropdown Box

39 WebFOCUS Tips and Techniques How to Build a Dynamic Dropdown Box (Populated from a Table/File)

40 WebFOCUS Tips and Techniques How to Build a Dynamic Dropdown Box (Populated from a Table/File)

41 WebFOCUS Tips and Techniques How to Build a Dynamic Dropdown Box

42 WebFOCUS Tips and Techniques How to Build a Dynamic Dropdown Box (Populated from Focexec Output)

43 WebFOCUS Tips and Techniques How to Build a Dynamic Dropdown Box

44 WebFOCUS Tips and Techniques How to Build a Dynamic Dropdown Box

45 WebFOCUS Tips and Techniques How to Build a Dynamic Dropdown Box

46 WebFOCUS Tips and Techniques How to Build a Dynamic Dropdown Box

47 WebFOCUS Tips and Techniques How to Build a Dynamic Dropdown Box

48 WebFOCUS Tips and Techniques How to Build a Dynamic Dropdown Box

49 WebFOCUS Tips and Techniques How to Build a Dynamic Dropdown Box

50 WebFOCUS Tips and Techniques How to Build a Dynamic Dropdown Box

51 WebFOCUS Tips and Techniques How to Build a Dynamic Dropdown Box

52 WebFOCUS Tips and Techniques How to Build a Dynamic Dropdown Box

53 WebFOCUS Tips and Techniques How to Build a Dynamic Dropdown Box

54 WebFOCUS Tips and Techniques WHERE

55 WebFOCUS Tips and Techniques WHERE Conditional WHERE statements –SET &parameter to control display of WHERE statements in a TABLE request Another option is to use a –GOTO label to jump around WHERE statements This technique does not allow you to work in the GUI.

56 WebFOCUS Tips and Techniques WHERE Example of -GOTO –IF &COUNTRY EQ ‘ALL COUNTRIES‘ GOTO SKIPWHR WHERE COUNTRY EQ &COUNTRY -SKIPWHR

57 WebFOCUS Tips and Techniques WHERE

58 WebFOCUS Tips and Techniques WHERE –SET &parameter

59 WebFOCUS Tips and Techniques WHERE –SET &parameter

60 WebFOCUS Tips and Techniques WHERE –SET &parameter

61 WebFOCUS Tips and Techniques WHERE –SET &parameter

62 WebFOCUS Tips and Techniques WHERE –SET &parameter

63 WebFOCUS Tips and Techniques WHERE –SET &parameter -* File DMANDWHR.fex -DEFAULT &COUNTRY = 'ENGLAND‘ -SET &SELWHR = IF &COUNTRY EQ 'ALL COUNTRIES' THEN ' ' - ELSE 'WHERE COUNTRY EQ ' | '''' | &COUNTRY | '''' ; TABLE FILE CAR PRINT DEALER_COST RETAIL_COST &SELWHR BY COUNTRY BY CAR BY MODEL BY BODYTYPE HEADING "The following line displays the value of amperSELWHR" "&SELWHR" " "The value of amperCOUNTRY is &COUNTRY" " "FOOTING "". END

64 WebFOCUS Tips and Techniques WHERE If you use the report layout tool, an alternate coding technique is used.

65 WebFOCUS Tips and Techniques WHERE ALL SELECTED IN DROPDOWN BOX TABLE FILE CAR PRINT COUNTRY MPG BY COUNTRY WHERE MPG GE 20 WHERE CAR EQ 'FOC_NONE' END

66 WebFOCUS Tips and Techniques WHERE AUDI SELECTED IN DROPDOWN BOX TABLE FILE CAR PRINT COUNTRY MPG BY COUNTRY WHERE MPG GE 20 WHERE CAR EQ ‘AUDI' END

67 WebFOCUS Tips and Techniques Ignoring Code with FOC_NONE

68 WebFOCUS Tips and Techniques Ignoring Code with FOC_NONE If a parameter has a value of FOC_NONE, any row of code containing it will be ignored when the report runs. One use for this is the WHERE statement example that you have already seen.

69 WebFOCUS Tips and Techniques Ignoring Code with FOC_NONE -SET &PARM1 = 'FIRST VALUE'; -SET &PARM2 = 'SECOND VALUE'; -SET &PARM3 = 'THIRD VALUE'; TABLE FILE CAR PRINT CAR BY COUNTRY HEADING "heading line 1 parm value is: &PARM1 " "heading line 2 parm value is: &PARM2 " "heading line 3 parm value is: &PARM3 " END

70 WebFOCUS Tips and Techniques Ignoring Code with FOC_NONE

71 WebFOCUS Tips and Techniques Ignoring Code with FOC_NONE -SET &PARM1 = 'FIRST VALUE'; -SET &PARM2 = ‘FOC_NONE'; -SET &PARM3 = 'THIRD VALUE'; TABLE FILE CAR PRINT CAR BY COUNTRY HEADING "heading line 1 parm value is: &PARM1 " "heading line 2 parm value is: &PARM2 " "heading line 3 parm value is: &PARM3 " END

72 WebFOCUS Tips and Techniques Ignoring Code with FOC_NONE

73 WebFOCUS Tips and Techniques Ignoring Code with FOC_NONE Notes: The ONLY row ignored is the one containing the display or evaluation of the parameter. If you have a heading or a selection that wraps to more than one row, only part of it will be ignored, likely causing a syntax error. The following is an example: "heading line 2 parm value is: &PARM2 "

74 WebFOCUS Tips and Techniques US Bank Panel John Kutasz

75 WebFOCUS Tips and Techniques Color Matching

76 WebFOCUS Tips and Techniques Color Matching If you want to give logos, web pages, and reports a matching look and feel, Windows comes with something you can use to identify a specific color – the ‘Paint’ tool.

77 WebFOCUS Tips and Techniques Color Matching For Example, I may have a report that contains data for FedEx. If I call up their web site and press Cntl- PrintScreen, I can capture a picture of their page.

78 WebFOCUS Tips and Techniques Color Matching From the Windows XP Desktop, choosing Start / All Programs / Accessories / Paint will bring you to the paint tool.

79 WebFOCUS Tips and Techniques Color Matching Choose Edit / Paste or Cntl-V to paste the clipboard image into the Paint tool. Note that the image you pasted contains a picture of the tool bar from the browser – these controls do NOT work.

80 WebFOCUS Tips and Techniques Color Matching Choose the ‘eyedropper’ tool from the Paint toolkit, and click it on a color you want to match. You should notice a brief flash of color in the rectangle under the Paint toolkit, but then the screen will go back exactly the way it looked before taking the eyedropper sample.

81 WebFOCUS Tips and Techniques Color Matching From the Paint Menu, choose Colors / Edit Colors / and then Define Custom Colors.

82 WebFOCUS Tips and Techniques Color Matching The image below is zoomed in on the Custom Colors box. The color that was chosen with the eyedropper shows in the rectangle near the bottom, and the exact color settings RGB(102, 0, 153) appear at the bottom right.

83 WebFOCUS Tips and Techniques Color Matching NOTE: Some images on the web are not made up of solid colors. They may be nearby dots of different colors that blend together to appear as a single color. Sampling may only get you one pixel value.

84 WebFOCUS Tips and Techniques Color Matching NOTE: Some monitors may not be set to display millions of colors. The ‘web safe’ palette contains 216 colors that all browser settings will show. Any combination of 0, 51, 102, 153, 204, and 255 should be visible on any color monitor.

85 WebFOCUS Tips and Techniques Cell Padding How Much Will Fit on a PDF Page?

86 WebFOCUS Tips and Techniques Cell Padding How Much Will Fit on a PDF Page? This technique uses a very simple report. We are printing: –the first 8 fields of the CAR file –with the default font, –turning gridlines on –displaying in PDF format.

87 WebFOCUS Tips and Techniques Cell Padding How Much Will Fit on a PDF Page? A very simple report built in the GUI tool

88 WebFOCUS Tips and Techniques Cell Padding How Much Will Fit on a PDF Page? The first 6 columns appear on Page 1

89 WebFOCUS Tips and Techniques Cell Padding How Much Will Fit on a PDF Page? The other 2 columns are on Page 2

90 WebFOCUS Tips and Techniques Cell Padding How Much Will Fit on a PDF Page? Some possible changes: –Use a smaller font –Change the report to landscape mode –Change to legal paper –Abbreviate column titles to make them narrower.

91 WebFOCUS Tips and Techniques Cell Padding How Much Will Fit on a PDF Page? This technique does none of those things. Instead, do the following: –Choose Report / Format from the pulldown at the top of the page –Go to the option called ‘Cell Padding’. By default, there is a value of ‘not set’. I put in a value of 0.08 for the left and right.

92 WebFOCUS Tips and Techniques Cell Padding The stylesheet settings are called LEFTGAP and RIGHTGAP

93 WebFOCUS Tips and Techniques Cell Padding You Get Extra Space in 2 Places in EVERY Column All 8 columns now display on a single page.

94 WebFOCUS Tips and Techniques Cell Padding How Much Will Fit on a PDF Page? You saw on the previous page that the font and the page size are the same, there is simply less room between the data and the gridlines. The benefit here is that a small amount of space is saved in 2 places in every column of the report. It is still surprising to see how much additional room it adds up to.

95 WebFOCUS Tips and Techniques Combining Data

96 WebFOCUS Tips and Techniques Combining Data Universal Concatenation - the MORE command - physically appends multiple files The sources can have different formats (Focus, DB2, etc), and some can have more fields than others. But, any specific fields being combined need to have the same names, and the same formats.

97 WebFOCUS Tips and Techniques Combining Data I have always found Excel to be a handy tool for data entry. The new Upload Data File option makes it much, much easier to use an Excel file as a data source.

98 WebFOCUS Tips and Techniques Combining Data Step 1 – hold existing data to Excel format

99 WebFOCUS Tips and Techniques Combining Data Step 2 – Using the spreadsheet as a template, input new data

100 WebFOCUS Tips and Techniques Combining Data New Option – Master Files / New / Upload Data File

101 WebFOCUS Tips and Techniques Combining Data

102 WebFOCUS Tips and Techniques Combining Data

103 WebFOCUS Tips and Techniques Combining Data Previous Page, Notes: –Check the master file of the original table (CAR, in this example) and set field formats to match –Click ‘Apply’ for each field as the format is changed, then move to next field

104 WebFOCUS Tips and Techniques Combining Data Previous Page, Notes, continued: –Choose your application from the bottom dropdown box. –If the leftmost column runs off the edge of the page, change to a non- maximized view of the inner window.

105 WebFOCUS Tips and Techniques Combining Data All Fields, All Data TABLE FILE CAR PRINT COUNTRY CAR MODEL RETAIL_COST DEALER_COST SALES … ON TABLE HOLD AS ALLCAR MORE FILE CARFILENEWDATA END TABLE FILE ALLCAR PRINT COUNTRY CAR MODEL RETAIL_COST DEALER_COST SALES … BY COUNTRY NOPRINT BY CAR NOPRINT END

106 WebFOCUS Tips and Techniques Combining Data

107 WebFOCUS Tips and Techniques Combining Data Only Selected Fields, Selected Countries TABLE FILE CAR PRINT COUNTRY CAR MODEL WHERE COUNTRY CONTAINS 'GERMANY' ON TABLE HOLD AS ALLCAR MORE FILE CARFILENEWDATA WHERE COUNTRY CONTAINS 'GERMANY' END TABLE FILE ALLCAR PRINT COUNTRY CAR MODEL BY COUNTRY NOPRINT BY CAR NOPRINT END

108 WebFOCUS Tips and Techniques Combining Data

109 WebFOCUS Tips and Techniques Combining Data If there is a field in some source files that is not in all of them (for example, a new category for newer cars), a DEFINE can be used to add a blank (or zero) value into the request from tables where it does not exist.

110 WebFOCUS Tips and Techniques Combining Data DEFINE FILE CAR HYBRID/A50 = ' '; END TABLE FILE CAR PRINT COUNTRY CAR MODEL HYBRID ON TABLE HOLD AS ALLCAR MORE FILE CARFILENEWDATA END TABLE FILE ALLCAR PRINT COUNTRY CAR MODEL HYBRID BY COUNTRY NOPRINT BY CAR NOPRINT END

111 WebFOCUS Tips and Techniques Combining Data

112 WebFOCUS Tips and Techniques Combining Data Unlike using a JOIN, there is no need for any fields in the source files to have the same value. Also, since the result is a simple, single segment file, it tends to be very easy to use for reporting (no ‘testing in independent sets of data’).

113 WebFOCUS Tips and Techniques ASNAMES

114 WebFOCUS Tips and Techniques ASNAMES The ASNAMES function allows you to assign the names of fields when you put them into HOLD files.

115 WebFOCUS Tips and Techniques ASNAMES

116 WebFOCUS Tips and Techniques ASNAMES

117 WebFOCUS Tips and Techniques ASNAMES

118 WebFOCUS Tips and Techniques ASNAMES

119 WebFOCUS Tips and Techniques ASNAMES A problem arises when you take the identical request and store the results in a hold file. The column title information is not saved into the hold master, and you have 2 fields called SALES. An additional complication in reporting from a HOLD file is that even if you refer to SALES multiple times, you will always get the values from the first column with that name.

120 WebFOCUS Tips and Techniques ASNAMES – the Solution

121 WebFOCUS Tips and Techniques ASNAMES – the Solution

122 WebFOCUS Tips and Techniques ASNAMES – the Solution And the values used for the column titles get passed to the HOLD file

123 WebFOCUS Tips and Techniques ASNAMES A potential complication: you use a common method of making column titles look better:

124 WebFOCUS Tips and Techniques ASNAMES The comma used for line wrapping causes only the first part of the name to be captured.

125 WebFOCUS Tips and Techniques ASNAMES Some things to be aware of when holding to FOCUS format files: TABLE FILE CAR SUM SALES AS 'COUNTRYSALES' BY COUNTRY SUM SALES AS 'MODELSALES' BY COUNTRY BY MODEL ON TABLE HOLD AS HOLDA FORMAT FOCUS INDEX SALES

126 WebFOCUS Tips and Techniques ASNAMES The default value for ASNAMES is ‘FOCUS’, not ‘OFF’. So if you hold to a FOCUS file, ASNAMES will work automatically. If you are indexing a field (or fields) the instruction on which field(s) to index refers to the originating fieldname, NOT to the value that ASNAMES will assign If you are indexing a field, the maximum length of an indexed field is 12 characters – so you need to limit the length of these fieldnames.

127 WebFOCUS Tips and Techniques ASNAMES And finally: whenever I am putting an item into a hold file, I try never to use a name for a field that is the same as a ‘real’ fieldname that exists in any of the source master files. This holds true for fields I create with either DEFINE or COMPUTE, as well as for fields being renamed using ASNAMES. Assigning the same name to something that does not represent the original data field can only lead to confusion and misery (if not for you, then for someone trying to use your code in the future).

128 WebFOCUS Tips and Techniques Questions

129 WebFOCUS Tips and Techniques Thank you for attending


Download ppt "WebFOCUS Tips and Techniques WebFOCUS Tips and Techniques The Next Generation."

Similar presentations


Ads by Google