diff --git a/BIRT_Reports/listaCasas.PDF b/BIRT_Reports/listaCasas.PDF index 83b4de0..3a296f3 100644 Binary files a/BIRT_Reports/listaCasas.PDF and b/BIRT_Reports/listaCasas.PDF differ diff --git a/BIRT_Reports/listaCasas.rptconfig b/BIRT_Reports/listaCasas.rptconfig index abbc065..2509719 100644 --- a/BIRT_Reports/listaCasas.rptconfig +++ b/BIRT_Reports/listaCasas.rptconfig @@ -2,16 +2,20 @@ - __isdisplay__prm_uf_76_0 - Todas + __isdisplay__prm_uf_79_0 + Minas Gerais - prm_uf_76_1 - Todas + prm_uf_79_1 + MG - prm_uf_76_type_ + prm_uf_79_type_ string + + prm_uf_79_expr_ + dataSetRow["sigla"] + diff --git a/BIRT_Reports/listaCasas.rptdesign b/BIRT_Reports/listaCasas.rptdesign index 43b9371..068491a 100644 --- a/BIRT_Reports/listaCasas.rptdesign +++ b/BIRT_Reports/listaCasas.rptdesign @@ -6,16 +6,18 @@ ltr 96 - - Informe a UF - static + + Estado + dynamic + estados + dataSetRow["sigla"] + dataSetRow["nome"] string true - - Todas - simple - text-box + list-box + false + true Unformatted @@ -104,6 +106,18 @@ cep + + + uf + prm_uf + uf + string + 12 + 1 + true + false + + estado @@ -222,27 +236,43 @@ "public"."casas_casalegislativa"."cep" FROM "public"."casas_casalegislativa" JOIN "public"."contatos_municipio" JOIN "public"."contatos_unidadefederativa" ON "public"."contatos_municipio"."uf_id" = "public"."contatos_unidadefederativa"."codigo_ibge" ON "public"."casas_casalegislativa"."municipio_id" = "public"."contatos_municipio"."codigo_ibge" + WHERE "public"."contatos_unidadefederativa"."sigla" = ? ORDER BY "estado" ASC, "public"."casas_casalegislativa"."nome" ASC ]]> 1.0 <?xml version="1.0" encoding="UTF-8"?> -<SQLQueryBuilder editorInputType="SQLBuilderStorageEditorInput" name="casas" version="1.0"> -<SQLStatement>SELECT &quot;public&quot;.&quot;contatos_unidadefederativa&quot;.&quot;nome&quot; AS &quot;estado&quot;,&#x0A; &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;nome&quot;, &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;logradouro&quot;,&#x0A; &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;bairro&quot;, &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;email&quot;,&#x0A; &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;pagina_web&quot;, &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;telefone&quot;,&#x0A; &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;cep&quot;&#x0A; FROM&#x0A; &quot;public&quot;.&quot;casas_casalegislativa&quot; JOIN &quot;public&quot;.&quot;contatos_municipio&quot; JOIN &quot;public&quot;.&quot;contatos_unidadefederativa&quot; ON &quot;public&quot;.&quot;contatos_municipio&quot;.&quot;uf_id&quot; = &quot;public&quot;.&quot;contatos_unidadefederativa&quot;.&quot;codigo_ibge&quot; ON &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;municipio_id&quot; = &quot;public&quot;.&quot;contatos_municipio&quot;.&quot;codigo_ibge&quot;&#x0A; ORDER BY &quot;estado&quot; ASC, &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;nome&quot; ASC&#x0A;</SQLStatement> +<SQLQueryBuilder editorInputType="SQLBuilderStorageEditorInput" name="casas" preparableSQLText="SELECT &quot;public&quot;.&quot;contatos_unidadefederativa&quot;.&quot;nome&quot; AS &quot;estado&quot;,&#x0A; &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;nome&quot;, &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;logradouro&quot;,&#x0A; &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;bairro&quot;, &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;email&quot;,&#x0A; &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;pagina_web&quot;, &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;telefone&quot;,&#x0A; &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;cep&quot;&#x0A; FROM&#x0A; &quot;public&quot;.&quot;casas_casalegislativa&quot; JOIN &quot;public&quot;.&quot;contatos_municipio&quot; JOIN &quot;public&quot;.&quot;contatos_unidadefederativa&quot; ON &quot;public&quot;.&quot;contatos_municipio&quot;.&quot;uf_id&quot; = &quot;public&quot;.&quot;contatos_unidadefederativa&quot;.&quot;codigo_ibge&quot; ON &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;municipio_id&quot; = &quot;public&quot;.&quot;contatos_municipio&quot;.&quot;codigo_ibge&quot;&#x0A; WHERE &quot;public&quot;.&quot;contatos_unidadefederativa&quot;.&quot;sigla&quot; = ?&#x0A; ORDER BY &quot;estado&quot; ASC, &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;nome&quot; ASC&#x0A;" version="1.0"> +<SQLStatement>SELECT &quot;public&quot;.&quot;contatos_unidadefederativa&quot;.&quot;nome&quot; AS &quot;estado&quot;,&#x0A; &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;nome&quot;, &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;logradouro&quot;,&#x0A; &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;bairro&quot;, &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;email&quot;,&#x0A; &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;pagina_web&quot;, &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;telefone&quot;,&#x0A; &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;cep&quot;&#x0A; FROM&#x0A; &quot;public&quot;.&quot;casas_casalegislativa&quot; JOIN &quot;public&quot;.&quot;contatos_municipio&quot; JOIN &quot;public&quot;.&quot;contatos_unidadefederativa&quot; ON &quot;public&quot;.&quot;contatos_municipio&quot;.&quot;uf_id&quot; = &quot;public&quot;.&quot;contatos_unidadefederativa&quot;.&quot;codigo_ibge&quot; ON &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;municipio_id&quot; = &quot;public&quot;.&quot;contatos_municipio&quot;.&quot;codigo_ibge&quot;&#x0A; WHERE &quot;public&quot;.&quot;contatos_unidadefederativa&quot;.&quot;sigla&quot; = :uf&#x0A; ORDER BY &quot;estado&quot; ASC, &quot;public&quot;.&quot;casas_casalegislativa&quot;.&quot;nome&quot; ASC&#x0A;</SQLStatement> <connInfo>postgres_8.x:Transient.org.eclipse.datatools.enablement.postgresql.connectionProfile:sigi:sigi</connInfo> <omitSchemaInfo>false:true:</omitSchemaInfo> <editorInputUsageOptions>useWindowState=true</editorInputUsageOptions> -<windowState height="698" version="1.0" width="1211"> -<control height="217" isHideable="true" isVisible="true" name="SQLSourceViewer" width="1186"/> -<control height="229" isHideable="true" isVisible="true" name="DesignViewer" width="1199"/> -<control height="220" isHideable="true" isVisible="true" name="GraphControl" width="1191"/> -<control height="220" isHideable="true" isVisible="false" name="OutlineViewer" width="175"/> +<windowState height="668" version="1.0" width="1209"> +<control height="205" isHideable="true" isVisible="true" name="SQLSourceViewer" width="1184"/> +<control height="222" isHideable="true" isVisible="true" name="DesignViewer" width="1197"/> +<control height="209" isHideable="true" isVisible="true" name="GraphControl" width="1189"/> +<control height="209" isHideable="true" isVisible="false" name="OutlineViewer" width="155"/> </windowState> </SQLQueryBuilder> 2.0 + + + + In + + + uf + 1 + + 12 + 2 + + + + @@ -414,6 +444,149 @@ +]]> + + + parameterMetaData + 1,uf + + + + + + + nome + nome + nome + + + sigla + sigla + sigla + + + + + sigla + 0 + asc + unknown + false + + + + + + 1 + nome + string + + + 2 + sigla + string + + + + sigi + + + 1 + nome + nome + string + 12 + + + 2 + sigla + sigla + string + 12 + + + + + 1.0 + <?xml version="1.0" encoding="UTF-8"?> +<SQLQueryBuilder editorInputType="SQLBuilderStorageEditorInput" name="Conjunto de Dados" version="1.0"> +<SQLStatement>SELECT &quot;nome&quot;, &quot;sigla&quot;&#x0A; FROM &quot;public&quot;.&quot;contatos_unidadefederativa&quot;&#x0A; ORDER BY &quot;sigla&quot; ASC&#x0A;</SQLStatement> +<connInfo>postgres_8.x:Transient.org.eclipse.datatools.enablement.postgresql.connectionProfile:sigi:sigi</connInfo> +<omitSchemaInfo>false:true:</omitSchemaInfo> +<editorInputUsageOptions>useWindowState=true</editorInputUsageOptions> +<windowState height="497" version="1.0" width="685"> +<control height="153" isHideable="true" isVisible="true" name="SQLSourceViewer" width="660"/> +<control height="158" isHideable="true" isVisible="true" name="DesignViewer" width="673"/> +<control height="154" isHideable="true" isVisible="true" name="GraphControl" width="665"/> +<control height="154" isHideable="true" isVisible="false" name="OutlineViewer" width="198"/> +</windowState> +</SQLQueryBuilder> + + + + 2.0 + + + + + + + nome + 1 + + 12 + 25 + 0 + NotNullable + + nome + + + + nome + + 25 + + + + + + + sigla + 2 + + 12 + 2 + 0 + NotNullable + + sigla + + + + sigla + + 2 + + + + + + + + + sigla + + Ascending + false + + + + + ]]> @@ -466,35 +639,44 @@ 10.447916666666666in - 1.9375in + 1.3958333333333333in - 7.03125in + 7.71875in - 1.4791666666666667in + 1.3333333333333333in - 1.1267605633802817in - 1.6901408450704225in + 0.6770833333333334in + 1.0104166666666667in embed logo-interlegis.jpg - - html - SENADO FEDERAL -

SINTER - Secretaria Especial do Interlegis

-

Listagem das Casas Legislativas por Estado

]]>
-
+ + +
+ right - 1.3333333333333333in - 1.2708333333333333in + 0.8020833333333334in + 0.7708333333333334in embed logo-senado.png @@ -617,7 +799,7 @@ false
- 0.6145833333333334in + 0.3645833333333333in #F0F0F0 center @@ -625,6 +807,7 @@ 1 middle + bold estado @@ -642,7 +825,7 @@ - 0.9270833333333334in + 0.6770833333333334in #000000 dotted thin diff --git a/BIRT_Reports/src/reportMenu.py b/BIRT_Reports/src/reportMenu.py new file mode 100644 index 0000000..a6ff54d --- /dev/null +++ b/BIRT_Reports/src/reportMenu.py @@ -0,0 +1,29 @@ +''' +Created on 27/04/2011 + +@author: sesostris +''' + +import os +import xml.dom.minidom as minidom + +path="../" # insert the path to the directory of interest here +dirList=os.listdir(path) +for fname in dirList: + if fname.find(".rptdesign") != -1: + nome = fname + titulo = "- Sem titulo -" + + doc = minidom.parse(path+fname) + root = doc.childNodes.item(0) + + for element in root.childNodes: + if (element.localName == "text-property" and element.hasAttribute("name")): + name = element.getAttribute("name") + value = element.childNodes[0].data + if name == "title": + titulo = value + elif name == "displayName": + nome = value + + print nome + ": " + titulo diff --git a/BIRT_Reports/src/reportParamForm.py b/BIRT_Reports/src/reportParamForm.py new file mode 100644 index 0000000..d91590b --- /dev/null +++ b/BIRT_Reports/src/reportParamForm.py @@ -0,0 +1,31 @@ +''' +Created on 02/05/2011 + +@author: sesostris +''' + +import os +import sys +import xml.dom.minidom as minidom + +fileName = "../listaCasas.rptdesign" + +doc = minidom.parse(fileName) +parameterTags = doc.getElementsByTagName("parameters") + +for parameterTag in parameterTags: + formFields = {} + for parameter in parameterTag.childNodes: + if parameter.nodeName != '#text': + formField = {} + + for property in parameter.childNodes: + if property.nodeName != '#text': + formField[property.getAttribute('name').encode('ascii')] = property.childNodes[0].nodeValue + + formFields[parameter.getAttribute('name').encode('ascii')] = formField + +print formFields + +for fieldName in formFields: + print fieldName, ':', formFields[fieldName]['valueType'] \ No newline at end of file diff --git a/BIRT_Reports/src/reportPrinter.py b/BIRT_Reports/src/reportPrinter.py new file mode 100644 index 0000000..29b7869 --- /dev/null +++ b/BIRT_Reports/src/reportPrinter.py @@ -0,0 +1,5 @@ +''' +Created on 27/04/2011 + +@author: sesostris +'''