KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > openbravo > xmlEngine > Report


1 /*
2  ************************************************************************************
3  * Copyright (C) 2001-2006 Openbravo S.L.
4  * Licensed under the Apache Software License version 2.0
5  * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
6  * Unless required by applicable law or agreed to in writing, software distributed
7  * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
8  * CONDITIONS OF ANY KIND, either express or implied. See the License for the
9  * specific language governing permissions and limitations under the License.
10  ************************************************************************************
11 */

12 package org.openbravo.xmlEngine;
13
14 import org.openbravo.data.FieldProvider;
15
16 public class Report {
17   XmlDocument xmlDocument;
18
19   public Report(String JavaDoc strReportFile, String JavaDoc[] discard, XmlEngine xmlEngine) {
20     xmlDocument = xmlEngine.readXmlTemplate(strReportFile, discard).createXmlDocument(null);
21   }
22
23   public void setParameter(String JavaDoc strName, String JavaDoc strValue) {
24     xmlDocument.setParameter(strName, strValue);
25   }
26
27   public void setData(String JavaDoc structureName, FieldProvider[] data) {
28     xmlDocument.setData(structureName, data);
29   }
30
31   public void setData(String JavaDoc xmlDocumentName, String JavaDoc structureName, FieldProvider[] data) {
32     xmlDocument.setData(xmlDocumentName, structureName, data);
33   }
34
35   public void setDataArray(String JavaDoc xmlDocumentName, String JavaDoc structureName, FieldProvider[][] data) {
36     xmlDocument.setDataArray(xmlDocumentName, structureName, data);
37   }
38
39   public String JavaDoc print() {
40     return xmlDocument.print();
41   }
42
43   public String JavaDoc print(String JavaDoc strText) {
44     return xmlDocument.print(strText);
45   }
46 }
47
Popular Tags