Thursday, September 27, 2012

The Report Output

The Report Output

Step By Step

The Full Report

Image:TradeStmt1.png Image:TradeStmt2.png

The Summary Report

  • If, when you printed the report, you had not selected List Sources then the Report would have appeared as follows.
Image:RptSummary.png
  • We hope the above is helpful. Please let us know of any improvements that would help others.

Create The Report

Create The Report

Step By Step
  • First create a Financial Report record associating the Line Set and Column Set. Then click the “Create Report” button.
Image:CreateReport.png

Run The Report

  • Select the desired parameters.
Image:RptParams.png
  • The report output will come to the screen as a print preview.

Modify the Print Format

  • Click on the “Customize Report” button when looking at the print preview.
  • Notice the Print Table Format. Zoom to it and it is set up as follows and then select it.
Image:PrtFormatMod.png

Create the Print Table Format

Image:PrintTableFormat.png
  • Then select the Print Table Format into the Print Format.

Report Lines

Report Lines


Step By Step
  • Select Report Line Set from the menu and create a record.
Image:ReportLineSet.png

The Report Line

Image:ReportLine.png

Report Source for the Line

Image:ReportSource.png

A Line Record that Prints a Blank Line

Image:ReportLineBlank.png
  • The Line Name is a space character – it prints about a half line space. If you use a “ . “ instead it will leave a whole line space.

A Line with a Calculation

Image:ReportLineCalc.png

The Working Parts of a Report Line Set

Image:RptLineSetWork.png
  • Note: any words in the ‘Calculation’ column where Segment Value is shown in the Line Type column are not required and not shown when you view in Form view.

Financial Report Writer

Financial Report Writer

Introduction
  • This tutorial is created by ADAXA, Australia for the benefit of the ADempiere community.
  • The following is a worked example of using the Adempiere Financial Report Writer to achieve a simple report with a reasonably pleasing appearance.
  • It was prepared using version 352a alpha release and uses some features introduced in that version.
  • The new features are stated in The Report Setup Steps.
Image:TradeStmt1.png Image:TradeStmt2.png

Report Setup Steps

Report Setup Steps

Step By Step
  • Create a sensible tree for your Accounts Elements
Image:AcctElement.png
  • A second more exploded view:
Image:AcctElement2.png
  • Now please go to the Financial Reports section of the main menu
Image:FinReportMenu.png
  • Create a FInancial Report Column Set
    • Select as shown below
Image:RptColumn.png
  • Create the Report Columns
Image:RptColLine.png
  • New features in 352a:
    • The Name field is using the @Period@ to pick up the Period Name
    • The Format Pattern is set to #,### . This says “print in whole dollars and use commas to separate the thousands.
    • If the numbers were large enough you could also select “Factor” and choose rounded thousands or millions.
  • The Year-To-Date Column Definition
Image:RptColLine2.png

Tuesday, September 25, 2012

Jasper Reports and Adempiere Integration

Step 1. Open iReport tool and follow these steps to create a report:
1. Click on File menu and select New Document menu option. Specify name of the report, say, “mycommreport”.

2. Click on Data menu and select Query Report menu option
3. In the Query Report window, click on Query Designer. This you will show you the query builder interface

4. Select the “schema” and “type filter”, then you will be displayed all the tables and views associated to the selection.
Note : Check that the iReport tool is connected to the Database. If not follow the steps as mentioned below :
Steps for establishing Database Connection :
a. Select the “Data” menu item from iReport tool and click on “Connections/DataSources”.
It will populate a window as shown below .

b. Click on New Button to establish the new datasource with the database. It will then populate another window “Connections Properties”

c. select “Database JDBC Connection” and click on “Next”. It will display the following screen, fill the details as follows :

d. Specify name for the connection.(PMS Connection)
di. Select the JDBC Driver from the Drop Down. (there are many drivers, select as per your requirement)
dii. here we are working with PostgreSql, so select the driver as “org.postgresql.Driver”
diii. In JDBC URL , change the database from MYDATABASE to your working database on PSQL.
div. Specify Server Address . (localhost or any other IPAddress where the database is residing )
dv. Specify the Database name as specified in the JDBC URL.(PMS)
dvi. provide the User for the database (adempiere)
dvii. provide the password for the user (adempiere)
dviii. click on Test.
dix. Click on Save.
dx. Also set the postgresql Jar file in the class Path ( postgresql-8.2-504.jdbc4.jar ).
(Options ———> Classpath ——–> Add Jar ——–> postgresql-8.2-504.jdbc4.jar )
Once database is set, then proceed with furthen steps :
5. Select the table(s) from which you want to retrieve the columns and you can view the following screen:

Now you can check the columns, which you want to use in your report.When you are done, click Ok button. iReport will build the query based on your table and columns selections.
Make any changes needed to the generated query and when done, Click OK button
7. Now under Document Structure under Fields, you can view the columns you had selected while you were building the report query (as shown in the figure below).

Now, say, our report uses variables in the query, which will be passed by the user when he/she runs the report. To achieve this, we need to have parameters defined in the report and used in the report query.
For that we need to create parameters in iReport. To do so, select Parameters under Document Structure. Right click on Parameters and select Add option
8. Add a parameter, say, by name commid

a. Specify the Parameter Name as parameter which you want to pass to the query.
b. Select the Parameter Class Type based on the column data type. Please note that this is the Java data type corresponding to the database column type. You can learn about the appropriate type on the Report Query screen
c. Check the Use as a Prompt check box. This will tell the iReport to prompt the user for input for the parameter when the user runs the report from iReport
d. Click OK.
If you have more than one parameter, then repeat the above steps (a,b,c,d)
9. After Adding the Parameters, You shall be able to view the parameters under the Document Structure as shown in the below screen:

10. To make use of the newly added parameter, again go to Report Query window and add the following to the SQL query by editing it,
WHERE
rv_commissionrundetail.”c_commission_id” = $P!{commid}
and
rv_commissionrundetail.”startdate” < '$P!{stdate}'
and
rv_commissionrundetail."enddate" Fields
to the details band of the report design area. To the Column Header, add the column headers by adding the “static text” fields corresponding to the columns. Similarly, add the “Static text” to the “Title” and specify the Title for the report and also to the column header.

12. Now Click Execute (With active Connection) button to run the report. It prompts you to save the report. Save it. (this will create a file with .jrxml extension)
13. Once you click on execute and you have parameters in your report, you will be prompted to input the parameters. Now you can view the Jasper Report as specified in the below figure

Now we need to integrate this Jasper Report with Adempiere….
1. Login as System/System
2. “Select Report & Process” click on “New Report”
3. Input the Name and Description as you wish to assign to the report (My commission report)
4. select Data Access Level as “Client + Organization”
5. Specify class Name as : “org.compiere.report.ReportStarter”
6. Specify the path of Jasper Report which we had created,
(“/opt/Adempiere/jrxml/ mycommreport.jrxml”)
for our example,the path is
“ /home/user4/Desktop/zzzzzzz/mycommreport.jrxml “

7. Now select “parameter” Tab and click on “New”, click on Grid Toggle
8. Specify the Name and description of the parameter.
9. Specify the “DB Column Name” widget value as name of the parameter we have specified for Jasper Report.
10. Also specify the reference corresponding to the Column. (Number,String, etc..)
11. Continue this for all the parameters you have specified as input.

Note :
“Make sure that the parameter names in the Jasper Report and the “DB Column Name” widget value are exactly the same.”
12. Once process is done,
Go to “Menu” :
a. Specify the Name and Description as you want to assign to the menu.
b. Select “Action” as “Process” and
c. “Process” as the process which we have defined earlier.

13. Save it, Log out and again login as System.
14. Search for the menu which you have created (My Commission Report)

15. Click on the process (My Commission Report)
16. It prompts you to specify the parameters , specify the parameters and click “Start”

17. Now You can view the Jasper Report as shown in the below figure :


Jasper Report with Web Version

1. Start the server, login as System/ System
2. Search for “My Commision Report” menu. Click on it. The following screen will appear:

3. Input the details as shown above and click on start botton.
4. Now a pop up will appear prompting us to Open or Save the Jasper Report.
It is up to the User to Save or Open. This shown in below screen. Select the mode and click ok.

5. Now, the Jasper Report will open or saved. The Jasper Report will appear as follows, which will generate the desired report.

In this article – Walking Tree has explained how to work with Jasper reports and how to integrate jasper reports with Adempiere. In case you need any professional assistance, you can always find our contact details at our company website.
Walking Tree has huge experience in implementing Adempiere for its customer and we will be happy to assist you in taking advantage of Adempiere as well.

Friday, September 14, 2012

Tutorial for Adempiere with Screen Shot

Hi everyone that want to know about Adempiere usage. I have good link from blogger. Please check this link.
                  http://mysoftreviews.blogspot.com/


This link is used for : learning J2EE

                http://www.itkids.in/2009/08/chapter-01-introduction-to-j2ee.html

Thanks!

Wednesday, September 12, 2012

Could not view Adempiere Accounting Element?

Where is my Compiere Accounting Information?

A common question I have seen is Why do I get the message 'With your current role and settings you cannot view this information' or Why can't I see the Not Posted / Posted button on Documents? By its nature, accounting information contains sensitive data and companies generally want to restrict access.  In Compiere this is done through a combination of Security and Preferences.
In Compiere, accounting information can be accessed in a number of ways. These include windows like Accounting Fact Details, Account Elements, Accounting tabs, the Posted button on Documents and the Account Info window.  The challenge in security is to ensure that you can restrict access from any angle or access vehicle.
First step is Data Access.  In Compiere the Role a user is assigned to and accesses the application with determines what windows, reports, processes, forms and data can be accessed.  If a user does not have access to a specific table (Accounting Fact Details for example) then that window will not appear in their menu when logging in.  Therefore, in a users Role you would ensure that they do not have access to the appropriate windows.  This will prevent the direct access. Next step is the Role definition.  In the Role window there is a check box 'Show Accounting'.  If this check box is selected then a user who logs into the application with this role could view the Not Posted / Posted Button (and therefore access the Account Info window).
Lastly, is User Preferences. You access the Preferences from Tools / Preferences.  There is a flag in the Preferences Window called Show Accounting Tabs.  This should be selected to see items like the default accounts for Business Partner Group or the Not Posted / Posted button. Note: If a user's Role does not have the Show Accounting check box selected then this field is deselected and protected in the Preferences window.
So, if a user should have access to Accounting Data you should check the following:
  • What Role are they using and does that Role have access to the desired window?
  • Does the Role have the Show Accounting check box selected?
  • In Preferences, is the Show Accounting Tabs check box selected?
You can also define more granular access like restricted access to specific accounts.  Look for future Hints and Tips for details on how data level security works in Compiere!

Monday, September 10, 2012

Eclipse Web Tools Platform 2.0

Eclipse Web Tools Platform 2.0 - New and Noteworthy

Back
WTP 2.0 features the debut of exciting functionality from the new JavaServer Faces component and improvements in supporting JSP 2.0 and Java EE 5. A webinar for the JavaServer Faces Tools project showcasing some of these features was recorded and is available from here .

JSP

Support for Tag Handlers from Tag files

    Custom tags declared by JSP 2.0 tag files are now supported for use by the JSP editor as well as validation and debugging.

    tagdir attribute in use

    JSP editor editing a .tag file

Content Assist for Tag Library URIs

    Content Assist is now available for the uri and tagdir attributes of Tag Library Directives.

    URI proposals

    Once the URI is specified, it will also offer any values suggested by the library for the prefix.

    prefix proposals

Tag Library Directive Validation

    The JSP Validator will now report if it can not find the library referred to by a Tag Library Directive, as well as any problems it finds regarding the prefix value.

    sample taglib directive warning

Include directive validation

    The JSP Syntax Validator now warns when the JSP segment referred to by an include directive can not be found.

    warning on bad file value

New JSP Content validator

    There is now a separate validator for JSP content versus just using the validator of the embedded content type within JSP. For example, users are now able to enable HTML Syntax validation in their HTML files while disabling JSP content validation (i.e. HTML content within a JSP file).

    The new validator in the Validation preference page

Hyperlinking to custom tag declarations

    Activating hyperlinks within custom tag names will open the tag library descriptor or tag file that declares the custom tag.

    hyperlink showing on a custom tag

Java EE Tools

JavaEE 5 projects are now runnable

    Support for deploying JavaEE projects on a JavaEE-compliant server now includes JavaEE 5 . This was tested using Servlet 2.5 projects on Apache Tomcat 6 and Geronimo application servers. For JavaEE 5, some servers may still require deployment descriptors, even though they are optional. By default, they are only generated for Dynamic Web projects. Check your server documentation for details.

Easier publishing of dependencies

    Entries on the Java Build Path can now be added to the published structure of J2EE module projects through the J2EE Module Dependencies properties page.

    First, add the desired library or classpath container to the Java Build Path
     J2EE Module Dependencies page on a web project

    Then select the library so it will be published in the module (Web Library dependencies will be published to /WEB-INF/lib, J2EE Module dependencies will be published to the EAR root)
     Module Dependencies property page on a web project

     Module Dependencies property page on an EAR project
    The resolved contributions from entries published to the EAR root will be displayed in the J2EE Module Dependencies page for the EAR project as grayed items.

    Adopters may also make use of corresponding new APIs found in the org.eclipse.jst.j2ee.classpathdep package of the org.eclipse.jst.j2ee plug-in.

More flexible validation

    The validation framework now supports Content Types, so additional filename added to content types on the Content Type preference page will also be validated by their respective validators.

    new filenames being added to an existing content type

    For adopters, new APIs have been added to the validation framework supporting turning on and off individual validators, translating into increased convenience, utility, and performance.

JavaServer Faces

Support for JSF 1.2

    JSF Tools supports JavaServer Faces 1.1 and 1.2 versions.

    Support for JSF 1.1 and 1.2

Web Page Editor

    An enhanced Web Page Editor is now available. Building on the existing JSP editing support, it provides simultaneous synchronized visual and source editing of a Faces JSP in a split pane arrangment, a flyout/detachable palette, enhanced property sheets, a Preview page, and more.

    Web Page Editor sample screenshot

    The layout of the panes, as well as whether to show both, is configurable.

    Web Page Editor sample screenshot

    More planned features and ideas can be found at the editor's wiki page .

Faces Config Editor

    The Faces Configuration Editor is a comprehensive multi-page editor to edit the Faces configuration resource file. It includes a graphical editor to visually define the navigational rules.

    Faces Config Editor sample screenshot

Improved HTML DataTable tag variable support

    EL variables declared using the var attribute on the h:dataTable tag are now recognized by the JSF EL framework. The amount of additional support varies depending on the "value" attribute used to back the variable, the most complete being offered for scalar or array objects with generic Lists.

    content assist popup

JSF Libraries are now regular Classpath Containers

    JSF Libraries make use of the easier publishing of dependencies feature introduced in this release. References to JSF Libraries in a project are made using the standard Java Build Path property page and set to be published/exported using the J2EE Module Dependencies property page, and will appear as JDT Libraries in the Project and Package Explorer views. An upgrade of the JSF Library Registry will automatically occur when an older workspace is opened. The actual references, however, will require a manual upgrade. Information on this can be found at http://wiki.eclipse.org/index.php/JSF_Library_Migration . JSF Library references are still being created at JSF Facet installation time, but if you need to add, modify, or remove references after project creation, you will now be using the standard Java Build Path and J2EE Module Dependencies property pages.

    Creating a JSF Library Reference JSF Libraries as Classpath Containers
    Fig 1. Add Library from Java Build Path

    Add Library from Java Build Path
    Fig. 2 Choose JSF Libraries

    Choose JSF Libraries
    Fig. 3 Select One or More Libraries

    Select One or More Libraries
    Fig. 4 JSF Libraries Added as Classpath Containers to Java Build Path

    JSF Libraries Added as Classpath Containers to Java Build Path
    Fig. 5 Select JSF Libraries for Publish and Export
    Select JSF Libraries for Publish and Export

Custom JSF Servlet Classname

    The JSF servlet classname can now be specified during JSF Facet installation.

    Fig. 6 JSF Servlet Classname in JSF Facet Installation Wizard

EL Validation Severity Configuration

    The severity of problems found during EL validation can now be changed by preferences. We have adapted the UI used by JDT to perform similar severity changes on Java problems.

    Fig. 7 JSF EL Validation Preference Page