Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Copyright 2009
Information Builders Two Penn Plaza New York, NY 10121-2898 (212) 736-4433
TM4678
WebFOCUS Enable for Adobe Flex Integration For Creating an Interactive PDF
This technical memo describes how to generate Enable dashboards (.SWF file extension) on the WebFOCUS Reporting Server and how to insert Enable dashboards into PDF documents.
Note: This feature is available in code only in WebFOCUS Release 7 Version 6.9 procedures.
DN4500969.0909
WebFOCUS Enable Integration With the Reporting Server 4. If the hold.xml file name is specified as the data XML file in the Enable dashboard, it uses the default HOLD file location in WebFOCUS, as shown in the following code.
[Embed(source="hold.xml",mimeType="application/octet-stream")]
5. If the data XML file name or file location is different from the default HOLD file name or location, specify a fully qualified file name with the path in the Enable dashboard source code, as shown in the following code.
[Embed(source="C:/ibi/apps/flexinpdf/enable.xml",mimeType="application/octet-stream")]
Procedure: How to Run and Display the Enable Dashboard in the Web Browser
1. Open Developer Studio. 2. Create a project directory. Note: We will use the sample data (ggsales.mas) that comes with the WebFOCUS installation. You may copy this source file to the project directory of your choice. 3. Create a new procedure using the following WebFOCUS syntax.
FILEDEF FLEXTEST DISK c:/ibi/apps/flexinpdf/EnableTest.mxml SET HTMLFORMTYPE=FLEX TABLE FILE GGSALES PRINT REGION ST CITY CATEGORY PRODUCT DOLLARS UNITS COMPUTE COGS/D12.2CM = DOLLARS * .75; ON TABLE HOLD FORMAT XML END -HTMLFORM FLEXTEST
WebFOCUS
WebFOCUS Enable for Adobe Flex Integration For Creating an Interactive PDF 4. You can also call the external MXML file using the following WebFOCUS syntax.
FILEDEF FLEXTEST DISK c:/ibi/apps/flexinpdf/EnableTest.mxml SET HTMLFORMTYPE=FLEX TABLE FILE GGSALES PRINT REGION ST CITY CATEGORY PRODUCT DOLLARS UNITS COMPUTE COGS/D12.2CM = DOLLARS * .75; ON TABLE HOLD FORMAT XML END -HTMLFORM BEGIN !IBI.FIL.FLEXTEST; -HTMLFORM END
DN4500969.0909
Note: This procedure also saves the generated SWF file on the local drive.
WebFOCUS
WebFOCUS Enable for Adobe Flex Integration For Creating an Interactive PDF
Syntax:
DN4500969.0909
Is the source SWF file you want to embed directly into the PDF. Note: When inserting multiple SWF files using IMAGE-FORMAT=SWF syntax, it is recommended that you create a separate HEADING LINE or HEADING ITEM as a place holder for each SWF file to be inserted.
WebFOCUS
WebFOCUS Enable for Adobe Flex Integration For Creating an Interactive PDF 3. Create a new procedure using the following WebFOCUS syntax.
TABLE FILE GGSALES " . " SUM REGION NOPRINT ON TABLE PCHOLD FORMAT PDF ON TABLE SET STYLE * UNITS=POINTS, $ TYPE=REPORT, ORIENTATION=LANDSCAPE, FONT=TIMES, SIZE=12, $ TYPE=HEADING, OBJECT=TEXT, ITEM=1, LINE=1, COLOR=WHITE, IMAGE=enable.swf, IMAGE-TYPE=FILE, IMAGE-FORMAT=SWF, POSITION=(10 10), DIMENSION=(780 580), BORDER=LIGHT, BORDER-COLOR=WHITE, $ END
Note: Enable.swf is a pre-built SWF file, and the position and dimensions need to be specified, as shown in the following example.
TYPE=HEADING, OBJECT=TEXT, ITEM=1, LINE=1, COLOR=WHITE, IMAGE=enable.swf, IMAGE-TYPE=FILE, IMAGE-FORMAT=SWF, POSITION=(10 10), DIMENSION=(780 580),
DN4500969.0909
TYPE=HEADING, LINE=1, OBJECT=TEXT, ITEM=1, SIZE=10, COLOR=RED, $ TYPE=HEADING, LINE=1, OBJECT=TEXT, ITEM=2, SIZE=14, COLOR=BLUE, $ TYPE=HEADING, LINE=1, OBJECT=TEXT, ITEM=3, COLOR=WHITE, IMAGE=SWF01.swf, IMAGE-TYPE=FILE, IMAGE-FORMAT=SWF, POSITION=(54 330), DIMENSION=(216 288), $ TYPE=HEADING, LINE=1, OBJECT=TEXT, ITEM=4, COLOR=WHITE, IMAGE=SWF02.swf, IMAGE-TYPE=FILE, IMAGE-FORMAT=SWF, POSITION=(350 10), DIMENSION=(216 288), $ TYPE=HEADING, LINE=2, OBJECT=TEXT, ITEM=1, COLOR=WHITE, IMAGE=SWF03.swf, IMAGE-TYPE=FILE, IMAGE-FORMAT=SWF, POSITION=(300 330), DIMENSION=(200 200), $ ENDSTYLE END
Procedure: How to Generate and Insert a Portable Enable Dashboard Into a PDF Report
1. Create a new procedure using the following WebFOCUS syntax. Note: You need to generate a SWF first, then insert it into the PDF.
FILEDEF FLEXTEST DISK c:/ibi/apps/flexinpdf/EnableTest.mxml FILEDEF FLEXOUT DISK c:/ibi/apps/flexinpdf/enable.swf FILEDEF FLEXDATA DISK c:/ibi/apps/flexinpdf/enable.xml SET HTMLFORMTYPE=FLEX TABLE FILE GGSALES PRINT REGION ST CITY CATEGORY PRODUCT DOLLARS UNITS COMPUTE COGS/D12.2CM = DOLLARS * .75; ON TABLE HOLD AS FLEXDATA FORMAT XML END
WebFOCUS
WebFOCUS Enable for Adobe Flex Integration For Creating an Interactive PDF
-HTMLFORM BEGIN SAVE AS FLEXOUT !IBI.FIL.FLEXTEST; -HTMLFORM END FILEDEF HOLD DISK C:\ibi\apps\flexinpdf\enablepdf.pdf TABLE FILE GGSALES " . " SUM REGION NOPRINT ON TABLE HOLD FORMAT PDF ON TABLE SET STYLE * UNITS=POINTS, $ TYPE=REPORT, ORIENTATION=LANDSCAPE, FONT=TIMES, SIZE=12, $ TYPE=HEADING, OBJECT=TEXT, ITEM=1, LINE=1, COLOR=WHITE, IMAGE=enable.swf, IMAGE-TYPE=FILE, IMAGE-FORMAT=SWF, POSITION=(10 10), DIMENSION=(780 580), BORDER=LIGHT, BORDER-COLOR=WHITE, $ END
You will be able to print the interactivity as well as the changes made to the reports or dashboards from Adobe Reader.
DN4500969.0909
where:
<n>
Is the numeric width value for the black solid line border around SWF files. Note: This border is generated by Adobe and not by WebFOCUS so no other options will be available in this setting.
Example:
No Flex Border
Setting FLEX-BORDER to 0 is the same as not setting FLEX-BORDER at all, it results in the default behavior no border around the SWF file. Inserting the following syntax:
FLEX-BORDER=0
will result in a SWF file with no border, as shown in the following image.
10
WebFOCUS
WebFOCUS Enable for Adobe Flex Integration For Creating an Interactive PDF
Example:
will result in a SWF file with a thin border, as shown in the following image.
Example:
DN4500969.0909
11
Electronic Publishing with Interactive Analytics will result in a SWF file with a thick border, as shown in the following image.
Note: Inserting a FLEX-BORDER with values between 1 and 5 will result in a border around the SWF ranging from very thin (1) to very thick (5).
Procedure: How to Generate and Insert Multiple Enable Dashboards and Combine Reports in a Compound PDF Document
Starting with WebFOCUS Version 7 Release 6.10, you can generate and insert multiple Enable Dashboards and combine them with WebFOCUS Reports to create a compound PDF document. Note: The procedure uses both GGSALES and CENTURYSALES data that are included in the WebFOCUS installation. The report2 and report3 components in this procedure are WebFOCUS Reports. The report1 and report4 components in this procedure are WebFOCUS Enable Dashboards. The Enable Dashboard examples, SalesDashRed.mxml and CenturyIBICharts.mxml, in this procedure are already created using WebFOCUS Enable for Adobe Flex. For more information on how to create these Dashboards, please refer to WebFOCUS Enable for Adobe Flex Users Guide.
12
WebFOCUS
WebFOCUS Enable for Adobe Flex Integration For Creating an Interactive PDF The position of SWF file in each PDF report is relative to the top left corner of the COMPONENT position in the PDF document. For example, the position for report1 in the PDF document is defined as 0.01 inches from the Left side of the page and 0.25 inches from the Top of the page as below:
COMPONENT='report1', TEXT='report1', TOC-LEVEL=2, POSITION=(0.01 0.25), DIMENSION=(8 6), METADATA='Z-INDEX: 100; LEFT: 0.01in; OVERFLOW: auto; WIDTH: 8in; POSITION: absolute; TOP: 0.25in; HEIGHT: 6in', $
The position of this SWF file in the PDF report is also defined as 0.25 inches from the Left and 0.25 inches from the Top as below (in bold):
TYPE=HEADING, OBJECT=TEXT, ITEM=1, LINE=1, COLOR=WHITE, IMAGE=SalesDashRed.swf, IMAGE-TYPE=FILE, IMAGE-FORMAT=SWF,POSITION=(0.25 0.25), DIMENSION=(8 6), $
Therefore the real position of this Enable Dashboard in the first page in this PDF document becomes 0.26 inches from the Left side of the page and 0.5 inches from the Top of the page. 1. Create a new procedure using the following WebFOCUS syntax.
FILEDEF FLEXTEST DISK c:/ibi/apps/flexinpdf/SalesDashRed.mxml FILEDEF FLEXOUT DISK c:/ibi/apps/flexinpdf/SalesDashRed.swf FILEDEF FLEXDATA DISK c:/ibi/apps/flexinpdf/SalesDashRed.xml -* FILEDEF FLEXCHAR DISK C:/ibi/apps/flexinpdf/CenturyIBICharts.mxml FILEDEF FLEXFILE DISK c:/ibi/apps/flexinpdf/CenturyIBICharts.swf FILEDEF FLEXCENT DISK c:/ibi/apps/flexinpdf/CenturyIBICharts.xml -* SET HTMLFORMTYPE=FLEX -* TABLE FILE GGSALES PRINT REGION ST CITY CATEGORY PRODUCT COMPUTE DOL2/D12.2CM = DOLLARS; AS 'Total Sales' UNITS COMPUTE COGS/D12.2CM = DOLLARS * .75; ON TABLE HOLD AS FLEXDATA FORMAT XML END -*
DN4500969.0909
13
DEFINE FILE CENTURYSALES MONTHNAME/A20=IF MONTH EQ '01' THEN 'January' ELSE IF MONTH EQ '02' THEN 'February' ELSE IF MONTH EQ '03' THEN 'March' ELSE IF MONTH EQ '04' THEN 'April' ELSE IF MONTH EQ '05' THEN 'May' ELSE IF MONTH EQ '06' THEN 'June' ELSE IF MONTH EQ '07' THEN 'July' ELSE IF MONTH EQ '08' THEN 'August' ELSE IF MONTH EQ '09' THEN 'September' ELSE IF MONTH EQ '10' THEN 'October' ELSE IF MONTH EQ '11' THEN 'November' ELSE IF MONTH EQ '12' THEN 'December' ; END TABLE FILE CENTURYSALES SUM QUANTITY COSTOFGOODSSOLD PROFIT BY YEAR BY QUARTER BY MONTH BY MONTHNAME BY PLANTREGION BY STATE BY CITY BY STORENAME BY PRODUCTTYPE BY PRODUCTCATEGORY WHERE ( COUNTRY EQ 'United States' ) AND ( REGION NE 'Web(R)' ) AND ( POSTALCODE NE '065208332' OR '672033296' OR '941033185' ); ON TABLE SET PAGE-NUM OFF ON TABLE NOTOTAL ON TABLE HOLD AS FLEXCENT FORMAT XML ON TABLE SET HTMLCSS ON END -*
14
WebFOCUS
WebFOCUS Enable for Adobe Flex Integration For Creating an Interactive PDF
-HTMLFORM BEGIN SAVE AS FLEXOUT !IBI.FIL.FLEXTEST; -HTMLFORM END -* -HTMLFORM BEGIN SAVE AS FLEXFILE !IBI.FIL.FLEXCHAR; -HTMLFORM END -* COMPOUND LAYOUT PCHOLD FORMAT PDF UNITS=IN, $ SECTION=section1, LAYOUT=ON, METADATA='0.5^0.5^0.5^0.5', MERGE=OFF, ORIENTATION=PORTRAIT, PAGESIZE=Letter, $ PAGELAYOUT=1, NAME='Page layout 1', text='Page layout 1', TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5, METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5,LEFTMARGIN=0,RIGHTMARGIN=0,', $ COMPONENT='report1', TEXT='report1', TOC-LEVEL=2, POSITION=(0.01 0.25), DIMENSION=(8 6), METADATA='Z-INDEX: 100; LEFT: 0.01in; OVERFLOW: auto; WIDTH: 8in; POSITION: absolute; TOP: 0.25in; HEIGHT: 6in', $ COMPONENT='report2', TEXT='report2', TOC-LEVEL=2, POSITION=(0.5 6.4), DIMENSION=(8 6), METADATA='Z-INDEX: 100; LEFT: 0.5in; OVERFLOW: auto; WIDTH: 8in; POSITION: absolute; TOP: 6.4in; HEIGHT: 6in', $ PAGELAYOUT=2, NAME='Page layout 2', text='Page layout 2', TOC-LEVEL=1, BOTTOMMARGIN=0.5, TOPMARGIN=0.5, METADATA='BOTTOMMARGIN=0.5,TOPMARGIN=0.5,LEFTMARGIN=0,RIGHTMARGIN=0,', $ COMPONENT='report3', TEXT='report3', TOC-LEVEL=2, POSITION=(0.5 0.5), DIMENSION=(8 2.5), METADATA='Z-INDEX: 100; LEFT: 0.5in; OVERFLOW: auto; WIDTH: 8in; POSITION: absolute; TOP: 0.5in; HEIGHT: 2.5in', $ COMPONENT='report4', TEXT='report4', TOC-LEVEL=2, POSITION=(0.01 3), DIMENSION=(8 6), METADATA='Z-INDEX: 100; LEFT: 0.01in; OVERFLOW: auto; WIDTH: 8in; POSITION: absolute; TOP: 3in; HEIGHT: 6in', $ END -*
DN4500969.0909
15
SET COMPONENT='report1' TABLE FILE GGSALES SUM REGION NOPRINT HEADING "." ON TABLE SET PAGE-NUM OFF ON TABLE PCHOLD FORMAT PDF ON TABLE SET STYLE * TYPE=HEADING, OBJECT=TEXT, ITEM=1, LINE=1, COLOR=WHITE, IMAGE=SalesDashRed.swf, IMAGE-TYPE=FILE, IMAGE-FORMAT=SWF, POSITION=(0.25 0.25), DIMENSION=(8 6), $ ENDSTYLE END -* SET COMPONENT='report2' TABLE FILE GGSALES SUM DOLLARS UNITS BY REGION BY ST BY CITY HEADING "Regional Sales Report" ""
16
WebFOCUS
WebFOCUS Enable for Adobe Flex Integration For Creating an Interactive PDF
ON TABLE SET PAGE-NUM OFF ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=9, $ TYPE=DATA, SIZE=9, BACKCOLOR=( RGB(238 238 238) 'WHITE' ), $ TYPE=TITLE, SIZE=10, STYLE=BOLD, COLOR='WHITE', BACKCOLOR=RGB(153 0 0), $ TYPE=HEADING, SIZE=12, STYLE=BOLD, $ ENDSTYLE END -*
DN4500969.0909
17
SET COMPONENT='report3' TABLE FILE CENTURYSALES SUM COSTOFGOODSSOLD PROFIT BY PRODUCTTYPE HEADING "Century Product Report" "" ON TABLE SET PAGE-NUM OFF ON TABLE PCHOLD FORMAT HTML ON TABLE SET HTMLCSS ON ON TABLE SET STYLE * TYPE=REPORT, GRID=OFF, FONT='ARIAL', SIZE=9, $ TYPE=DATA, SIZE=9, BACKCOLOR=( RGB(238 238 238) 'WHITE' ), $ TYPE=TITLE, SIZE=10, STYLE=BOLD, COLOR='WHITE', BACKCOLOR=RGB(153 0 0), $ TYPE=HEADING, SIZE=12, STYLE=BOLD, $ ENDSTYLE END -*
18
WebFOCUS
WebFOCUS Enable for Adobe Flex Integration For Creating an Interactive PDF
SET COMPONENT='report4' TABLE FILE CENTURYSALES SUM REGION NOPRINT HEADING "." ON TABLE SET PAGE-NUM OFF ON TABLE PCHOLD FORMAT PDF ON TABLE SET STYLE * TYPE=HEADING, OBJECT=TEXT, ITEM=1, LINE=1, COLOR=WHITE, IMAGE=CenturyIBICharts.swf, IMAGE-TYPE=FILE, IMAGE-FORMAT=SWF, POSITION=(0.25 0.25), DIMENSION=(8 6), FLEX-BORDER=1, $ ENDSTYLE END -* COMPOUND END
DN4500969.0909
19
20
WebFOCUS
WebFOCUS Enable for Adobe Flex Integration For Creating an Interactive PDF
<ibi:ibiDataGrid x="10" y="10" height="400" width="600" id="MAIN01" visible="false"> <ibi:seturl>internal</ibi:seturl> </ibi:ibiDataGrid> <mx:Label x="10" y="10" text="Sales Performance Dashboard" width="282" height="25" fontSize="16" fontThickness="5" fontWeight="bold"/> <mx:Panel x="10" y="43" width="135" height="200" layout="absolute" title="Select Region"> <ibi:ibiList x="10" y="10" width="95" height="140" id="list1" ibiParent="MAIN01" ibiFilterAble="true" ibiColumn="REGION" ibiFilterCond="EQ" > </ibi:ibiList> </mx:Panel> <mx:Panel x="153" y="43" width="139" height="200" layout="absolute" title="Select State"> <ibi:ibiList x="10" y="10" height="140" width="99" id="list2" ibiFilterAble="true" ibiColumn="ST" ibiFilterCond="EQ" ibiFilterParent="list1" ibiParent="MAIN01"> </ibi:ibiList> </mx:Panel> <mx:Panel x="300" y="43" width="694" height="200" layout="absolute" title="Regional Detail Transactions"> <ibi:ibiDataGrid right="10" left="10" top="8" bottom="10" ibiParent="MAIN01" ibiFilterParent="list2" ibiUseColumns="REGION,CITY,ST,CATEGORY,PRODUCT,DOLLARS AS Total Sales" ibiFilterAble="true"> <ibi:ibiColumnStyle>
DN4500969.0909
21
<![CDATA[ { width: 15; },{ width: 20; },{ width: 10; },{ width: 20; },{ width: 20; },{ width: 20; } ]]> </ibi:ibiColumnStyle> </ibi:ibiDataGrid> </mx:Panel> <ibi:ibiDataGrid x="10" y="251" width="200" id="colChartData" ibiFilterAble="true" ibiGroupBy="ST" ibiParent="MAIN01" ibiUseColumns="ST,Sum.DOLLARS,Sum.UNITS,Sum.COGS" ibiUseFiltered="true" visible="false"/> <mx:Panel x="10" y="251" width="526" height="404" layout="absolute" title="Sales by State"> <ibi:ibiColumnChart x="10" y="10" height="344" ibiParent="colChartData" ibiGroupBy="ST" ibiUseFiltered="true" ibiXField="ST" ibiYField="Sum.DOLLARS,Sum.UNITS,Sum.COGS" showDataTips="true" dataTipFunction="colFunc" width="486"> <ibi:ibiColumnStyle> <![CDATA[ { showDataEffect: int; fillAlphas: 1, 1, 1, 1,1; fillRatios: 0,.2,.4,.75,1; fillColors: #191970, #2E2ECF, #8B8BE5, #2E2ECF, #191970; fillAngle: 0; },
22
WebFOCUS
WebFOCUS Enable for Adobe Flex Integration For Creating an Interactive PDF
{ showDataEffect: zoom; fillAlphas: 1, 1, 1, 1,1; fillRatios: 0,.2,.4,.75,1; fillColors: #6666FF, #9090FF, #BBBBFF, #9090FF, #6666FF; fillAngle: 0; }, { showDataEffect: slide; fillAlphas: 1, 1, 1, 1,1; fillRatios: 0,.2,.4,.75,1; fillColors: #3232CD, #7070DC, #ADADEB, #7070DC, #3232CD; fillAngle: 0; } ]]> </ibi:ibiColumnStyle> </ibi:ibiColumnChart> </mx:Panel> <ibi:ibiDataGrid id="pieChartData" ibiParent="MAIN01" ibiUseColumns="PRODUCT,Sum.DOLLARS" ibiGroupBy="PRODUCT" visible="false" ibiUseFiltered="true" x="430" y="251" width="200"/> <mx:Panel x="544" y="251" width="450" height="404" layout="absolute" title="Sales by Product"> <ibi:ibiPieChart x="10" y="10" width="410" height="252" ibiParent="pieChartData" ibiField="Sum.DOLLARS" ibiNameField="PRODUCT" showDataTips="true" id="explodePieChart">
DN4500969.0909
23
<b:rainopeeepoeiCatadvnLsee(hrIeEetIE_LC,iCik;/b:rainopee iicetoCmlt>xldPehr.dEetitnrCattmvn.TMCIKpelc)<iicetoCmlt> <ibi:ibiPieStyle> <![CDATA[{ [ fillType: Radial; fillColors: #191970,#8B8BE5,#191970,#8B8BE5,#191970; fillRatios: 0,.2,.4,.7,1; labelPosition: callout; showDataEffect: int; labelFunction: pieSeries_labelFunc; ],[ fillType: Radial; fillColors: #6666FF,#9090FF,#6666FF,#9090FF,#6666FF; fillRatios: 0,.2,.4,.7,1; labelPosition: callout; showDataEffect: int; labelFunction: pieSeries_labelFunc; ],[ fillType: Radial; fillColors: #483D8B,#B2ABDA,#483D8B,#B2ABDA,#483D8B; fillRatios: 0,.2,.4,.7,1; labelPosition: callout; showDataEffect: int; labelFunction: pieSeries_labelFunc; ],[ fillType: Radial; fillColors: #2657b5,#87a2d5,#1247ae,#6494ef,#1b4694; fillRatios: 0,.2,.4,.7,1; labelPosition: callout; showDataEffect: int; labelFunction: pieSeries_labelFunc; ],[ fillType: Radial; fillColors: #8470FF,#C7BEFF,#8470FF,#C7BEFF,#8470FF; fillRatios: 0,.2,.4,.7,1; labelPosition: callout; showDataEffect: int; labelFunction: pieSeries_labelFunc; ],[
24
WebFOCUS
WebFOCUS Enable for Adobe Flex Integration For Creating an Interactive PDF
fillType: Radial; fillColors: #00BFFF,#99E5FF,#00BFFF,#99E5FF,#00BFFF; fillRatios: 0,.2,.4,.7,1; labelPosition: callout; showDataEffect: int; labelFunction: pieSeries_labelFunc; ] }]]> </ibi:ibiPieStyle> </ibi:ibiPieChart> <ibi:ibiLegend x="10" y="270" width="410" height="84" ibiParent="explodePieChart"></ibi:ibiLegend> </mx:Panel> </ibi:ibiCanvas> <mx:Script> <![CDATA[ import mx.controls.Alert; import mx.charts.events.ChartItemEvent; import mx.charts.HitData; public var index:Number = -1; public var explodeData:Array = []; public var pieSlice:String = ""; private var lastClicked:Number = -1; //keep track of last clicked pie slice public function colFunc(h:HitData):String { var retcols:String; retcols = "State: " + h.item.ST + "\n<B>" + "Total Sales: " + cf.format(h.item["Sum.DOLLARS"]) + "</B>" + "\n"+ "Units Sold: " + h.item["Sum.UNITS"] + "\n"+ "Total COGS: " + cf.format(h.item["Sum.COGS"]); return retcols; } protected function currencyFormat(value:Object, arg2:Object, arg3:Object):String { return cf.format(value); } public function pieClick(e:ChartItemEvent):void { pieSlice = e.hitData.item.PRODUCT; index = -1; explodeData = [];
DN4500969.0909
25
for (var i:Number=0; i < pieChartData.dataProvider.length && index == -1; i++){ if(pieChartData.dataProvider[i].PRODUCT == pieSlice){ index = i; } } //determine what pie slice is being clicked - close if already open if(index == lastClicked){ explodeData[index] = 0; lastClicked = -1; }else{ explodeData[index] = 0.15; //explodePieChart.series[0].reserveExplodeRadius; lastClicked = index; } explodePieChart.series[0].reserveExplodeRadius = 0.15; explodePieChart.series[0].perWedgeExplodeRadius = explodeData; } ]]> </mx:Script> <mx:Style> DataGrid { backgroundAlpha: 1; headerColors: #191970, #ffffff; horizontalGridLines: true; horizontalGridLineColor: #ffcc00; verticalGridLines: false; verticalGridLineColor: #642d2d; rollOverColor: #22316C; textRollOverColor: #ffffff; headerStyleName: "mydataGridHeaderStyle"; } .mydataGridHeaderStyle { color: #ffffff; } </mx:Style> <mx:SeriesSlide id="slide" duration="1000"/> <mx:Zoom id="zoom" duration="1000"/> <mx:SeriesInterpolate id="int" duration="1000" elementOffset="10" /> <mx:SeriesSlide id="pieEffect" duration="1000"/> <mx:CurrencyFormatter id="cf" currencySymbol="$" /> <mx:Zoom id="piezoom" duration="1000"/>
26
WebFOCUS
WebFOCUS Enable for Adobe Flex Integration For Creating an Interactive PDF
<mx:Script> <![CDATA[ [Embed(source="C:/ibi/apps/flexinpdf/enable.xml",mimeType="application/octet-stream")] public static const XMLFILE:Class; public static const embededXML:XML = setConst(); private static function setConst():XML{ var ba:ByteArray = new XMLFILE() as ByteArray; return new XML(ba.readUTFBytes(ba.length)); } private function init():void { MAIN01.iArray.myXML = embededXML; } ]]> </mx:Script> </mx:Application>
DN4500969.0909
27
28
WebFOCUS