source: EDIS/trunk/java/tracking-ui-core/src/main/flex/gov/va/med/edp/view/reports/print/ReportDataGridPrintView.mxml@ 1227

Last change on this file since 1227 was 1227, checked in by George Lilly, 13 years ago

initial load of EDIS 1.0

File size: 2.6 KB
Line 
1<?xml version="1.0"?>
2<!-- Custom control to print the DataGrid control on multiple pages. -->
3
4<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" backgroundColor="#FFFFFF"
5 paddingBottom="20" paddingLeft="20" paddingTop="30" paddingRight="20" xmlns:print="gov.va.med.edp.view.reports.print.*">
6
7 <mx:Script>
8 <![CDATA[
9 import gov.va.med.edp.view.reports.ActivityReportView;
10 import mx.core.*
11 // Declare and initialize the variables used in the component.
12 // The application sets the actual prodTotal value.
13 [Bindable]
14 public var pageNumber:Number = 1;
15 [Bindable]
16 public var lblHeaderText:String = "";
17 [Bindable]
18 public var lblFooterText:String = "";
19
20 // Control the page contents by selectively hiding the header and
21 // footer based on the page type.
22 public function showPage(pageType:String):void {
23 if(pageType == "first" || pageType == "middle") {
24 // Hide the footer.
25 footer.includeInLayout=false;
26 footer.visible = false;
27 }
28 if(pageType == "middle" || pageType == "last") {
29 // The header won't be used again; hide it.
30 header.includeInLayout=false;
31 header.visible = false;
32 }
33 if(pageType == "last") {
34 // Show the footer.
35 footer.includeInLayout=true;
36 footer.visible = true;
37 }
38 //Update the DataGrid layout to reflect the results.
39 validateNow();
40 }
41 ]]>
42 </mx:Script>
43
44 <!-- The template for the printed page, with the contents for all pages. -->
45
46 <print:ReportHeader id="header" lblText="{lblHeaderText}" fontWeight="bold"/>
47 <!-- The data grid. The sizeToPage property is true by default, so the last
48 page has only as many grid rows as are needed for the data. -->
49 <mx:PrintDataGrid id="reportDataGrid" width="100%" height="100%">
50 <!-- add columns to this grid programatically.. -->
51 </mx:PrintDataGrid>
52
53 <!-- Create a FormPrintFooter control and set its prodTotal variable. -->
54 <mx:HBox width="100%">
55 <print:ReportFooter id="footer" lblText="{lblFooterText}" />
56 <!--mx:VBox horizontalAlign="right">
57 <mx:Label text="Page {pageNumber}"/>
58 </mx:VBox-->
59 </mx:HBox>
60
61</mx:VBox>
Note: See TracBrowser for help on using the repository browser.