BIRT Exchange Forum: Pie chart not displayed - BIRT Exchange Forum

Jump to content


 

No Latest Open Poll.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Pie chart not displayed Rate Topic: -----

#1 User is offline   MaverickS Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 11
  • Joined: 24-May 12


Posted 30 May 2012 - 03:28 AM

Hi,


I created a report in which i used pie-chart but it is not displayed in preview of report.

I am attaching report design .

Please help.

Regards,
Maverick

Attached File(s)


0

#2 User is offline   mwilliams Icon

  • BIRT Guru
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 12965
  • Joined: 16-May 08


Posted 02 June 2012 - 09:01 AM

Are you getting any kind of error in the chart wizard or when you run the design? Is there any way you can reproduce the issue in a report that I can run? Either using the sample database or a flat file?
Regards,

Michael

Twitter
Facebook
Blog
Yahoo: mwilliams_actuate@yahoo.com
Google: mwilliams.actuate@gmail.com
0

#3 User is offline   Azad Singh Icon

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 32
  • Joined: 06-January 12


Posted 02 June 2012 - 07:02 PM

View PostMaverickS, on 30 May 2012 - 04:58 PM, said:

Hi,


I created a report in which i used pie-chart but it is not displayed in preview of report.

I am attaching report design .

Please help.

Regards,
Maverick



Hi Maverick, Can u try changing the type of pie chart's "Output format" to JPG OR PNG?


SVG is not fully supported by BIRT yet. I hope this might work.
0

#4 User is offline   MaverickS Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 11
  • Joined: 24-May 12


Posted 04 June 2012 - 02:38 AM

Hi Birt Guru

Actually i am generating my report design by java code in pdf format and after generation pie chart not displayed but rest of the data is coming perfectly fine.
I am using code in a similar way as mentioned below.
Do i need to use any code related to charting engine for displaying pie-chart in above mentioned code.?

// start up Platform
config = new EngineConfig( );
config.setBIRTHome(“C:\\BIRT_231\\birt-runtime-2_3_1\\
ReportEngine”);
config.setLogConfig(“C:\\BIRT_231\\logs”, java.util.logging.Level.
FINEST);
Platform.startup( config );
// create new Report Engine
IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_
ENGINE_FACTORY );
engine = factory.createReportEngine( config );
// open the report design
IReportRunnable design = null;
design = engine.openReportDesign(“C:\\BIRT_231\\designs\\param
.rptdesign”);
// create RunandRender Task
IRunAndRenderTask task = engine.createRunAndRenderTask(design);
// pass necessary parameters
task.setParameterValue(“ordParam”, (new Integer(10101)));
task.validateParameters();
// set render options including output type
PDFRenderOption options = new PDFRenderOption();
options.setOutputFileName(“my_report.pdf”);
options.setOutputFormat(“pdf”);
task.setRenderOption(options);
// run task
task.run();
task.close();
engine.destroy();



Regards,
Maverick
0

#5 User is offline   MaverickS Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 11
  • Joined: 24-May 12


Posted 04 June 2012 - 04:31 AM

Hi Birt Guru,

I have made a sample test report based on classic models database.
And then use below mentioned Java code to produce it in pdf format.
Output generated is also attached along with it (Report.pdf).
Please help me that how can i display pie chart in my pdf report.

import org.eclipse.birt.core.framework.Platform;
import org.eclipse.birt.report.engine.api.EngineConfig;
import org.eclipse.birt.report.engine.api.IReportEngine;
import org.eclipse.birt.report.engine.api.IReportEngineFactory;
import org.eclipse.birt.report.engine.api.IReportRunnable;
import org.eclipse.birt.report.engine.api.IRunAndRenderTask;
import org.eclipse.birt.report.engine.api.PDFRenderOption;

public class Report {

public static void main(String[] args){
GenerateReport();
}

public static enum ReportFormat {
PDF, HTML, XLS;
}

public static void GenerateReport(){

IReportEngine engine=null;
EngineConfig config = null;
try{
// start up Platform
config = new EngineConfig( );

Platform.startup( config );
// create new Report Engine
IReportEngineFactory factory = (IReportEngineFactory) Platform.createFactoryObject( IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
engine = factory.createReportEngine( config );
// open the report design
IReportRunnable design = null;
design = engine.openReportDesign("\\test.rptdesign");
// create RunandRender Task
IRunAndRenderTask task = engine.createRunAndRenderTask(design);
// set render options including output type
PDFRenderOption options = new PDFRenderOption();
String argDestination = "D:\\Report.pdf";
options.setOutputFormat(ReportFormat.PDF.toString());
options.setOutputFileName(argDestination);
task.setRenderOption(options);
// run task
task.run();
task.close();
engine.destroy();
System.out.println("Report generated successfully");
}catch( Exception ex){
ex.printStackTrace();
}
finally
{
Platform.shutdown( );
}
}
}


Regards,
Maverick

Attached File(s)


0

#6 User is offline   MaverickS Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 11
  • Joined: 24-May 12


Posted 06 June 2012 - 04:45 AM

Please help if anyone know the solution
0

#7 User is offline   mwilliams Icon

  • BIRT Guru
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 12965
  • Joined: 16-May 08


Posted 06 June 2012 - 11:47 AM

Sorry for the delay. Since you're using SVG format, try adding this line, to make sure SVG is supported:

options.setSupportedImageFormats("PNG;GIF;JPG;BMP;SWF;SVG");
Regards,

Michael

Twitter
Facebook
Blog
Yahoo: mwilliams_actuate@yahoo.com
Google: mwilliams.actuate@gmail.com
0

#8 User is offline   MaverickS Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 11
  • Joined: 24-May 12


Posted 07 June 2012 - 04:35 AM

Thanks Birt Guru for your support.
But i am sorry to say that still pie chart is not coming.

Regards,
Maverick
0

#9 User is offline   mwilliams Icon

  • BIRT Guru
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 12965
  • Joined: 16-May 08


Posted 12 June 2012 - 08:41 AM

Alright, I'll give your sample a try and test the code, sometime this afternoon.
Regards,

Michael

Twitter
Facebook
Blog
Yahoo: mwilliams_actuate@yahoo.com
Google: mwilliams.actuate@gmail.com
0

#10 User is offline   MaverickS Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 11
  • Joined: 24-May 12


Posted 14 June 2012 - 08:19 PM

Hi Birt guru,


Have you tried my code ?


Regards,
Maverick
0

#11 User is offline   mwilliams Icon

  • BIRT Guru
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 12965
  • Joined: 16-May 08


Posted 18 June 2012 - 08:05 AM

Sorry for the delay. With your code, except pointing to where I have the design and specifying my output destination, I get the pie chart in my pdf as expected.
Regards,

Michael

Twitter
Facebook
Blog
Yahoo: mwilliams_actuate@yahoo.com
Google: mwilliams.actuate@gmail.com
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users