Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 49ad560
Showing
46 changed files
with
12,879 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
sfPlugins | ||
========= | ||
|
||
reportPlugin | ||
============ | ||
ReportPugin has the following dependencies, which I can package all together: | ||
* Word2FO a great tool from RenderX http://www.renderx.com/tools/word2fo.html | ||
which I modified so that you can create XSLT stylesheets that consume XML data | ||
instead of a final XSLFO document. I distribute the Path though, | ||
(in reportPlugin\doc\Word2FO.patch). RenderX.com will ask for your mail to let | ||
you download the stylesheet, which comes with full license (text from RenderX's | ||
page ..."These stylesheets were prepared by RenderX's development team and | ||
Microsoft for general use."...). This is used for templating, not in the rendering | ||
process, but it makes life easier. How to edit Word Documents to take advantage | ||
of my changes is detailed in reportPlugin\doc\HowToReport.docx | ||
* ApacheFOP an open source FO Processor, made in java, for which I made a wrapper | ||
and some classes to consume it as a web service (you must deploy it on an | ||
application server for that, i.e. Glassfish) or from Command line (renderer Class | ||
for command line usage of FOP is on the way). | ||
* fo2html.xsl Also from RendeX (http://services.renderx.com/Content/tools/fo2html.html), | ||
which I modified a bit, not finished nor tested yet, to generate HTML that Excel | ||
understands, and alter default table width. This is used for rendering the report in HTML. | ||
You should put this stylesheet in reportPlugin\lib\RenderStep3\xsl\fo2html.xsl to match | ||
sfExportGlobals.yml configuration | ||
|
||
Note: you can find both stylesheets in the Free tools Section at http://www.renderx.com/download/shop.html | ||
|
||
Take a look at the HowToReport to see what can be done: | ||
https://github.com/juanmf/sfPlugins/blob/master/reportPlugin/doc/HowToReport.docx?raw=true |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
1) You need to enable php_soap.dll & php_xsl.dll extensions | ||
2) Register Plugin in ProjectConfiguration.php | ||
3) Enable_module "export" in setting.yml | ||
4) Copy reportPlugin/config/sfExportConfig.yml to app/config | ||
5) In sfExportConfig.yml you define the location of you reports XSLT stylesheets | ||
6) To see some example reports copy reportPlugin/modules/export/templates/reports | ||
directory to app/templates | ||
7) You can open <domain>/export to see what reports you have defined, and test them. | ||
8) @see reportPlugin/modules/export/actions/actions.class.php (render action) for | ||
an example of how to use LayoutManager::render() | ||
9) install Glassfish, from Netbeans: | ||
9.1) open the project WebFopWrapper2 | ||
9.2) right click => clean and build | ||
9.3) right click => deploy | ||
9.3.1) fin in the output the following URL: | ||
| INFO: WS00019: EJB Endpoint deployed | ||
| WebFOPWrapper2 listening at address at http://juanmf-PC:8080/DecretoRenderService/DecretoRender | ||
this should match the value of RenderPDFConsummer::$_wsLocation (I'll put this | ||
value in config yml soon) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
config/sfExportConfig.yml: | ||
file: %SF_PLUGINS_DIR%/reportPlugin/lib/config/sfExportConfigHandler.class.php | ||
class: sfExportConfigHandler | ||
param: | ||
prefix: mod_export_ | ||
config/sfExportGlobals.yml: | ||
file: %SF_PLUGINS_DIR%/reportPlugin/lib/config/sfExportConfigHandler.class.php | ||
class: sfExportConfigHandler | ||
param: | ||
prefix: mod_export_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
#reports: | ||
# EstadisticaMensualCuadro1: | ||
# name: PLANILLA DE ESTADÍSTICA MENSUAL - NIVEL PRIMARIO - CUADRO 1 | ||
# step1: # make the logical screen. See "Two steps view" pattern | ||
# logical_screen_callback: [LogicalScreenCallbacks, planillaEstadisticaCuadro1] | ||
# callback_params: ~ # [p1, p2, ..] using this key, the action can pass parameters too. | ||
# step2: | ||
# structure: | ||
# default: | ||
# layout: | ||
# class: ~ # defaults to sfExportGlobals[globals][step2][structure_class][parent] | ||
# # if have childs, sfExportGlobals[globals][step2][structure_class][leaf] other wise. | ||
# nodes: '/result' # A XPath expresion selecting logical_screen nodes for this view. | ||
# xslt_structure: | ||
# sheet: '/templates/reports/PlanillaEstadisticaCuadro1/PlanillaEstadisticaCuadro1.fo.xml' # A XML to FO transformation adding structure. Path from %sf_app_module_dir% | ||
# params: {} # Associative array with relevant parameters for this xslt. | ||
# xslt_style: | ||
# sheet: ~ # A FO to FO transformation adding style. Path from %sf_app_module_dir% | ||
# params: {} # Associative array with relevant parameters for this xslt. | ||
# | ||
# listado_personas_x_edad: | ||
# name: Listado de Personas Por Edad | ||
# step1: # make the logical screen. See "Two steps view" pattern | ||
# logical_screen_callback: [LogicalScreenCallbacks, listadoPersonasXedad] | ||
# callback_params: ~ # [p1, p2, ..] using this key, the action can pass parameters too. | ||
# step2: | ||
# structure: | ||
# default: | ||
# layout: | ||
# class: ~ # defaults to sfExportGlobals[globals][step2][structure_class][parent] | ||
# # if have childs, sfExportGlobals[globals][step2][structure_class][leaf] other wise. | ||
# nodes: '//result' # A XPath expresion selecting logical_screen nodes for this view. | ||
# xslt_structure: | ||
# sheet: '/templates/reports/ListPersonasEdad/ListPersonasEdad.fo.xsl' # A XML to FO transformation adding structure. Path from %sf_app_module_dir% | ||
# params: {} # Associative array with relevant parameters for this xslt. | ||
# xslt_style: | ||
# sheet: ~ # A FO to FO transformation adding style. Path from %sf_app_module_dir% | ||
# params: {} # Associative array with relevant parameters for this xslt. | ||
# | ||
# listado_personas: | ||
# name: Listado de Personas | ||
# step1: # make the logical screen. See "Two steps view" pattern | ||
# logical_screen_callback: [LogicalScreenCallbacks, listadoPersonas] | ||
# callback_params: ~ # [p1, p2, ..] using this key, the action can pass parameters too. | ||
# step2: | ||
# structure: | ||
# default: | ||
# layout: | ||
# class: ~ # defaults to sfExportGlobals[globals][step2][structure_class][parent] | ||
# # if have childs, sfExportGlobals[globals][step2][structure_class][leaf] other wise. | ||
# nodes: '/*' # A XPath expresion selecting logical_screen nodes for this view. | ||
# xslt_structure: | ||
# sheet: '/templates/reports/ListPersonas/ListPersonasHeader.fo.xml' # A XML to FO transformation adding structure. Path from %sf_app_module_dir% | ||
# params: {} # Associative array with relevant parameters for this xslt. | ||
# xslt_style: | ||
# sheet: ~ # A FO to FO transformation adding style. Path from %sf_app_module_dir% | ||
# params: {} # Associative array with relevant parameters for this xslt. | ||
# children: | ||
# persona_list_body: | ||
# class: ~ # defaults do sfExportGlobals[globals][step2][structure_class][parent] | ||
# # if have childs, sfExportGlobals[globals][step2][structure_class][leaf] other wise. | ||
# nodes: '//result' # A XPath expresion selecting logical_screen nodes for this view. | ||
# xslt_structure: | ||
# sheet: '/templates/reports/ListPersonas/ListPersonasBody.fo.xml' # A XML to FO transformation adding structure. Path from %sf_app_module_dir% | ||
# params: {} # Associative array with relevant parameters for this xslt. | ||
# xslt_style: | ||
# sheet: ~ # A FO to FO transformation adding style. Path from %sf_app_module_dir% | ||
# params: {} # Associative array with relevant parameters for this xslt. | ||
# | ||
# relevaiento_inicial: | ||
# name: hello world | ||
# step1: # make the logical screen. See "Two steps view" pattern | ||
# logical_screen_callback: [LogicalScreenCallbacks, helloworld] | ||
# callback_params: ~ # [p1, p2, ..] using this key, the action can pass parameters too. | ||
# step2: | ||
# structure: | ||
# default: | ||
# layout: | ||
# class: ~ # defaults do sfExportGlobals[globals][step2][structure_class][parent] | ||
# # if have childs, sfExportGlobals[globals][step2][structure_class][leaf] other wise. | ||
# nodes: '/*' # A XPath expresion selecting logical_screen nodes for this view. | ||
# xslt_structure: | ||
# sheet: '/templates/reports/helloworld/helloworld.xsl' # A XML to FO transformation adding structure. Path from %sf_app_module_dir% | ||
# params: {} # Associative array with relevant parameters for this xslt. | ||
# xslt_style: | ||
# sheet: ~ # A FO to FO transformation adding style. Path from %sf_app_module_dir% | ||
# params: {} # Associative array with relevant parameters for this xslt. | ||
## children: | ||
## juan: | ||
## class: ~ # defaults do CompositeView if have childs, View other wise. | ||
## nodes: '//Persona' # A XPath expresion selecting logical_screen nodes for this view. | ||
## xslt_structure: | ||
## sheet: '/templates/reports/helloworld/hello2.xsl' # A XML to FO transformation adding structure. | ||
## params: {} # Associative array with relevant parameters for this xslt. | ||
## xslt_style: | ||
## sheet: ~ # A FO to FO transformation adding style. | ||
## params: {} # Associative array with relevant parameters for this xslt. | ||
## children: ~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
globals: | ||
step2: | ||
structure_class: | ||
parent: CompositeView | ||
leaf: View | ||
step3: | ||
available_output: [HTML, XSLFO, XLS, PDF] | ||
output_format: HTML # this is usead, and should be set by the action, to select the renderer. | ||
default: HTML | ||
HTML: | ||
class: RenderHtml | ||
xslt_output: | ||
sheet: /lib/RenderStep3/xsl/fo2html.xsl # xslt FO to HTML use system default if null. Path from %sf_app_module_dir% | ||
params: {} # Associative array with relevant parameters for this xslt. | ||
|
||
XSLFO: | ||
class: RenderFo | ||
xslt_output: | ||
sheet: ~ # xslt FO to HTML use system default if null. | ||
params: {} # Associative array with relevant parameters for this xslt. | ||
XLS: | ||
class: RenderXls | ||
xslt_output: | ||
sheet: ~ # xslt FO to HTML use system default if null. | ||
params: {} # Associative array with relevant parameters for this xslt. | ||
PDF: | ||
class: RenderPdfSoap # Use ApacheFop through WEB SERVICE | ||
# class: RenderPdfbridge # TODO: Use ApacheFop through Java Bridge | ||
xslt_output: | ||
sheet: ~ # xslt FO to HTML use system default if null. | ||
params: {} # Associative array with relevant parameters for this xslt. |
Binary file not shown.
Oops, something went wrong.