30 |
# |
# |
31 |
|
|
32 |
import GRReport, GRSources, GRParameters, GRSortOptions, GRLayout |
import GRReport, GRSources, GRParameters, GRSortOptions, GRLayout |
33 |
from gnue.common import GDataSource, GTypecast, GParser |
from gnue.common import GDataSource, GTypecast, GParser, GTrigger |
34 |
import copy, types |
import copy, types |
35 |
|
|
36 |
|
|
54 |
# the report is initialized and ready to go. |
# the report is initialized and ready to go. |
55 |
####################################################### |
####################################################### |
56 |
|
|
57 |
def loadReport(buffer, connections, initialize=1): |
def loadFile(buffer, connections=None, initialize=1): |
58 |
return GParser.loadXMLObject (buffer, xmlReportHandler, 'GRReport', 'report', |
return GParser.loadXMLObject (buffer, xmlReportHandler, 'GRReport', 'report', |
59 |
initialize, attributes={"_connections": connections}) |
initialize, attributes={"_connections": connections}) |
60 |
|
|
78 |
'SingleInstance': 1, |
'SingleInstance': 1, |
79 |
'Attributes': { |
'Attributes': { |
80 |
'title': { |
'title': { |
81 |
'Typecast': GTypecast.name }, |
'Typecast': GTypecast.text }, |
82 |
'author': { |
'author': { |
83 |
'Typecast': GTypecast.name }, |
'Typecast': GTypecast.text }, |
84 |
'version': { |
'version': { |
85 |
'Typecast': GTypecast.name }, |
'Typecast': GTypecast.name }, |
86 |
'description': { |
'description': { |
87 |
'Typecast': GTypecast.name } } , |
'Typecast': GTypecast.text } } , |
88 |
'ParentTags': None }, |
'ParentTags': None }, |
89 |
|
|
90 |
'parameters': { |
'parameters': { |
106 |
'Typecast': GTypecast.boolean, |
'Typecast': GTypecast.boolean, |
107 |
'Default': 0 }, |
'Default': 0 }, |
108 |
'default': { |
'default': { |
109 |
'Typecast': GTypecast.name }, |
'Typecast': GTypecast.text }, |
110 |
'description': { |
'description': { |
111 |
'Required': 1, |
'Required': 1, |
112 |
'Typecast': GTypecast.name }, |
'Typecast': GTypecast.text }, |
113 |
'source': { |
'source': { |
114 |
'Typecast': GTypecast.name }, |
'Typecast': GTypecast.name }, |
115 |
'type': { |
'type': { |
258 |
'BaseClass': GRParameters.GRConditionParam } |
'BaseClass': GRParameters.GRConditionParam } |
259 |
})) |
})) |
260 |
|
|
261 |
|
# |
262 |
|
# Add trigger elements |
263 |
|
# |
264 |
|
xmlElements.update( |
265 |
|
GTrigger.getXMLelements( |
266 |
|
updates={'trigger':{ |
267 |
|
'ParentTags': ('report',)}, |
268 |
|
})) |
269 |
|
|
270 |
|
|
271 |
|
|
272 |
return xmlElements |
return GParser.buildImportableTags('report',xmlElements) |
273 |
|
|
274 |
|
|
275 |
####################################################### |
####################################################### |