Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » working examples pie chart, line chart
working examples pie chart, line chart [message #259769] Mon, 29 October 2007 14:25 Go to next message
Eclipse UserFriend
Originally posted by: markus.schlautmann.viadee.de

Hi,

are there any working examples for a pie chart and a line chart?
I need the java source files where the .rptdesign is created. I have to
create those charts with de deapi, the reapi and the chart api.


Thanks in advance

Best regards
Markus Schlautmann
Re: working examples pie chart, line chart [message #259795 is a reply to message #259769] Mon, 29 October 2007 15:09 Go to previous messageGo to next message
Scott Rosenbaum is currently offline Scott RosenbaumFriend
Messages: 425
Registered: July 2009
Senior Member
Markus,

Windows => Show View => Other => Report and Chart Design => Chart Examples

Pick the chart you want from the tree on the left. When you find the one
you want, click open in the upper right corner and you will see the source
code used to build the chart.

Scott Rosenbaum



> there any working examples for a pie chart and a line chart?
> I need the java source files where the .rptdesign is created. I have
> to
> create those charts with de deapi, the reapi and the chart api.
Re: working examples pie chart, line chart [message #259864 is a reply to message #259795] Mon, 29 October 2007 20:47 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Markus.Schlautmann.gmx.de

Scott,

thats great. i have not found this before. the preview is somehow
broken, but the sourcecode is ok.
all the examples return a chart, how can i add a chart object to a
report? i can not add a chart object to a cell of a grid.
what step is missing?

Best Regards
Markus Schlautmann

Scott Rosenbaum schrieb:
> Markus,
>
> Windows => Show View => Other => Report and Chart Design => Chart Examples
>
> Pick the chart you want from the tree on the left. When you find the
> one you want, click open in the upper right corner and you will see the
> source code used to build the chart.
>
> Scott Rosenbaum
>
>
>
>> there any working examples for a pie chart and a line chart?
>> I need the java source files where the .rptdesign is created. I have
>> to
>> create those charts with de deapi, the reapi and the chart api.
>
>
Re: working examples pie chart, line chart [message #259920 is a reply to message #259864] Tue, 30 October 2007 09:58 Go to previous messageGo to next message
David Michonneau is currently offline David MichonneauFriend
Messages: 1145
Registered: July 2009
Senior Member
Hi Markus,

What do you mean the preview is broken? Can you post a screenshot of the
problem?

To add a chart into a report, you need to create an extendeditemhandle and
set your chart model into it:

ExtendedItemHandle eih = elementFactory.newExtendedItem( null,
"Chart" );//$NON-NLS-1$

eih.getReportItem( ).setProperty( "chart.instance", chartModel );

There are some examples of this in the chart examples plugin source code.

Thanks,

David





"Markus Schlautmann" <Markus.Schlautmann@gmx.de> wrote in message
news:fg5gsa$d8m$1@build.eclipse.org...
> Scott,
>
> thats great. i have not found this before. the preview is somehow
> broken, but the sourcecode is ok.
> all the examples return a chart, how can i add a chart object to a
> report? i can not add a chart object to a cell of a grid.
> what step is missing?
>
> Best Regards
> Markus Schlautmann
>
> Scott Rosenbaum schrieb:
>> Markus,
>>
>> Windows => Show View => Other => Report and Chart Design => Chart
>> Examples
>>
>> Pick the chart you want from the tree on the left. When you find the
>> one you want, click open in the upper right corner and you will see the
>> source code used to build the chart.
>>
>> Scott Rosenbaum
>>
>>
>>
>>> there any working examples for a pie chart and a line chart?
>>> I need the java source files where the .rptdesign is created. I have
>>> to
>>> create those charts with de deapi, the reapi and the chart api.
>>
>>
Re: working examples pie chart, line chart [message #259993 is a reply to message #259920] Tue, 30 October 2007 22:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Markus.Schlautmann.gmx.de

Hi David,

i meant that i could not see anything on the preview. I tried to take
some screenshots but now it works perfektly. if it will happen again i
will take a screenshot of it.

i have a problem with your code. i tried it abd now i can add a pie
chart to a grid. but it will not appear in the .rptdesign. in the
..rptdesign appears only a grid with an empty cell.


i have a question to the following code:
---
ExtendedItemHandle eih = designFactory.newExtendedItem( null, "Pie
Chart" );
---
where can i find all the allowed strings for the newExtendedItem mehtod?
You used "Chart", i have to use "Pie Chart", what else can i use? is
there a howto somewhere in the internet?

but now my main problem:

i do the following after creating the chart:


try
{
GridHandle grid = designFactory.newGridItem(null, 1, 1);
designHandle.getBody().add(grid);

//Kopf soll über die ganze Seitenbreite gehen
grid.setWidth("100%");

/*row with 1 picture in each column*/
RowHandle row = (RowHandle) grid.getRows().get(0);

CellHandle cell = (CellHandle) row.getCells().get(0);
ExtendedItemHandle eih = designFactory.newExtendedItem( null, "Pie
Chart" );

eih.getReportItem( ).setProperty( "chart.instance", cwoaPie );


cell.getContent().add(eih);
}catch(Exception e)
{
System.out.println("hallo");
}



i will paste my complete code below:

package main2;

import java.util.logging.Level;

import org.eclipse.birt.chart.model.ChartWithoutAxes;
import org.eclipse.birt.chart.model.attribute.ChartDimension;
import org.eclipse.birt.chart.model.component.Series;
import org.eclipse.birt.chart.model.component.impl.SeriesImpl;
import org.eclipse.birt.chart.model.data.BaseSampleData;
import org.eclipse.birt.chart.model.data.DataFactory;
import org.eclipse.birt.chart.model.data.NumberDataSet;
import org.eclipse.birt.chart.model.data.OrthogonalSampleData;
import org.eclipse.birt.chart.model.data.SampleData;
import org.eclipse.birt.chart.model.data.SeriesDefinition;
import org.eclipse.birt.chart.model.data.TextDataSet;
import org.eclipse.birt.chart.model.data.impl.NumberDataSetImpl;
import org.eclipse.birt.chart.model.data.impl.SeriesDefinitionImpl;
import org.eclipse.birt.chart.model.data.impl.TextDataSetImpl;
import org.eclipse.birt.chart.model.impl.ChartWithoutAxesImpl;
import org.eclipse.birt.chart.model.layout.Legend;
import org.eclipse.birt.chart.model.type.PieSeries;
import org.eclipse.birt.chart.model.type.impl.PieSeriesImpl;
import org.eclipse.birt.core.framework.Platform;
import org.eclipse.birt.report.engine.api.EngineConfig;
import org.eclipse.birt.report.engine.api.HTMLRenderOption;
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;
import org.eclipse.birt.report.model.api.CellHandle;
import org.eclipse.birt.report.model.api.DesignConfig;
import org.eclipse.birt.report.model.api.DesignElementHandle;
import org.eclipse.birt.report.model.api.ElementFactory;
import org.eclipse.birt.report.model.api.ExtendedItemHandle;
import org.eclipse.birt.report.model.api.GridHandle;
import org.eclipse.birt.report.model.api.IDesignEngine;
import org.eclipse.birt.report.model.api.IDesignEngineFactory;
import org.eclipse.birt.report.model.api.ImageHandle;
import org.eclipse.birt.report.model.api.ReportDesignHandle;
import org.eclipse.birt.report.model.api.RowHandle;
import org.eclipse.birt.report.model.api.SessionHandle;

import com.ibm.icu.util.ULocale;

public class CreateReport3
{
//Konstanten für das Ausgabeverzeichnis, den Dateinamen und Birt Runtime
final String output_path = "F:/stuff/eclipse/reports";
final String image_dir = "images";
final String engine_path =
"F:/stuff/eclipse/birt-runtime-2_2_1/ReportEngine";
final String filename = "pojo";
final String row_layout = "no_alternating_colours";
final String output_format = "pdf";
final String dimension = "";

ReportDesignHandle designHandle = null;
ElementFactory designFactory = null;
IDesignEngine engine = null;

//Main erzeugt die Daten und führt die Reporterzeugung aus
public static void main(String[] args)
{
//start reporting
CreateReport3 de = new CreateReport3();
de.buildReport();
}

void buildReport()
{
configurePlatform();
buildBasicReport();
buildPieChartReport();
stopSavePlatform();
convertReport(output_format);
}

void configurePlatform()
{
try
{
System.out.println("starting configurePlatform() method");

DesignConfig config = new DesignConfig();
config.setProperty("BIRT_HOME", engine_path);
Platform.startup(config);
IDesignEngineFactory factory = (IDesignEngineFactory)
Platform.createFactoryObject(IDesignEngineFactory.EXTENSION_ DESIGN_ENGINE_FACTORY);
engine = factory.createDesignEngine(config);
SessionHandle session = engine.newSessionHandle(ULocale.ENGLISH);
designHandle = session.createDesign();
designFactory = designHandle.getElementFactory();
}catch(Exception e)
{
e.printStackTrace();
}
System.out.println("Finished configurePlatform() method");
System.out.println();
}

void stopSavePlatform()
{
try
{
System.out.println("starting stopSavePlatform() method");

/*save file*/
designHandle.saveAs(output_path + "/" + filename + ".rptdesign");
designHandle.close();

Platform.shutdown();
}catch(Exception e)
{
e.printStackTrace();
}
System.out.println("Finished stopSavePlatform() method");
System.out.println("");
}

void buildBasicReport()
{
try
{
System.out.println("starting buildBasicReport method");
DesignElementHandle element = designFactory.newSimpleMasterPage("Page
Master");
designHandle.getMasterPages().add(element);

/*table with 2 columns, 1 row*/
GridHandle grid = designFactory.newGridItem(null, 2, 1);
designHandle.getBody().add(grid);

//Kopf soll über die ganze Seitenbreite gehen
grid.setWidth("100%");

/*row with 1 picture in each column*/
RowHandle row = (RowHandle) grid.getRows().get(0);

//erstes Bild wird der Tabelle hinzugefügt
ImageHandle image = designFactory.newImage(null);
CellHandle cell = (CellHandle) row.getCells().get(0);
cell.getContent().add(image);
image.setFile("\"images/logo_viadee.gif\"");

//zweites Bild wird der Tabelle hinzugefügt
ImageHandle image2 = designFactory.newImage(null);
cell = (CellHandle) row.getCells().get(1);
cell.getContent().add(image2);
image2.setFile("\"images/logo_viadee2.jpg\"");

row = (RowHandle) grid.getRows().get(1);

}catch(Exception e)
{
e.printStackTrace();
}
System.out.println("Finished buildBasicReport() method");
System.out.println("");
}

void buildPieChartReport()
{
System.out.println("starting buildPieChartReport method");

ChartWithoutAxes cwoaPie = ChartWithoutAxesImpl.create( );
cwoaPie.setDimension( ChartDimension.TWO_DIMENSIONAL_WITH_DEPTH_LITERAL );
cwoaPie.setType( "Pie Chart" );
cwoaPie.setSubType( "Standard Pie Chart" );

// Plot
cwoaPie.setSeriesThickness( 10 );

// Legend
Legend lg = cwoaPie.getLegend( );
lg.getOutline( ).setVisible( true );

// Title
cwoaPie.getTitle( ).getLabel( ).getCaption( ).setValue( "Pie Chart" );

// Data Set
TextDataSet categoryValues = TextDataSetImpl.create( new String[]{
"New York", "Boston", "Chicago", "San Francisco", "Dallas"} );
NumberDataSet seriesOneValues = NumberDataSetImpl.create( new double[]{
54.65, 21, 75.95, 91.28, 37.43
} );

SampleData sdata = DataFactory.eINSTANCE.createSampleData( );
BaseSampleData sdBase = DataFactory.eINSTANCE.createBaseSampleData( );
sdBase.setDataSetRepresentation( "" );
sdata.getBaseSampleData( ).add( sdBase );

OrthogonalSampleData sdOrthogonal =
DataFactory.eINSTANCE.createOrthogonalSampleData( );
sdOrthogonal.setDataSetRepresentation( "" );
sdOrthogonal.setSeriesDefinitionIndex( 0 );
sdata.getOrthogonalSampleData( ).add( sdOrthogonal );

cwoaPie.setSampleData( sdata );

// Base Series
Series seCategory = SeriesImpl.create( );
seCategory.setDataSet( categoryValues );

SeriesDefinition sd = SeriesDefinitionImpl.create( );
cwoaPie.getSeriesDefinitions( ).add( sd );
sd.getSeriesPalette( ).shift( 0 );
sd.getSeries( ).add( seCategory );

// Orthogonal Series
PieSeries sePie = (PieSeries) PieSeriesImpl.create( );
sePie.setDataSet( seriesOneValues );
sePie.setSeriesIdentifier( "Cities" );
sePie.setExplosion( 5 );

SeriesDefinition sdCity = SeriesDefinitionImpl.create( );
sd.getSeriesDefinitions( ).add( sdCity );
sdCity.getSeries( ).add( sePie );

try
{
GridHandle grid = designFactory.newGridItem(null, 1, 1);
designHandle.getBody().add(grid);

//Kopf soll über die ganze Seitenbreite gehen
grid.setWidth("100%");

/*row with 1 picture in each column*/
RowHandle row = (RowHandle) grid.getRows().get(0);

CellHandle cell = (CellHandle) row.getCells().get(0);
ExtendedItemHandle eih = designFactory.newExtendedItem( null, "Pie
Chart" );

eih.getReportItem( ).setProperty( "chart.instance", cwoaPie );


cell.getContent().add(eih);
}catch(Exception e)
{
System.out.println("hallo");
}


System.out.println("Finished buildPieChartReport() method");
System.out.println("");
}

void convertReport(String format)
{
System.out.println("starting convertReport() method");

EngineConfig config = new EngineConfig( );
IReportEngine engine = null;
IReportRunnable design = null;

try{
//Laufzeitumgebung starten
config = new EngineConfig( );
config.setEngineHome(engine_path);
//config.setLogConfig("F:/stuff/eclipse/log", Level.ALL);

Platform.startup(config);
IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject(
IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
engine = factory.createReportEngine( config );
engine.changeLogLevel( Level.WARNING );

}catch( Exception e){
e.printStackTrace();
}

try
{
//vorher hoffentlich erstelltes design öffnen
design = engine.openReportDesign(output_path + "/" + filename
+".rptdesign");
}catch(Exception e)
{
e.printStackTrace();
}

try
{
if(!format.equals("pdf") && !format.equals("html") &&
!format.equals("both"))
{
System.out.println("output format is not correct, switching to
default: pdf");
format = "pdf";
}

if(format.equals("pdf") || format.equals("both"))
{
System.out.println("starting pdf");

IRunAndRenderTask pdf_task = engine.createRunAndRenderTask(design);

//Optionen für den pdf_task setzen
PDFRenderOption pdf_options = new PDFRenderOption();
pdf_options.setOutputFileName(output_path + "/" + filename + ".pdf");
pdf_options.setOutputFormat("pdf");
pdf_task.setRenderOption(pdf_options);

pdf_task.run();
pdf_task.close();

System.out.println("Finished pdf");
}

if(format.equals("html") || format.equals("both"))
{
System.out.println("starting html");

IRunAndRenderTask html_task = engine.createRunAndRenderTask(design);

//Optionen für den html_task
HTMLRenderOption html_options = new HTMLRenderOption();
html_options.setOutputFileName(output_path + "/" + filename + ".html");
html_options.setOutputFormat("html");
html_options.setImageDirectory("image");
html_options.setBaseImageURL("images");
html_task.setRenderOption(html_options);

html_task.run();
html_task.close();

System.out.println("Finished html");
}
}
catch ( Exception e )
{
System.out.println("*****ERROR*****");
e.printStackTrace();
}

engine.destroy();
Platform.shutdown();
System.out.println("Finished convertReport() method");
System.out.println("");
}
}


David Michonneau schrieb:
> Hi Markus,
>
> What do you mean the preview is broken? Can you post a screenshot of the
> problem?
>
> To add a chart into a report, you need to create an extendeditemhandle and
> set your chart model into it:
>
> ExtendedItemHandle eih = elementFactory.newExtendedItem( null,
> "Chart" );//$NON-NLS-1$
>
> eih.getReportItem( ).setProperty( "chart.instance", chartModel );
>
> There are some examples of this in the chart examples plugin source code.
>
> Thanks,
>
> David
>
>
>
>
>
> "Markus Schlautmann" <Markus.Schlautmann@gmx.de> wrote in message
> news:fg5gsa$d8m$1@build.eclipse.org...
>> Scott,
>>
>> thats great. i have not found this before. the preview is somehow
>> broken, but the sourcecode is ok.
>> all the examples return a chart, how can i add a chart object to a
>> report? i can not add a chart object to a cell of a grid.
>> what step is missing?
>>
>> Best Regards
>> Markus Schlautmann
>>
>> Scott Rosenbaum schrieb:
>>> Markus,
>>>
>>> Windows => Show View => Other => Report and Chart Design => Chart
>>> Examples
>>>
>>> Pick the chart you want from the tree on the left. When you find the
>>> one you want, click open in the upper right corner and you will see the
>>> source code used to build the chart.
>>>
>>> Scott Rosenbaum
>>>
>>>
>>>
>>>> there any working examples for a pie chart and a line chart?
>>>> I need the java source files where the .rptdesign is created. I have
>>>> to
>>>> create those charts with de deapi, the reapi and the chart api.
>>>
>
>
Re: working examples pie chart, line chart [message #260023 is a reply to message #259993] Wed, 31 October 2007 08:39 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: markus.schlautmann.viadee.de

Hi,

i learned that the "Pie Chart" does not exist because eih is null.
but if i use "Chart" i will get a NullPointerException if i try to save
the report design in the method stopSavePlatform.

Whats wrong?

Best Regards
Markus Schlautmann
Re: working examples pie chart, line chart [message #260026 is a reply to message #259993] Wed, 31 October 2007 09:24 Go to previous messageGo to next message
David Michonneau is currently offline David MichonneauFriend
Messages: 1145
Registered: July 2009
Senior Member
The string is the extensionName of the report item extension (see the
reportItemModel extension point). In that case it is "Chart". If you create
an extended item, you can use the name of the extension to create it using
this method. Now only crosstab and charts are extended items in BIRT.

All types of chart use the same extended item, so you don't need to change
it.

If you are unable to load the item, it probably means you are not in an OSGi
environment, so it can't load extension plugins. Please take a look at the
example in the chart examples plugin to see how this works.

Thanks,

David

"Markus Schlautmann" <Markus.Schlautmann@gmx.de> wrote in message
news:fg8a7o$6a3$1@build.eclipse.org...
> Hi David,
>
> i meant that i could not see anything on the preview. I tried to take
> some screenshots but now it works perfektly. if it will happen again i
> will take a screenshot of it.
>
> i have a problem with your code. i tried it abd now i can add a pie
> chart to a grid. but it will not appear in the .rptdesign. in the
> .rptdesign appears only a grid with an empty cell.
>
>
> i have a question to the following code:
> ---
> ExtendedItemHandle eih = designFactory.newExtendedItem( null, "Pie
> Chart" );
> ---
> where can i find all the allowed strings for the newExtendedItem mehtod?
> You used "Chart", i have to use "Pie Chart", what else can i use? is
> there a howto somewhere in the internet?
>
> but now my main problem:
>
> i do the following after creating the chart:
>
>
> try
> {
> GridHandle grid = designFactory.newGridItem(null, 1, 1);
> designHandle.getBody().add(grid);
>
> //Kopf soll
Re: working examples pie chart, line chart [message #260056 is a reply to message #260026] Wed, 31 October 2007 12:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: markus.schlautmann.viadee.de

Hi David,

I'm sorry but i have to bother you again.
I checked the examples from exclipse, the book "integrating and extending
birt" and examples from the internet. I don't understand why my chart is
not working.
I'm creating a chart, i'm adding dataset (TextDataSet and NumberDataSet)
to the series, i'm creating an extendedItemHandler and then add this
extendedItem to a grid. All in all nothing special.

There are no exceptions until i try to save the design. Then i get a
NullPointerException. I will paste the exception at the end of my posting.
After all i don't think that it is a code issue.
You mentioned something with the osgi environment in your last post.
How can i check this? I have installed the latest java-sdk-version,
eclipse3.3.1, via the eclipse software updates i installed all of birt.
I downloaded birt-runtime-2_2_1 and extracted it. The path to the birt
runtime is configured with BIRT_HOME in my application.

Do i need some additional plugins for this runtime for creating this
extendedItems?

Thank you very much for your efforts!


Best Regards
Markus Schlautmann
the exception [message #260060 is a reply to message #260026] Wed, 31 October 2007 12:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: markus.schlautmann.viadee.de

Dave,

i forgot the exception...



java.lang.NullPointerException
at
org.eclipse.birt.chart.factory.Generator.getRowExpressions(G enerator.java:1464)
at
org.eclipse.birt.chart.factory.Generator.getRowExpressions(G enerator.java:498)
at
org.eclipse.birt.chart.reportitem.ChartReportItemImpl.getRow Expressions(ChartReportItemImpl.java:775)
at
org.eclipse.birt.report.model.util.BoundColumnsMgr.dealExten dedItem(BoundColumnsMgr.java:217)
at
org.eclipse.birt.report.model.writer.BoundColumnsWriterMgr.d ealExtendedItem(BoundColumnsWriterMgr.java:420)
at
org.eclipse.birt.report.model.util.BoundColumnsMgr.dealNonDa taContainerReportItem(BoundColumnsMgr.java:179)
at
org.eclipse.birt.report.model.util.BoundColumnsMgr.dealGrid( BoundColumnsMgr.java:341)
at
org.eclipse.birt.report.model.writer.BoundColumnsWriterMgr.d ealGrid(BoundColumnsWriterMgr.java:436)
at
org.eclipse.birt.report.model.writer.ModuleWriter.visitGrid( ModuleWriter.java:1994)
at
org.eclipse.birt.report.model.elements.GridItem.apply(GridIt em.java:121)
at
org.eclipse.birt.report.model.writer.ModuleWriter.writeConte nts(ModuleWriter.java:2491)
at
org.eclipse.birt.report.model.writer.ModuleWriter.writeConte nts(ModuleWriter.java:2511)
at
org.eclipse.birt.report.model.writer.DesignWriter.visitRepor tDesign(DesignWriter.java:134)
at
org.eclipse.birt.report.model.elements.ReportDesign.apply(Re portDesign.java:89)
at
org.eclipse.birt.report.model.writer.ModuleWriter.writeFile( ModuleWriter.java:300)
at
org.eclipse.birt.report.model.writer.ModuleWriter.write(Modu leWriter.java:266)
at
org.eclipse.birt.report.model.api.ModuleHandle.save(ModuleHa ndle.java:1534)
at
org.eclipse.birt.report.model.api.ModuleHandle.saveAs(Module Handle.java:1554)
at main2.CreateReport3.buildPieChartReport(CreateReport3.java:3 02)
at main2.CreateReport3.buildReport(CreateReport3.java:85)
at main2.CreateReport3.main(CreateReport3.java:76)
31.10.2007 12:57:37 org.eclipse.birt.report.model.parser.ModuleReader
readModule
SEVERE: Line Number:56 Error Code:Error.XMLParserException.SAX_ERROR
Exception:org.xml.sax.SAXParseException: XML document structures must
start and end within the same entity. Message:SAX detected an error with
the basic XML syntax of the file.
31.10.2007 12:57:37
org.eclipse.birt.report.engine.api.impl.ReportEngineHelper openReportDesign
SEVERE: invalid design file file:/F:/stuff/eclipse/reports/pojo.rptdesign
org.eclipse.birt.report.engine.api.EngineException: The design file
file:/F:/stuff/eclipse/reports/pojo.rptdesign has error and can not be run.
at
org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.o penReportDesign(ReportEngineHelper.java:248)
at
org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.o penReportDesign(ReportEngineHelper.java:191)
at
org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.o penReportDesign(ReportEngineHelper.java:125)
at
org.eclipse.birt.report.engine.api.impl.ReportEngine.openRep ortDesign(ReportEngine.java:239)
at main2.CreateReport3.convertReport(CreateReport3.java:342)
at main2.CreateReport3.buildReport(CreateReport3.java:87)
at main2.CreateReport3.main(CreateReport3.java:76)
Caused by: Error.DesignFileException.INVALID_XML - 2 errors found!
1.) ( line = 56, tag = expression)
org.eclipse.birt.report.model.util.XMLParserException (code =
Error.XMLParserException.SAX_ERROR, message : Line Number:56 Error
Code:Error.XMLParserException.SAX_ERROR
Exception:org.xml.sax.SAXParseException: XML document structures must
start and end within the same entity. Message:SAX detected an error with
the basic XML syntax of the file. )
2.) ( line = 56) org.xml.sax.SAXParseException (message : XML document
structures must start and end within the same entity.)

at
org.eclipse.birt.report.model.parser.ModuleReader.readModule (ModuleReader.java:117)
at
org.eclipse.birt.report.model.parser.DesignReader.read(Desig nReader.java:90)
at
org.eclipse.birt.report.model.core.DesignSession.openDesign( DesignSession.java:316)
at
org.eclipse.birt.report.model.api.SessionHandle.openDesign(S essionHandle.java:292)
at
org.eclipse.birt.report.engine.parser.ReportParser.getDesign Handle(ReportParser.java:158)
at
org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.o penReportDesign(ReportEngineHelper.java:243)
... 6 more
Caused by: org.xml.sax.SAXParseException: XML document structures must
start and end within the same entity.
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
Source)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at
org.eclipse.birt.report.model.parser.ModuleReader.readModule (ModuleReader.java:95)
... 11 more
java.lang.NullPointerException
at
org.eclipse.birt.report.engine.api.impl.EngineTask.doValidat eParameters(EngineTask.java:491)
at
org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doR un(RunAndRenderTask.java:79)
at
org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run (RunAndRenderTask.java:68)
at main2.CreateReport3.convertReport(CreateReport3.java:368)
at main2.CreateReport3.buildReport(CreateReport3.java:87)
at main2.CreateReport3.main(CreateReport3.java:76)
Re: the exception [message #260063 is a reply to message #260060] Wed, 31 October 2007 13:52 Go to previous messageGo to next message
David Michonneau is currently offline David MichonneauFriend
Messages: 1145
Registered: July 2009
Senior Member
Hi Markus,

I believe the problem is not osgi related, but something in the way you have
bound the data to the chart. If your chart is inside a report, you need to:

- Define column bindings associated to the extended item handle containing
the chart. Something like this:

PropertyHandle computedSet = eih.getColumnBindings( );
cs1.setExpression( "dataSetRow[\"Month\"]" );//$NON-NLS-1$
computedSet.addItem( cs1 );
cs2.setExpression( "dataSetRow[\"Product\"]" );//$NON-NLS-1$
computedSet.addItem( cs2 );
cs3.setExpression( "dataSetRow[\"Amount\"]" );//$NON-NLS-1$
computedSet.addItem( cs3 );

- Reference those bindings in the chart model, something like:
Query query = QueryImpl.create( "row[\"Product\"]" );//$NON-NLS-1$

seCategory.getDataDefinition( ).add( query );

Thanks,

David



"Markus Schlautmann" <markus.schlautmann@viadee.de> wrote in message
news:c1eb855d1d1322bdb4fba224a9fe4fe7$1@www.eclipse.org...
> Dave,
>
> i forgot the exception...
>
>
>
> java.lang.NullPointerException
> at
> org.eclipse.birt.chart.factory.Generator.getRowExpressions(G enerator.java:1464)
> at
> org.eclipse.birt.chart.factory.Generator.getRowExpressions(G enerator.java:498)
> at
> org.eclipse.birt.chart.reportitem.ChartReportItemImpl.getRow Expressions(ChartReportItemImpl.java:775)
> at
> org.eclipse.birt.report.model.util.BoundColumnsMgr.dealExten dedItem(BoundColumnsMgr.java:217)
> at
> org.eclipse.birt.report.model.writer.BoundColumnsWriterMgr.d ealExtendedItem(BoundColumnsWriterMgr.java:420)
> at
> org.eclipse.birt.report.model.util.BoundColumnsMgr.dealNonDa taContainerReportItem(BoundColumnsMgr.java:179)
> at
> org.eclipse.birt.report.model.util.BoundColumnsMgr.dealGrid( BoundColumnsMgr.java:341)
> at
> org.eclipse.birt.report.model.writer.BoundColumnsWriterMgr.d ealGrid(BoundColumnsWriterMgr.java:436)
> at
> org.eclipse.birt.report.model.writer.ModuleWriter.visitGrid( ModuleWriter.java:1994)
> at
> org.eclipse.birt.report.model.elements.GridItem.apply(GridIt em.java:121)
> at
> org.eclipse.birt.report.model.writer.ModuleWriter.writeConte nts(ModuleWriter.java:2491)
> at
> org.eclipse.birt.report.model.writer.ModuleWriter.writeConte nts(ModuleWriter.java:2511)
> at
> org.eclipse.birt.report.model.writer.DesignWriter.visitRepor tDesign(DesignWriter.java:134)
> at
> org.eclipse.birt.report.model.elements.ReportDesign.apply(Re portDesign.java:89)
> at
> org.eclipse.birt.report.model.writer.ModuleWriter.writeFile( ModuleWriter.java:300)
> at
> org.eclipse.birt.report.model.writer.ModuleWriter.write(Modu leWriter.java:266)
> at
> org.eclipse.birt.report.model.api.ModuleHandle.save(ModuleHa ndle.java:1534)
> at
> org.eclipse.birt.report.model.api.ModuleHandle.saveAs(Module Handle.java:1554)
> at main2.CreateReport3.buildPieChartReport(CreateReport3.java:3 02)
> at main2.CreateReport3.buildReport(CreateReport3.java:85)
> at main2.CreateReport3.main(CreateReport3.java:76)
> 31.10.2007 12:57:37 org.eclipse.birt.report.model.parser.ModuleReader
> readModule
> SEVERE: Line Number:56 Error Code:Error.XMLParserException.SAX_ERROR
> Exception:org.xml.sax.SAXParseException: XML document structures must
> start and end within the same entity. Message:SAX detected an error with
> the basic XML syntax of the file. 31.10.2007 12:57:37
> org.eclipse.birt.report.engine.api.impl.ReportEngineHelper
> openReportDesign
> SEVERE: invalid design file file:/F:/stuff/eclipse/reports/pojo.rptdesign
> org.eclipse.birt.report.engine.api.EngineException: The design file
> file:/F:/stuff/eclipse/reports/pojo.rptdesign has error and can not be
> run.
> at
> org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.o penReportDesign(ReportEngineHelper.java:248)
> at
> org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.o penReportDesign(ReportEngineHelper.java:191)
> at
> org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.o penReportDesign(ReportEngineHelper.java:125)
> at
> org.eclipse.birt.report.engine.api.impl.ReportEngine.openRep ortDesign(ReportEngine.java:239)
> at main2.CreateReport3.convertReport(CreateReport3.java:342)
> at main2.CreateReport3.buildReport(CreateReport3.java:87)
> at main2.CreateReport3.main(CreateReport3.java:76)
> Caused by: Error.DesignFileException.INVALID_XML - 2 errors found! 1.)
> ( line = 56, tag = expression)
> org.eclipse.birt.report.model.util.XMLParserException (code =
> Error.XMLParserException.SAX_ERROR, message : Line Number:56 Error
> Code:Error.XMLParserException.SAX_ERROR
> Exception:org.xml.sax.SAXParseException: XML document structures must
> start and end within the same entity. Message:SAX detected an error with
> the basic XML syntax of the file. )
> 2.) ( line = 56) org.xml.sax.SAXParseException (message : XML document
> structures must start and end within the same entity.)
>
> at
> org.eclipse.birt.report.model.parser.ModuleReader.readModule (ModuleReader.java:117)
> at
> org.eclipse.birt.report.model.parser.DesignReader.read(Desig nReader.java:90)
> at
> org.eclipse.birt.report.model.core.DesignSession.openDesign( DesignSession.java:316)
> at
> org.eclipse.birt.report.model.api.SessionHandle.openDesign(S essionHandle.java:292)
> at
> org.eclipse.birt.report.engine.parser.ReportParser.getDesign Handle(ReportParser.java:158)
> at
> org.eclipse.birt.report.engine.api.impl.ReportEngineHelper.o penReportDesign(ReportEngineHelper.java:243)
> ... 6 more
> Caused by: org.xml.sax.SAXParseException: XML document structures must
> start and end within the same entity.
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(Unknown
> Source)
> at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(Unknown
> Source)
> at javax.xml.parsers.SAXParser.parse(Unknown Source)
> at
> org.eclipse.birt.report.model.parser.ModuleReader.readModule (ModuleReader.java:95)
> ... 11 more
> java.lang.NullPointerException
> at
> org.eclipse.birt.report.engine.api.impl.EngineTask.doValidat eParameters(EngineTask.java:491)
> at
> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doR un(RunAndRenderTask.java:79)
> at
> org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run (RunAndRenderTask.java:68)
> at main2.CreateReport3.convertReport(CreateReport3.java:368)
> at main2.CreateReport3.buildReport(CreateReport3.java:87)
> at main2.CreateReport3.main(CreateReport3.java:76)
>
>
>
Re: the exception [message #260078 is a reply to message #260063] Wed, 31 October 2007 14:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: markus.schlautmann.viadee.de

David,

i'm confused.
I'm doing the following:

// Data Set
TextDataSet categoryValues = TextDataSetImpl.create( new String[]{
"New York", "Boston", "Chicago", "San Francisco", "Dallas"} );

NumberDataSet seriesOneValues = NumberDataSetImpl.create( new double[]{
54.65, 21, 75.95, 91.28, 37.43 } );


// Base Series
Series seCategory = SeriesImpl.create( );
seCategory.setDataSet( categoryValues );

SeriesDefinition sd = SeriesDefinitionImpl.create( );
cwoaPie.getSeriesDefinitions( ).add( sd );
sd.getSeriesPalette( ).shift( 0 );
sd.getSeries( ).add( seCategory );

// Orthogonal Series
PieSeries sePie = (PieSeries) PieSeriesImpl.create( );
sePie.setDataSet( seriesOneValues );
sePie.setSeriesIdentifier( "Cities" );
sePie.setExplosion( 5 );

SeriesDefinition sdCity = SeriesDefinitionImpl.create( );
sd.getSeriesDefinitions( ).add( sdCity );
sdCity.getSeries( ).add( sePie );


Addionally to these Datasets i have to define a column binding?

Best Regards
Markus Schlautmann
Re: working examples pie chart, line chart [message #260128 is a reply to message #260056] Wed, 31 October 2007 20:31 Go to previous messageGo to next message
Scott Rosenbaum is currently offline Scott RosenbaumFriend
Messages: 425
Registered: July 2009
Senior Member
Markus,

Been away a bit, but in the examples that you picked up earlier, there is
an example of inserting a pie chart into a report in the SalesReport example.
Perhaps that will help?

Scott

> Hi David,
>
> I'm sorry but i have to bother you again.
> I checked the examples from exclipse, the book "integrating and
> extending
> birt" and examples from the internet. I don't understand why my chart
> is
> not working.
> I'm creating a chart, i'm adding dataset (TextDataSet and
> NumberDataSet)
> to the series, i'm creating an extendedItemHandler and then add this
> extendedItem to a grid. All in all nothing special.
> There are no exceptions until i try to save the design. Then i get a
> NullPointerException. I will paste the exception at the end of my
> posting.
> After all i don't think that it is a code issue.
> You mentioned something with the osgi environment in your last post.
> How can i check this? I have installed the latest java-sdk-version,
> eclipse3.3.1, via the eclipse software updates i installed all of
> birt.
> I downloaded birt-runtime-2_2_1 and extracted it. The path to the birt
> runtime is configured with BIRT_HOME in my application.
> Do i need some additional plugins for this runtime for creating this
> extendedItems?
>
> Thank you very much for your efforts!
>
> Best Regards
> Markus Schlautmann
Re: the exception [message #260222 is a reply to message #260078] Thu, 01 November 2007 15:09 Go to previous messageGo to next message
David Michonneau is currently offline David MichonneauFriend
Messages: 1145
Registered: July 2009
Senior Member
If the chart is inside a report, you cannot use hard-coded data. You must
use the data from the report. So define column bindings, and add references
to them in the chart model. Then the report will automatically populate the
chart data using the data from the db.

If you really need hard-coded data, you can use a scripted dataset then at
the report level, and use the dataset in the chart, but you still need to
define bindings like I mentioned.

Thanks,

David

"Markus Schlautmann" <markus.schlautmann@viadee.de> wrote in message
news:1f91890f3fe5b0dde64de2a0836fd623$1@www.eclipse.org...
> David,
>
> i'm confused.
> I'm doing the following:
>
> // Data Set
> TextDataSet categoryValues = TextDataSetImpl.create( new String[]{
> "New York", "Boston", "Chicago", "San Francisco", "Dallas"} );
>
> NumberDataSet seriesOneValues = NumberDataSetImpl.create( new double[]{
> 54.65, 21, 75.95, 91.28, 37.43 } );
>
>
> // Base Series
> Series seCategory = SeriesImpl.create( );
> seCategory.setDataSet( categoryValues );
>
> SeriesDefinition sd = SeriesDefinitionImpl.create( );
> cwoaPie.getSeriesDefinitions( ).add( sd );
> sd.getSeriesPalette( ).shift( 0 );
> sd.getSeries( ).add( seCategory );
>
> // Orthogonal Series
> PieSeries sePie = (PieSeries) PieSeriesImpl.create( );
> sePie.setDataSet( seriesOneValues );
> sePie.setSeriesIdentifier( "Cities" ); sePie.setExplosion( 5 );
>
> SeriesDefinition sdCity = SeriesDefinitionImpl.create( );
> sd.getSeriesDefinitions( ).add( sdCity );
> sdCity.getSeries( ).add( sePie );
>
>
> Addionally to these Datasets i have to define a column binding?
>
> Best Regards
> Markus Schlautmann
>
>
nearly working [message #260444 is a reply to message #260222] Fri, 02 November 2007 18:16 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Markus.Schlautmann.gmx.de

David,

thank you very much for spending so much time in this group!
i hope this will be my last question in this thread.
i tried it as you told me. I created a data source and a data set and
defined column bindings.
My report compiles without errors now, but i get warnings:

starting buildPieChartReport method
02.11.2007 18:52:07
org.eclipse.birt.chart.reportitem.ChartReportItemImpl getPropertyDefinitions
WARNING: Request for property definitions received before model was created.
02.11.2007 18:52:07
org.eclipse.birt.chart.reportitem.ChartReportItemImpl getPropertyDefinitions
WARNING: Request for property definitions received before model was created.
02.11.2007 18:52:07
org.eclipse.birt.chart.reportitem.ChartReportItemImpl getPropertyDefinitions
WARNING: Request for property definitions received before model was created.
02.11.2007 18:52:07
org.eclipse.birt.chart.reportitem.ChartReportItemImpl getPropertyDefinitions
WARNING: Request for property definitions received before model was created.
02.11.2007 18:52:07
org.eclipse.birt.chart.reportitem.ChartReportItemImpl getPropertyDefinitions
WARNING: Request for property definitions received before model was created.
Finished buildPieChartReport() method

This happens every time i access the extended item handle, like
eih.setHeight() or eih.setWidth()......
How can i solve this?

I think this is nothing critical, the report design looks fine now, the
chart is in my design. The design is compiled without errors or warnings
into pdf. But in my pdf is no chart. What have i done wrong?

Best Regards
Markus Schlautmann


----
package main2;
import java.util.Vector;

import interfaces.IChart;

public class DataProviderChart implements IChart
{
private Vector<String> xValues;
private Vector<Float> yValues;
private String chartCaption;
private String xCaption;
private String yCaption;

public DataProviderChart()
{
chartCaption = "Mein Charttitel";
xCaption = "das ist die xAchse";
yCaption = "das ist die yAchse";

xValues = new Vector<String>();
yValues = new Vector<Float>();

xValues.add("one");
xValues.add("two");
xValues.add("three");

yValues.add(25.5f);
yValues.add(35.765f);
yValues.add(15.777f);
}

public Vector<String> getxValues()
{
return xValues;
}

public Vector<Float> getyValues()
{
return yValues;
}

public String getChartCaption()
{
return chartCaption;
}

public String getxCaption()
{
return xCaption;
}

public String getyCaption()
{
return yCaption;
}
}
----

----

package main2;

import interfaces.ITable;
import interfaces.IChart;

import java.util.Map;
import java.util.logging.Level;

import org.eclipse.birt.chart.device.IDeviceRenderer;
import org.eclipse.birt.chart.factory.GeneratedChartState;
import org.eclipse.birt.chart.factory.Generator;
import org.eclipse.birt.chart.model.ChartWithAxes;
import org.eclipse.birt.chart.model.ChartWithoutAxes;
import org.eclipse.birt.chart.model.attribute.Bounds;
import org.eclipse.birt.chart.model.attribute.ChartDimension;
import org.eclipse.birt.chart.model.attribute.DataPointComponent;
import org.eclipse.birt.chart.model.attribute.DataPointComponentTyp e;
import org.eclipse.birt.chart.model.attribute.LegendItemType;
import org.eclipse.birt.chart.model.attribute.impl.BoundsImpl;
import org.eclipse.birt.chart.model.attribute.impl.ColorDefinitionI mpl;
import org.eclipse.birt.chart.model.attribute.impl.DataPointCompone ntImpl;
import org.eclipse.birt.chart.model.attribute.impl.GradientImpl;
import
org.eclipse.birt.chart.model.attribute.impl.JavaNumberFormat SpecifierImpl;
import org.eclipse.birt.chart.model.component.Axis;
import org.eclipse.birt.chart.model.component.Series;
import org.eclipse.birt.chart.model.component.impl.SeriesImpl;
import org.eclipse.birt.chart.model.data.BaseSampleData;
import org.eclipse.birt.chart.model.data.DataFactory;
import org.eclipse.birt.chart.model.data.NumberDataSet;
import org.eclipse.birt.chart.model.data.OrthogonalSampleData;
import org.eclipse.birt.chart.model.data.Query;
import org.eclipse.birt.chart.model.data.SampleData;
import org.eclipse.birt.chart.model.data.SeriesDefinition;
import org.eclipse.birt.chart.model.data.TextDataSet;
import org.eclipse.birt.chart.model.data.impl.NumberDataSetImpl;
import org.eclipse.birt.chart.model.data.impl.QueryImpl;
import org.eclipse.birt.chart.model.data.impl.SeriesDefinitionImpl;
import org.eclipse.birt.chart.model.data.impl.TextDataSetImpl;
import org.eclipse.birt.chart.model.impl.ChartWithAxesImpl;
import org.eclipse.birt.chart.model.impl.ChartWithoutAxesImpl;
import org.eclipse.birt.chart.model.layout.Legend;
import org.eclipse.birt.chart.model.type.BarSeries;
import org.eclipse.birt.chart.model.type.PieSeries;
import org.eclipse.birt.chart.model.type.impl.BarSeriesImpl;
import org.eclipse.birt.chart.model.type.impl.PieSeriesImpl;
import org.eclipse.birt.chart.util.PluginSettings;
import org.eclipse.birt.core.framework.Platform;
import org.eclipse.birt.report.engine.api.EngineConfig;
import org.eclipse.birt.report.engine.api.HTMLRenderOption;
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;
import org.eclipse.birt.report.model.api.CellHandle;
import org.eclipse.birt.report.model.api.DataItemHandle;
import org.eclipse.birt.report.model.api.DesignConfig;
import org.eclipse.birt.report.model.api.DesignElementHandle;
import org.eclipse.birt.report.model.api.ElementFactory;
import org.eclipse.birt.report.model.api.ExtendedItemHandle;
import org.eclipse.birt.report.model.api.GridHandle;
import org.eclipse.birt.report.model.api.IDesignEngine;
import org.eclipse.birt.report.model.api.IDesignEngineFactory;
import org.eclipse.birt.report.model.api.ImageHandle;
import org.eclipse.birt.report.model.api.LabelHandle;
import org.eclipse.birt.report.model.api.PropertyHandle;
import org.eclipse.birt.report.model.api.ReportDesignHandle;
import org.eclipse.birt.report.model.api.RowHandle;
import org.eclipse.birt.report.model.api.ScriptDataSetHandle;
import org.eclipse.birt.report.model.api.ScriptDataSourceHandle;
import org.eclipse.birt.report.model.api.SessionHandle;
import org.eclipse.birt.report.model.api.StructureFactory;
import org.eclipse.birt.report.model.api.StyleHandle;
import org.eclipse.birt.report.model.api.TableHandle;
import org.eclipse.birt.report.model.api.elements.DesignChoiceConst ants;
import org.eclipse.birt.report.model.api.elements.structures.Comput edColumn;
import org.eclipse.birt.report.model.api.elements.structures.Highli ghtRule;
import
org.eclipse.birt.report.model.api.elements.structures.Result SetColumn;

import com.ibm.icu.util.ULocale;

public class CreateReport3 implements DesignChoiceConstants
{
final String output_path = "F:/stuff/eclipse/reports";
final String image_dir = "images";
final String engine_path =
"F:/stuff/eclipse/birt-runtime-2_2_1/ReportEngine";
final String filename = "pojo";
final String row_layout = "no_alternating_colours";
final String output_format = "pdf";
final String dimension = "";

ReportDesignHandle designHandle = null;
ElementFactory designFactory = null;
IDesignEngine engine = null;

public static void main(String[] args)
{
DataProviderChart dataProviderChart = new DataProviderChart();
CreateReport3 de = new CreateReport3();
de.buildReport(dataProviderChart);
}

void buildReport(IChart dataProvider)
{
configurePlatform();
buildDataSource();
buildDataSet(dataProvider);
buildBasicReport();
buildPieChartReport();
stopSavePlatform();
convertReport(output_format, dataProvider);
}

void configurePlatform()
{
try
{
System.out.println("starting configurePlatform() method");

DesignConfig config = new DesignConfig();
config.setProperty("BIRT_HOME", engine_path);
Platform.startup(config);
IDesignEngineFactory factory = (IDesignEngineFactory)
Platform.createFactoryObject(IDesignEngineFactory.EXTENSION_ DESIGN_ENGINE_FACTORY);
engine = factory.createDesignEngine(config);
SessionHandle session = engine.newSessionHandle(ULocale.ENGLISH);
designHandle = session.createDesign();
designFactory = designHandle.getElementFactory();
}catch(Exception e)
{
e.printStackTrace();
}
System.out.println("Finished configurePlatform() method");
System.out.println();
}

void buildDataSource()
{
try
{
System.out.println("starting buildDataSource() method");
ScriptDataSourceHandle dsHandle =
designFactory.newScriptDataSource("Data Source");

designHandle.getDataSources().add(dsHandle);
}catch(Exception e)
{
e.printStackTrace();
}

System.out.println("Finished buildDataSource() Method");
System.out.println("");
}

void buildDataSet(IChart dataProvider)
{
try
{
System.out.println("starting buildDataSet() method");

ScriptDataSetHandle dsHandle = designFactory.newScriptDataSet("ds");
dsHandle.setDataSource("Data Source");

dsHandle.setOpen("data = dataProvider.getyValues(); \n" +
"data2 = dataProvider.getxValues(); \n " +
"totalrows = data.size(); \n" +
"currentrow = 1;\n");

dsHandle.setFetch("if(currentrow >= totalrows) \n" +
"{return(false);} \n" +
"var favrow = data.get(currentrow); \n" +
"row[\"abc0\"] = favrow; \n"+
"var favrow2 = data2.get(currentrow); \n" +
"row[\"cba0\"] = favrow2 \n;"+
"currentrow = currentrow + 1; \n" +
"return(true); \n");

dsHandle.setClose("data = null; \n data2 = null; \n");

PropertyHandle computedSet =
dsHandle.getPropertyHandle(ScriptDataSetHandle.RESULT_SET_PR OP);
ResultSetColumn resultColumn =
StructureFactory.createResultSetColumn();

resultColumn = StructureFactory.createResultSetColumn();
resultColumn.setPosition(1);
resultColumn.setColumnName("abc0");
resultColumn.setDataType(COLUMN_DATA_TYPE_FLOAT);
computedSet.addItem(resultColumn);

resultColumn = StructureFactory.createResultSetColumn();
resultColumn.setPosition(2);
resultColumn.setColumnName("cba0");
resultColumn.setDataType(COLUMN_DATA_TYPE_STRING);
computedSet.addItem(resultColumn);

designHandle.getDataSets().add(dsHandle);

System.out.println("Finished buildDataSet() method");
System.out.println("");
}catch(Exception e)
{
e.printStackTrace();
}
}

void stopSavePlatform()
{
try
{
System.out.println("starting stopSavePlatform() method");

/*save file*/
designHandle.saveAs(output_path + "/" + filename + ".rptdesign");
designHandle.close();

Platform.shutdown();
}catch(Exception e)
{
e.printStackTrace();
}
System.out.println("Finished stopSavePlatform() method");
System.out.println("");
}

void buildBasicReport()
{
try
{
System.out.println("starting buildBasicReport method");
DesignElementHandle element = designFactory.newSimpleMasterPage("Page
Master");
designHandle.getMasterPages().add(element);

/*table with 2 columns, 1 row*/
GridHandle grid = designFactory.newGridItem(null, 2, 1);
designHandle.getBody().add(grid);

//Kopf soll über die ganze Seitenbreite gehen
grid.setWidth("100%");

/*row with 1 picture in each column*/
RowHandle row = (RowHandle) grid.getRows().get(0);

//erstes Bild wird der Tabelle hinzugefügt
ImageHandle image = designFactory.newImage(null);
CellHandle cell = (CellHandle) row.getCells().get(0);
cell.getContent().add(image);
image.setFile("\"images/logo_viadee.gif\"");

//zweites Bild wird der Tabelle hinzugefügt
ImageHandle image2 = designFactory.newImage(null);
cell = (CellHandle) row.getCells().get(1);
cell.getContent().add(image2);
image2.setFile("\"images/logo_viadee2.jpg\"");

row = (RowHandle) grid.getRows().get(1);

}catch(Exception e)
{
e.printStackTrace();
}
System.out.println("Finished buildBasicReport() method");
System.out.println("");
}

void buildPieChartReport()
{
try
{
System.out.println("starting buildPieChartReport method");

ChartWithoutAxes cwoaPie = ChartWithoutAxesImpl.create( );
cwoaPie.setDimension(
ChartDimension.TWO_DIMENSIONAL_WITH_DEPTH_LITERAL );
cwoaPie.setType( "Pie Chart" );
cwoaPie.setSubType( "Standard Pie Chart" );

// Plot
cwoaPie.setSeriesThickness( 10 );

// Legend
Legend lg = cwoaPie.getLegend( );
lg.getOutline( ).setVisible( true );

// Title
cwoaPie.getTitle( ).getLabel( ).getCaption( ).setValue( "Pie Chart" );

// Base Series
Series seCategory = SeriesImpl.create( );

Query query = QueryImpl.create( "row[\"cba0\"]" );
seCategory.getDataDefinition().add(query);

SeriesDefinition sd = SeriesDefinitionImpl.create( );
cwoaPie.getSeriesDefinitions( ).add( sd );
sd.getSeriesPalette( ).shift( 0 );
sd.getSeries( ).add( seCategory );

// Orthogonal Series
PieSeries sePie = (PieSeries) PieSeriesImpl.create( );
Query query2 = QueryImpl.create( "row[\"abc0\"]" );
sePie.getDataDefinition().add(query2);

sePie.setSeriesIdentifier( "Cities" );
sePie.setExplosion( 5 );

SeriesDefinition sdCity = SeriesDefinitionImpl.create( );
sd.getSeriesDefinitions( ).add( sdCity );
sdCity.getSeries( ).add( sePie );

GridHandle grid = designFactory.newGridItem(null, 1, 1);
designHandle.getBody().add(grid);

grid.setWidth("100%");

/*row with 1 picture in each column*/
RowHandle row = (RowHandle) grid.getRows().get(0);

CellHandle cell = (CellHandle) row.getCells().get(0);
ExtendedItemHandle eih = designFactory.newExtendedItem( null, "Chart" );
eih.setDataSet(designHandle.findDataSet("ds"));

eih.setHeight( "500pt" );
eih.setWidth( "500pt" );

PropertyHandle computedSet = eih.getColumnBindings( );
ComputedColumn cs1 = StructureFactory.createComputedColumn();
cs1.setExpression( "dataSetRow[\"abc0\"]" );
cs1.setName("abc0");
cs1.setDataType(COLUMN_DATA_TYPE_FLOAT);
computedSet.addItem( cs1 );


ComputedColumn cs2 = StructureFactory.createComputedColumn();
cs2.setExpression( "dataSetRow[\"cba0\"]" );
cs2.setName("cba0");
cs2.setDataType(COLUMN_DATA_TYPE_STRING);
computedSet.addItem( cs2 );

eih.getReportItem( ).setProperty( "chart.instance", cwoaPie );

cell.getContent().add(eih);
}catch(Exception e)
{
e.printStackTrace();
}


System.out.println("Finished buildPieChartReport() method");
System.out.println("");
}

void convertReport(String format, IChart dataProvider)
{
System.out.println("starting convertReport() method");

EngineConfig config = new EngineConfig( );
IReportEngine engine = null;
IReportRunnable design = null;

try{
//Laufzeitumgebung starten
config = new EngineConfig( );
config.setEngineHome(engine_path);
//config.setLogConfig("F:/stuff/eclipse/log", Level.ALL);

Platform.startup(config);
IReportEngineFactory factory = (IReportEngineFactory) Platform
.createFactoryObject(
IReportEngineFactory.EXTENSION_REPORT_ENGINE_FACTORY );
engine = factory.createReportEngine( config );
engine.changeLogLevel( Level.WARNING );

}catch( Exception e){
e.printStackTrace();
}

try
{
//vorher hoffentlich erstelltes design öffnen
design = engine.openReportDesign(output_path + "/" + filename
+".rptdesign");
}catch(Exception e)
{
e.printStackTrace();
}

try
{
if(!format.equals("pdf") && !format.equals("html") &&
!format.equals("both"))
{
System.out.println("output format is not correct, switching to
default: pdf");
format = "pdf";
}

if(format.equals("pdf") || format.equals("both"))
{
System.out.println("starting pdf");

IRunAndRenderTask pdf_task = engine.createRunAndRenderTask(design);

//Das Datenobjekt dem pdf-Task hinzugefügen
Map<String, Object> appContext = pdf_task.getAppContext();
appContext.put("dataProvider", dataProvider);
pdf_task.setAppContext(appContext);

//Optionen für den pdf_task setzen
PDFRenderOption pdf_options = new PDFRenderOption();
pdf_options.setOutputFileName(output_path + "/" + filename + ".pdf");
pdf_options.setOutputFormat("pdf");
pdf_task.setRenderOption(pdf_options);

pdf_task.run();
pdf_task.close();

System.out.println("Finished pdf");
}

if(format.equals("html") || format.equals("both"))
{
System.out.println("starting html");

IRunAndRenderTask html_task = engine.createRunAndRenderTask(design);

//Datenobjekt dem html_task hinzufügen
Map<String, Object> appContext = html_task.getAppContext();
appContext.put("dataProvider", dataProvider);
html_task.setAppContext(appContext);

//Optionen für den html_task
HTMLRenderOption html_options = new HTMLRenderOption();
html_options.setOutputFileName(output_path + "/" + filename + ".html");
html_options.setOutputFormat("html");
html_options.setImageDirectory("image");
html_options.setBaseImageURL("images");
html_task.setRenderOption(html_options);

html_task.run();
html_task.close();

System.out.println("Finished html");
}
}
catch ( Exception e )
{
System.out.println("*****ERROR*****");
e.printStackTrace();
System.out.println("");
System.out.println(e.getMessage());
}

engine.destroy();
Platform.shutdown();
System.out.println("Finished convertReport() method");
System.out.println("");
}
}

----






David Michonneau schrieb:
> If the chart is inside a report, you cannot use hard-coded data. You must
> use the data from the report. So define column bindings, and add references
> to them in the chart model. Then the report will automatically populate the
> chart data using the data from the db.
>
> If you really need hard-coded data, you can use a scripted dataset then at
> the report level, and use the dataset in the chart, but you still need to
> define bindings like I mentioned.
>
> Thanks,
>
> David
>
> "Markus Schlautmann" <markus.schlautmann@viadee.de> wrote in message
> news:1f91890f3fe5b0dde64de2a0836fd623$1@www.eclipse.org...
>> David,
>>
>> i'm confused.
>> I'm doing the following:
>>
>> // Data Set
>> TextDataSet categoryValues = TextDataSetImpl.create( new String[]{
>> "New York", "Boston", "Chicago", "San Francisco", "Dallas"} );
>>
>> NumberDataSet seriesOneValues = NumberDataSetImpl.create( new double[]{
>> 54.65, 21, 75.95, 91.28, 37.43 } );
>>
>>
>> // Base Series
>> Series seCategory = SeriesImpl.create( );
>> seCategory.setDataSet( categoryValues );
>>
>> SeriesDefinition sd = SeriesDefinitionImpl.create( );
>> cwoaPie.getSeriesDefinitions( ).add( sd );
>> sd.getSeriesPalette( ).shift( 0 );
>> sd.getSeries( ).add( seCategory );
>>
>> // Orthogonal Series
>> PieSeries sePie = (PieSeries) PieSeriesImpl.create( );
>> sePie.setDataSet( seriesOneValues );
>> sePie.setSeriesIdentifier( "Cities" ); sePie.setExplosion( 5 );
>>
>> SeriesDefinition sdCity = SeriesDefinitionImpl.create( );
>> sd.getSeriesDefinitions( ).add( sdCity );
>> sdCity.getSeries( ).add( sePie );
>>
>>
>> Addionally to these Datasets i have to define a column binding?
>>
>> Best Regards
>> Markus Schlautmann
>>
>>
>
>
Re: nearly working [message #260604 is a reply to message #260444] Mon, 05 November 2007 13:09 Go to previous messageGo to next message
David Michonneau is currently offline David MichonneauFriend
Messages: 1145
Registered: July 2009
Senior Member
I think you need to hook the chart in the report before you start setting
those properties.

For the pdf issue, I am not sure what it could be.

Thanks,

David

"Markus Schlautmann" <Markus.Schlautmann@gmx.de> wrote in message
news:fgfpie$8o7$1@build.eclipse.org...
> David,
>
> thank you very much for spending so much time in this group!
> i hope this will be my last question in this thread.
> i tried it as you told me. I created a data source and a data set and
> defined column bindings.
> My report compiles without errors now, but i get warnings:
>
> starting buildPieChartReport method
> 02.11.2007 18:52:07
> org.eclipse.birt.chart.reportitem.ChartReportItemImpl
> getPropertyDefinitions
> WARNING: Request for property definitions received before model was
> created.
> 02.11.2007 18:52:07
> org.eclipse.birt.chart.reportitem.ChartReportItemImpl
> getPropertyDefinitions
> WARNING: Request for property definitions received before model was
> created.
> 02.11.2007 18:52:07
> org.eclipse.birt.chart.reportitem.ChartReportItemImpl
> getPropertyDefinitions
> WARNING: Request for property definitions received before model was
> created.
> 02.11.2007 18:52:07
> org.eclipse.birt.chart.reportitem.ChartReportItemImpl
> getPropertyDefinitions
> WARNING: Request for property definitions received before model was
> created.
> 02.11.2007 18:52:07
> org.eclipse.birt.chart.reportitem.ChartReportItemImpl
> getPropertyDefinitions
> WARNING: Request for property definitions received before model was
> created.
> Finished buildPieChartReport() method
>
> This happens every time i access the extended item handle, like
> eih.setHeight() or eih.setWidth()......
> How can i solve this?
>
> I think this is nothing critical, the report design looks fine now, the
> chart is in my design. The design is compiled without errors or warnings
> into pdf. But in my pdf is no chart. What have i done wrong?
>
> Best Regards
> Markus Schlautmann
>
>
> ----
> package main2;
> import java.util.Vector;
>
> import interfaces.IChart;
>
> public class DataProviderChart implements IChart
> {
> private Vector<String> xValues;
> private Vector<Float> yValues;
> private String chartCaption;
> private String xCaption;
> private String yCaption;
>
> public DataProviderChart()
> {
> chartCaption = "Mein Charttitel";
> xCaption = "das ist die xAchse";
> yCaption = "das ist die yAchse";
>
> xValues = new Vector<String>();
> yValues = new Vector<Float>();
>
> xValues.add("one");
> xValues.add("two");
> xValues.add("three");
>
> yValues.add(25.5f);
> yValues.add(35.765f);
> yValues.add(15.777f);
> }
>
> public Vector<String> getxValues()
> {
> return xValues;
> }
>
> public Vector<Float> getyValues()
> {
> return yValues;
> }
>
> public String getChartCaption()
> {
> return chartCaption;
> }
>
> public String getxCaption()
> {
> return xCaption;
> }
>
> public String getyCaption()
> {
> return yCaption;
> }
> }
> ----
>
> ----
>
> package main2;
>
> import interfaces.ITable;
> import interfaces.IChart;
>
> import java.util.Map;
> import java.util.logging.Level;
>
> import org.eclipse.birt.chart.device.IDeviceRenderer;
> import org.eclipse.birt.chart.factory.GeneratedChartState;
> import org.eclipse.birt.chart.factory.Generator;
> import org.eclipse.birt.chart.model.ChartWithAxes;
> import org.eclipse.birt.chart.model.ChartWithoutAxes;
> import org.eclipse.birt.chart.model.attribute.Bounds;
> import org.eclipse.birt.chart.model.attribute.ChartDimension;
> import org.eclipse.birt.chart.model.attribute.DataPointComponent;
> import org.eclipse.birt.chart.model.attribute.DataPointComponentTyp e;
> import org.eclipse.birt.chart.model.attribute.LegendItemType;
> import org.eclipse.birt.chart.model.attribute.impl.BoundsImpl;
> import org.eclipse.birt.chart.model.attribute.impl.ColorDefinitionI mpl;
> import org.eclipse.birt.chart.model.attribute.impl.DataPointCompone ntImpl;
> import org.eclipse.birt.chart.model.attribute.impl.GradientImpl;
> import
> org.eclipse.birt.chart.model.attribute.impl.JavaNumberFormat SpecifierImpl;
> import org.eclipse.birt.chart.model.component.Axis;
> import org.eclipse.birt.chart.model.component.Series;
> import org.eclipse.birt.chart.model.component.impl.SeriesImpl;
> import org.eclipse.birt.chart.model.data.BaseSampleData;
> import org.eclipse.birt.chart.model.data.DataFactory;
> import org.eclipse.birt.chart.model.data.NumberDataSet;
> import org.eclipse.birt.chart.model.data.OrthogonalSampleData;
> import org.eclipse.birt.chart.model.data.Query;
> import org.eclipse.birt.chart.model.data.SampleData;
> import org.eclipse.birt.chart.model.data.SeriesDefinition;
> import org.eclipse.birt.chart.model.data.TextDataSet;
> import org.eclipse.birt.chart.model.data.impl.NumberDataSetImpl;
> import org.eclipse.birt.chart.model.data.impl.QueryImpl;
> import org.eclipse.birt.chart.model.data.impl.SeriesDefinitionImpl;
> import org.eclipse.birt.chart.model.data.impl.TextDataSetImpl;
> import org.eclipse.birt.chart.model.impl.ChartWithAxesImpl;
> import org.eclipse.birt.chart.model.impl.ChartWithoutAxesImpl;
> import org.eclipse.birt.chart.model.layout.Legend;
> import org.eclipse.birt.chart.model.type.BarSeries;
> import org.eclipse.birt.chart.model.type.PieSeries;
> import org.eclipse.birt.chart.model.type.impl.BarSeriesImpl;
> import org.eclipse.birt.chart.model.type.impl.PieSeriesImpl;
> import org.eclipse.birt.chart.util.PluginSettings;
> import org.eclipse.birt.core.framework.Platform;
> import org.eclipse.birt.report.engine.api.EngineConfig;
> import org.eclipse.birt.report.engine.api.HTMLRenderOption;
> 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;
> import org.eclipse.birt.report.model.api.CellHandle;
> import org.eclipse.birt.report.model.api.DataItemHandle;
> import org.eclipse.birt.report.model.api.DesignConfig;
> import org.eclipse.birt.report.model.api.DesignElementHandle;
> import org.eclipse.birt.report.model.api.ElementFactory;
> import org.eclipse.birt.report.model.api.ExtendedItemHandle;
> import org.eclipse.birt.report.model.api.GridHandle;
> import org.eclipse.birt.report.model.api.IDesignEngine;
> import org.eclipse.birt.report.model.api.IDesignEngineFactory;
> import org.eclipse.birt.report.model.api.ImageHandle;
> import org.eclipse.birt.report.model.api.LabelHandle;
> import org.eclipse.birt.report.model.api.PropertyHandle;
> import org.eclipse.birt.report.model.api.ReportDesignHandle;
> import org.eclipse.birt.report.model.api.RowHandle;
> import org.eclipse.birt.report.model.api.ScriptDataSetHandle;
> import org.eclipse.birt.report.model.api.ScriptDataSourceHandle;
> import org.eclipse.birt.report.model.api.SessionHandle;
> import org.eclipse.birt.report.model.api.StructureFactory;
> import org.eclipse.birt.report.model.api.StyleHandle;
> import org.eclipse.birt.report.model.api.TableHandle;
> import org.eclipse.birt.report.model.api.elements.DesignChoiceConst ants;
> import
> org.eclipse.birt.report.model.api.elements.structures.Comput edColumn;
> import
> org.eclipse.birt.report.model.api.elements.structures.Highli ghtRule;
> import
> org.eclipse.birt.report.model.api.elements.structures.Result SetColumn;
>
> import com.ibm.icu.util.ULocale;
>
> public class CreateReport3 implements DesignChoiceConstants
> {
> final String output_path = "F:/stuff/eclipse/reports";
> final String image_dir = "images";
> final String engine_path =
> "F:/stuff/eclipse/birt-runtime-2_2_1/ReportEngine";
> final String filename = "pojo";
> final String row_layout = "no_alternating_colours";
> final String output_format = "pdf";
> final String dimension = "";
>
> ReportDesignHandle designHandle = null;
> ElementFactory designFactory = null;
> IDesignEngine engine = null;
>
> public static void main(String[] args)
> {
> DataProviderChart dataProviderChart = new DataProviderChart();
> CreateReport3 de = new CreateReport3();
> de.buildReport(dataProviderChart);
> }
>
> void buildReport(IChart dataProvider)
> {
> configurePlatform();
> buildDataSource();
> buildDataSet(dataProvider);
> buildBasicReport();
> buildPieChartReport();
> stopSavePlatform();
> convertReport(output_format, dataProvider);
> }
>
> void configurePlatform()
> {
> try
> {
> System.out.println("starting configurePlatform() method");
>
> DesignConfig config = new DesignConfig();
> config.setProperty("BIRT_HOME", engine_path);
> Platform.startup(config);
> IDesignEngineFactory factory = (IDesignEngineFactory)
> Platform.createFactoryObject(IDesignEngineFactory.EXTENSION_ DESIGN_ENGINE_FACTORY);
> engine = factory.createDesignEngine(config);
> SessionHandle session = engine.newSessionHandle(ULocale.ENGLISH);
> designHandle = session.createDesign();
> designFactory = designHandle.getElementFactory();
> }catch(Exception e)
> {
> e.printStackTrace();
> }
> System.out.println("Finished configurePlatform() method");
> System.out.println();
> }
>
> void buildDataSource()
> {
> try
> {
> System.out.println("starting buildDataSource() method");
> ScriptDataSourceHandle dsHandle =
> designFactory.newScriptDataSource("Data Source");
>
> designHandle.getDataSources().add(dsHandle);
> }catch(Exception e)
> {
> e.printStackTrace();
> }
>
> System.out.println("Finished buildDataSource() Method");
> System.out.println("");
> }
>
> void buildDataSet(IChart dataProvider)
> {
> try
> {
> System.out.println("starting buildDataSet() method");
>
> ScriptDataSetHandle dsHandle = designFactory.newScriptDataSet("ds");
> dsHandle.setDataSource("Data Source");
>
> dsHandle.setOpen("data = dataProvider.getyValues(); \n" +
> "data2 = dataProvider.getxValues(); \n " +
> "totalrows = data.size(); \n" +
> "currentrow = 1;\n");
>
> dsHandle.setFetch("if(currentrow >= totalrows) \n" +
> "{return(false);} \n" +
> "var favrow = data.get(currentrow); \n" +
> "row[\"abc0\"] = favrow; \n"+
> "var favrow2 = data2.get(currentrow); \n" +
> "row[\"cba0\"] = favrow2 \n;"+
> "currentrow = currentrow + 1; \n" +
> "return(true); \n");
>
> dsHandle.setClose("data = null; \n data2 = null; \n");
>
> PropertyHandle computedSet =
> dsHandle.getPropertyHandle(ScriptDataSetHandle.RESULT_SET_PR OP);
> ResultSetColumn resultColumn =
> StructureFactory.createResultSetColumn();
>
> resultColumn = StructureFactory.createResultSetColumn();
> resultColumn.setPosition(1);
> resultColumn.setColumnName("abc0");
> resultColumn.setDataType(COLUMN_DATA_TYPE_FLOAT);
> computedSet.addItem(resultColumn);
>
> resultColumn = StructureFactory.createResultSetColumn();
> resultColumn.setPosition(2);
> resultColumn.setColumnName("cba0");
> resultColumn.setDataType(COLUMN_DATA_TYPE_STRING);
> computedSet.addItem(resultColumn);
>
> designHandle.getDataSets().add(dsHandle);
>
> System.out.println("Finished buildDataSet() method");
> System.out.println("");
> }catch(Exception e)
> {
> e.printStackTrace();
> }
> }
>
> void stopSavePlatform()
> {
> try
> {
> System.out.println("starting stopSavePlatform() method");
>
> /*save file*/
> designHandle.saveAs(output_path + "/" + filename + ".rptdesign");
> designHandle.close();
>
> Platform.shutdown();
> }catch(Exception e)
> {
> e.printStackTrace();
> }
> System.out.println("Finished stopSavePlatform() method");
> System.out.println("");
> }
>
> void buildBasicReport()
> {
> try
> {
> System.out.println("starting buildBasicReport method");
> DesignElementHandle element = designFactory.newSimpleMasterPage("Page
> Master");
> designHandle.getMasterPages().add(element);
>
> /*table with 2 columns, 1 row*/
> GridHandle grid = designFactory.newGridItem(null, 2, 1);
> designHandle.getBody().add(grid);
>
> //Kopf soll
Re: nearly working [message #260608 is a reply to message #260604] Mon, 05 November 2007 13:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: peter.koster.spamtrap.trapspam.industrial-tsi.com

On Mon, 05 Nov 2007 14:09:23 +0100, David Michonneau wrote:

snip

--
groet, HP
http://www.interinfra.nl/ukindex.htm
Re: nearly working [message #1690222 is a reply to message #260608] Wed, 25 March 2015 19:46 Go to previous messageGo to next message
Yudhesh Bhawsar is currently offline Yudhesh BhawsarFriend
Messages: 2
Registered: March 2015
Junior Member
I'm using BIRT 4.4.0

I get this error at the lines:
import interfaces.Ichart;
import interfaces.ITable;

Could you please help me?

Thanks in advance. Smile
Re: nearly working [message #1690335 is a reply to message #1690222] Thu, 26 March 2015 16:18 Go to previous message
Jesse Freeman is currently offline Jesse FreemanFriend
Messages: 184
Registered: January 2015
Senior Member
What is the error you are receiving?
My guess is that you don't have those classes in your project/package so it cannot find them.
Previous Topic:Event onCreate is called after Event onRender
Next Topic:report execution time
Goto Forum:
  


Current Time: Thu Jul 18 03:20:57 GMT 2024

Powered by FUDForum. Page generated in 0.05431 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top