Jump to content
We've recently updated our Privacy Statement, available here ×

akhanh

Members
  • Posts

    31
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Posts posted by akhanh

  1. Hi,

    that works very fine.

     

    For all a summary:

    1.

    create:

    package tests;

     

    import net.sf.jasperreports.engine.JRAbstractChartCustomizer;

    import net.sf.jasperreports.engine.JRChart;

    import net.sf.jasperreports.engine.JRChartCustomizer;

     

    import org.jfree.chart.JFreeChart;

    import org.jfree.chart.axis.NumberAxis;

    import org.jfree.chart.plot.CategoryPlot;

    import org.jfree.data.Range;

     

    public class customizer extends JRAbstractChartCustomizer{

     

    public void customize(JFreeChart jfreechart, JRChart arg1) {

    // Get the plot

    CategoryPlot plot = jfreechart.getCategoryPlot();

    plot.getRangeAxis().setRange(10, 100);

    }

     

    }

     

    2.: set it (see last post) in the chart the customizer class.

    In my example you must write tests.customize

    tests is the package name.

     

    Thats all and you get a y-axis range from 10 to 100.

    With the methods of plot (see above) you can change

    different values of the chart

     

    Ali Baba

  2. Hi,

    that works very fine.

     

    For all a summary:

    1.

    create:

    package tests;

     

    import net.sf.jasperreports.engine.JRAbstractChartCustomizer;

    import net.sf.jasperreports.engine.JRChart;

    import net.sf.jasperreports.engine.JRChartCustomizer;

     

    import org.jfree.chart.JFreeChart;

    import org.jfree.chart.axis.NumberAxis;

    import org.jfree.chart.plot.CategoryPlot;

    import org.jfree.data.Range;

     

    public class customizer extends JRAbstractChartCustomizer{

     

    public void customize(JFreeChart jfreechart, JRChart arg1) {

    // Get the plot

    CategoryPlot plot = jfreechart.getCategoryPlot();

    plot.getRangeAxis().setRange(10, 100);

    }

     

    }

     

    2.: set it (see last post) in the chart the customizer class.

    In my example you must write tests.customize

    tests is the package name.

     

    Thats all and you get a y-axis range from 10 to 100.

    With the methods of plot (see above) you can change

    different values of the chart

     

    Ali Baba

  3. HI,

    this could work, but my problem is to set the customizer class.

    I have a custumizer extends JRAbstractChartCustomizer

    and i try to use it with

    JRDesignChart i = (JRDesignChart) (jdesgn.getSummary().getElements()[0]);

    i.setCustomizerClass("customizer");

    but i get

    Exception in thread "main" net.sf.jasperreports.engine.JRRuntimeException: Could not create chart customizer instance.

     

    i dont know i set the customizer class...

  4. Hi,

     

    i tried to change the range y-axis of a bar-chart.

    i create a

    'class customizer implements JRChartCustomizer'

    a i tried to use it with

    ' // getchart

    JRDesignChart i = (JRDesignChart) (jdesgn.getSummary().getElements()[0]);

    i.setCustomizerClass(new customizer().toString());

    '

    but it do not work.

     

    What i should write in

    i.setCustomizerClass(new customizer().toString());

     

    Thanks

    Ali Baba

  5. Hi,

     

    i tried to change the range y-axis of a bar-chart.

    i create a

    'class customizer implements JRChartCustomizer'

    a i tried to use it with

    ' // getchart

    JRDesignChart i = (JRDesignChart) (jdesgn.getSummary().getElements()[0]);

    i.setCustomizerClass(new customizer().toString());

    '

    but it do not work.

     

    What i should write in

    i.setCustomizerClass(new customizer().toString());

     

    Thanks

    Ali Baba

  6. Hi,

     

    i tried to change the range y-axis of a bar-chart.

    i create a

    'class customizer implements JRChartCustomizer'

    a i tried to use it with

    ' // getchart

    JRDesignChart i = (JRDesignChart) (jdesgn.getSummary().getElements()[0]);

    i.setCustomizerClass(new customizer().toString());

    '

    but it do not work.

     

    What i should write in

    i.setCustomizerClass(new customizer().toString());

     

    Thanks

    Ali Baba

  7. Hi,

     

    i tried to change the range y-axis of a bar-chart.

    i create a

    'class customizer implements JRChartCustomizer'

    a i tried to use it with

    ' // getchart

    JRDesignChart i = (JRDesignChart) (jdesgn.getSummary().getElements()[0]);

    i.setCustomizerClass(new customizer().toString());

    '

    but it do not work.

     

    What i should write in

    i.setCustomizerClass(new customizer().toString());

     

    Thanks

    Ali Baba

  8. Hi all,

    i have a Subreport. This includes in the columnheader the tableheader. In the detail band i have the table content.

    Now i write JasperDesign.setsplitallowed(true);

     

    If it works, i get sometimes in the bottom of the page ONLY the tableheader and in the next page i get again the tableheader with the content.

    It is possible to avoid this.

    If the tableheader is print in e.g. page 1 i will print minimum 1 line content...

     

    Thanks

    HA

  9. Hi,

     

    i load the report with

    JasperDesign jdesgn = JRXmlLoader.load("C:/Programme/JasperSoft/reports/graphTest.jrxml");

     

    and will change the height of the detail band or an Image JRBaseImage, but i have no setheight(...) method.

    Have you an idea?

     

    Thanks HA

  10. Hi,

     

    i load the report with

    JasperDesign jdesgn = JRXmlLoader.load("C:/Programme/JasperSoft/reports/graphTest.jrxml");

     

    and will change the height of the detail band or an Image JRBaseImage, but i have no setheight(...) method.

    Have you an idea?

     

    Thanks HA

  11. i try again:

    e. g. i add in the detail band of my subreport the static text "detail" and in the page Header of my sub report the text "header". now i run the masterreport.

    in the pdf file i see only the text "header". the information in the detail band are not print in pdf.

     

    I think the reason is:

    if i open in the masterreport the preferences of the subreport and see in the tab Subreport->connection/datasource i must add a connection. if it is empty the detail band are not print. what can i write?

     

    Thanks and sorry about my perfect english

  12. i try again:

    e. g. i add in the detail band of my subreport the static text "detail" and in the page Header of my sub report the text "header". now i run the masterreport.

    in the pdf file i see only the text "header". the information in the detail band are not print in pdf.

     

    I think the reason is:

    if i open in the masterreport the preferences of the subreport and see in the tab Subreport->connection/datasource i must add a connection. if it is empty the detail band are not print. what can i write?

     

    Thanks and sorry about my perfect english

  13. hi,

    it works now after the svenn's post.

    i work under window and i wrote for subreport expression

    "C:\Programme\JasperSoft\reports\a1.jasper".

    After i wrote "C:/Programme/JasperSoft/reports/a1.jasper" it works.

     

    Now i have a new problem. i will display the detail datas of the subreport in the masterreport. But it shows all bands of the subreport without detail band. i need the detail band informations to print in the masterreport. what can i do?

     

    Thanks

×
×
  • Create New...