Tuesday 18 June 2013

Creating charts in iReport


To design Charts using iReport follow the steps--

1-Open iReport and go to report palatte and Drag charts to Detail band.


2- Select the charts from open window shown below.


3- And click on 3d bar chart. and click on finish button.



4- Right click on chart and click on chart data and fill the chart data as shown in figure.


5- Now press ok and click on preview if your iReport is connected to any database.







Java typecast and conversion of one data type to another

                                     Java Data Type Casting

                                          Integer

 int a=10;
Int to String    --        String b=a+””;  or  b=a.toString();
 Int to char             Char b=(char)a;
 int to long      --        long b=Long.valueOf(a);
int to double   --        double b=a;
int to float       --        float b=a;

                                         String

String a="harsh";
int index=1

String to char -- char b=a.charAt(index);
String to int --       int b=Integer.parseInt("10");
String to long --   long b=Integer.parseInt("10");
String to double--   double b=Float.parseFloat("10.00");
String to float--   float b=Float.parseFloat("10.00");





Tuesday 4 June 2013

iReport

                                                                     iReport

Report Inspector –
  

Parameters- these are the parameters which we send from outside the report like (in case of java we send them as Hash map parameters) , there value remain same throughout the report.

Fields-  These are fields which are defined as same name as in DATABASE COLOUMN or DATASOURCE object fields. They are generally used in DETAIL band of reports and repeat there value according to the list provide in datasource or column row in database.

Variable – these are same as programming variable but only change is, we can change there value in variable expression.

Title BAND – Used for report title , Appear once in report life cycle

Page Header BAND – Used to write page header, appear on every page of report.

Column Header – Appear top of every column in detail band. detail fields are exactly same left as static text of column headers.

Detail BAND- Fields which are in this once repeated itself for all the values.

Summary BAND- at last of report content of this band is printed.


NO DATA BAND – When no datasource is available no data band is printed only if report setting property for no data is no data band.