Hello,
after few months of fighting with iDempiere, I've finished first part of ReportEditor mentioned here:
It's still in developement mode, so to be able to run this plugin you have to have eclipse installed and run iDempiere from it.
It's created with aid of NetBeans Visual Library and Swing. So it's available in Swing client only. Logging is (for the present) done by Log4J (because of colouring possibility which I love :) )
What it can:
you can easily choose table (or view) to create report to.
you can easily choose paper settings loaded from iDempiere (creation of new paper was intended, so its prepared but not implemented yet, there are some issues to think of first)
You can load picture, freely to change size. The image is then saved as attachment to printformattitem.
Add static text, change text, colour, font (all of this properties are automatically saved in iDempiere system). There can be modified more text elements at the same time.
Insert subreport, which can be easily found with the aid of dialog. It can be relative or absolute positioned.
change header and footer of report by dragging line represented it. (its prepared to allow of dragging of margins too, but not implemented yet)
select multiple elements (for changing positions or properties)
Notes:
All elements are absolutely positioned (except of subreport) and this cant be changed. Relative positioning is complicated, ugly and buggy think. It should be refactored as mentioned below in note about “Field element”)
What it can't:
load old reports (even created by ReportEditor)
set header and footer by inserting values (but it can be easily implemented)
set cling mode where elements are aligned by position of other elements to get better positioning (all elements are totally independent)
set position manually by inserting value
change ordering of elements
insert line and rectangle elements
use relative positioning
automatically control position of elements in report parts (i.e. you can still add absolutely positioned text to report body, this leads to strange behaviour when there is subreport or Field element)
change between form and non form mode
add “Field” element [there is huge need of deep study of PrintEngine (but it's really confusing so for me. Its about weeks or months of study) and the imho the best would be total reinvention of it. (or better to create new one, and let the reports created by Editor to be processed by this new engine)]
use shortcuts and undo functionality (except ctrl + S for saving and Del for deletion)
Automatically prefill values in table chooser based on window from which the editor was run
set relative positioning of element
Known issues:
when saving report without subreports, there is iDempiere error complaining about no column specified. So you have to load report created in idempiere first and then switch to report created by ReportEditor.
When clicked to list of table colums (left bottom side) you cannot delete elements (not know reason and solution yet).
Some screenshots:
You can download sources here:
https://github.com/martin-vavrusak/ReportEditor.git
To be able to run editor there are 3 options:
Programatically
Use MainFrame.runProgram() method.
Inserting button to window panel
apply included patch pridani_tlacitka_do_klienta_(org.adempiere.ui.swing).patch to org.adempiere.ui.swing package (right click on it and choose Team → Apply Patch).
Recompile (clean) this package
After this you can run editor by opening some window with tool panel (eg Purchase Order, Invoice, ...) and clicking on ReportEditor text.
If you don't like the text and want icon, copy “ReportEditor16.png” and “ReportEditor24.png” to “...\org.adempiere.ui.swing\build\org\compiere\images”. (you have to copy it after each cleaning of org.adempiere.ui.swing package)
creating item in menu
Create new process (Application Dictionary -> Report & Process): as a class insert “cz.muni.fi.vavmar.printeditor.IdempiereLauncherProcess”
Create new menu item using this process (System Admin -> General Rules -> Menu)
Note:
when importing project import it as binary project and as “Plugin developement”. Name it “cz.muni.fi.vavmar.reporteditor” otherwise there could be problems with patch.
creating item in menu
Create new process (Application Dictionary -> Report & Process): as a class insert “cz.muni.fi.vavmar.printeditor.IdempiereLauncherProcess”
Create new menu item using this process (System Admin -> General Rules -> Menu)
I'll investigate ...
Unsupported major.minor version 51.0
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
public static final Border selectedBorder = BorderFactory.createDashedBorder(Color.BLACK, 3, 2, 1, true);
DashedBorder
in 1.6... Could you please check if it's working?
Am Mittwoch, 24. September 2014 21:30:00 UTC+2 schrieb Martin V.
--
You received this message because you are subscribed to a topic in the Google Groups "iDempiere" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/idempiere/0nQruQ7hilk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to idempiere+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/12a17d47-a68f-4dee-857c-a6ee8e76fc8f%40googlegroups.com.