Quantcast
Channel: BIRT Exchange Forum Feed
Viewing all 542 articles
Browse latest View live

Creating a Mini java standalone app using BIRT API's

$
0
0
Hi everyone,

I have created BIRT reports using the Eclipse report designer. Now I want to create a mini application using the BIRT API's trying to connect to three different data sources and bring in data on a report page..all this I want to do using Java code..I don't plan to use the report designer to view the report page..I want build my own front end app and test how flexible BIRT could be. What other skills do I need in order to achieve this? I know Java, HTML, CSS and Javascript..Can I have the link to BIRT API's and also suggestion to good books. Your help is really appreciated.

Thanks

Getting the footer only on the last page

$
0
0
Hey,

I am trying to get the footer only on the last page of my pdf.

I have to generate a pdf file.My birt picks the data from the flat file(tab seperated file) in a table and displays it.
But the page where the table ends (it can extend to more than one page)is the last page of my pdf and I want to display some information in the footer of this last page reading it from the report parameters.

How can I implement this?

I tried it by writing the script in onRender() of the footer component.
if (BirtComp.lessThan(pageNumber, totalPage))
{
this.getStyle().display = "NONE";
}
But this does'nt works in my case. Since,I need to run birt only in one phase.

Setting column decimal format with Java Design API

$
0
0
Hi, I am trying to set the format of a numeric cell using the Design API to 2 decimal places to no avail.

I have tried the method suggested by the following post : Changing column decimal format with the DE
to no avail.

My code looks like this:

String colFormat="#0.00";
DataItemHandle dih =(DataItemHandle)cell.getContent().get(0);
NumberFormatValue nfs=new NumberFormatValue();
nfs.setPattern(colFormat);
dih.clearProperty(StyleHandle.NUMBER_FORMAT_PROP);
dih.setProperty( StyleHandle.NUMBER_FORMAT_PROP, nfs );


but to no avail. It formats the string 1 only as "1.0" instead of "1.00" as I would expect.

I took a look at what was in the report design file and the XML for the column looks like this:

 <cell id="341">
                        <property name="paddingBottom">0.1pt</property>
                        <data name="data_ratio" id="342">
                            <structure name="numberFormat">
                                <property name="pattern">#0.00</property>
                            </structure>
                            <property name="textAlign">center</property>
                            <property name="height">8pt</property>
                            <property name="width">24pt</property>
                            <property name="resultSetColumn">ratio</property>
                        </data>
                    </cell>


Does anyone have any ideas?

Thanks.

how to linkage 2 data between each other

$
0
0
Hi, I need help linkage between these two.
1. It would be a table because it is from another data set. It has own data to retrieve it detail. It can have one, two or three records. The problem is how can I link it to another table details row?
eg. Cash | Credit Card | Voucher. It can be more based on the data. Which means it is not hard coded/Label. It would show/retrieve it in horizontal row.
2. It needs to link it on the top data set because it needs to know the details row from another table whether the column database "totalamount" column is cash, credit card and etc etc from the details row (1.).
How to determine it?
Do you all have any suggestion to settle this problem?
thank you for your help.
Greatly appreciated.
Here is the blueprint I would like to show you.
Posted Image

Grid IN table

$
0
0
Dear Team,

We have created a data set which have 30 columns and 7 distinct rows.

We want to display all data in 30 columns data in 5*6 Grid and for each distinct row.

Means we wants 7 different grids for 7 different rows with 5*6 grids.

Kindly suggest any procedure.

More than 4 table groups are giving error in Birt run time 2.5.1 when there is no data available to render report

$
0
0
Hi All,

I am using BIRT runtime 2.5.1. My problem is. i am using 5 table groups and when i am trying to preview the report its giving me error.

Is there any limitation on table group that we can use only 4 groups and not more than 4 groups.

Such kind of error i am getting when there is no data. Because if there is a data available then all 5 table groups are working fine. Problem is only when there is no data available to render report.

Please reply with proper answer

Regards,
Bokya

Edit Data Set

$
0
0
Hello,

When i right-click on my dataset and select 'Edit', the Edit data Set window pops up.

I only have 6 options in this window: Data Source, Output Columns, Parameters, Filters, Settings and Preview results. (see screenshot as attachment)

In manuals on how to build reports in BIRT, i see there are more options in this window like Query, Computed Columns and Property Binding.

How do I get these extra options? Because now I have to put my SQL into the Open method and define the columns in the fetch method and then define the Output Columns before I can get a result... Or am I missing something here (I just started making BIRT reports a few days ago..)

Eclipse Platform
Version: 3.7.1



Thank you in advance.

Bat file available?

$
0
0
Is there a batch file available for running .sox files? I'm looking for one that is like the genreport.bat file that is used to run rptdesign reports.

Thanks in advance

Reports Design Grid and Table error

$
0
0
Dear Team,

I have two datasets one is summary dataset and other is graph dataset.

Summary dataset have average utilization of servers per day.

Graph dataset have servers average utilization of servers per hour per day.

Graph dataset is used to gerate graph hourly and summary data for providing data daily basis.

But we wants to get information single server wise garph and summary data on daily basis.

Kindly suggest any procedure how can i show all serverwise information.

Reading the data from external Cache, instead of Datasource

$
0
0
Hi All,

I am looking for a use case where in which I need to read external cache memory for generating birt reports(instead of database).

for example : I need to read Jboss inmemory cache to generate reports



Thanks,
Alock

Data set parameter with list box

$
0
0
Hello,

I am contacting you because I have a problem with my dataset parameter. What I want to do is for each execution of the report I display a list box to select the current month or the previous one month. For that I created a data set select * from mytable Where MONTH (myDate) = ? and I specified ChoiceMonth in Report Parameters. ChoiceMonth is a Button radio but the values ​​are static, I also tried a dynamic list box but I do not know how I do for the current month and months précedent .

Thank you for your help.

removing duplicates without using suppress duplicates

$
0
0
Hello everyone, I have use the suppress duplicates and it works fine for string but in my case I have also duplicates in numbers (counts) which I have to remove, I just have to retain the original.

I have result like this:

group |owner| count
-------------------
data1 | abc | 3
data1 | def | 3
data1 | ghi | 3
data2 | eee | 1
data3 | fff | 1
data4 | ggg | 2
data4 | hhh | 2

I have achieved this using suppress duplicates in column 'group':

group |owner|count
-------------------
data1 | abc | 3
_____ | def | 3
_____ | ghi | 3
data2 | eee | 1
data3 | fff | 1
data4 | ggg | 2
_____ | hhh | 2


but when I use suppress duplicates in 'count' column it shows like this:

group |owner|count
-------------------
data1 | abc | 3
_____ | def |___
_____ | ghi |___
data2 | eee | 1
data3 | fff |___
data4 | ggg | 2
_____ | hhh |___


the count for data3 is gone too using suppress duplicates in 'count' column because count from data2 and data3 are both '1'

What do I do now? how do I remove the duplicates that will not affect the next row?

Thanks in advance and more powers!

Multiple sheet support on table level

$
0
0
HI,

I wanted export data into multiple sheets depending on a table level data and sheet name also be as table name. I used tribix emitter but it is exporting data on a page break level. Can any one help me how to export each table as excel sheet tab while exporting into excel(XLS).

calculate difference between to rows

$
0
0
I need to show the difference between the salary element in the attached pdf instead of the sum
I added the sum using Total.sum(row["SalI1"])
I need to replace this with the subtraction

I tried adding in salI1 expression
a = dataSetRow["SalI1"];
 if(dataSetRow["calculatedperiodcode"] == 'Monthly 3-2013')
 a = dataSetRow["SalI1"]* -1;



but the display of the first row showed the negative sign, If I can make negative sign invisible but internally available this will solve the problem

BIRT csv emitter and EJB

$
0
0
Hi,

I want to use csv emitter plugin in j2ee application. Is it possible? I get following error:

org.eclipse.birt.report.engine.api.UnsupportedFormatException: The output format csv is not supported.
at org.eclipse.birt.report.engine.api.impl.EngineTask.setupRenderOption(EngineTask.java:2047)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:96)
at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)


My code:
protected String generateReportFile(IRunAndRenderTask task, IReportRunnable design, IReportEngine engine, String reportType, String reportPrefix, String baseDir) throws BirtReportGenerationFault {
	  CSVRenderOption csvOptions = new CSVRenderOption();
		
		csvOptions.setOutputFormat(CSVRenderOption.OUTPUT_FORMAT_CSV);
	
		csvOptions.setOutputFileName("C:/birt/logs/csvTestW.csv");
		
		csvOptions.setShowDatatypeInSecondRow(false);
		
		csvOptions.setExportTableByName("data");
		
		csvOptions.setDelimiter("\t");

		csvOptions.setReplaceDelimiterInsideTextWith("-");
		
		task.setRenderOption(csvOptions);				
		task.setEmitterID("org.eclipse.birt.report.engine.emitter.csv");

		try {
			task.run();// Error here
		} catch (EngineException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		task.close();


    return "C:/birt/logs/csvTestW.csv";//fileName;
  }



Same code works in Java SE app.

Bar Chart Page Break

$
0
0
Hello BIRT community,

is there possible a bar chart where the axes are flipped to be shown on 2 pages? Is there page break for charts, I mean is the parameter used by the rendering engine?

I guess the chart must be shown on one page, but maybe you know some solution of attach some example about this here.

Thanks.

Sorting in HTML View

$
0
0
Hi @ all :D

i have a question. Is it possible to do a sorting in the HTML view?

HTML View is like:

name | number
-------------------
mike | 5
jonas | 2
michael |10
carl | 1

Now i want the option to do a sorting of the numbers, but all in the HTML view:
The result should be:

name | number
-------------------
carl | 1
jonas | 2
mike | 5
michael |10

Is is possible to do such a sorting in the HTML view?

Thanks and regards :)
Benni

Graph not displayed in firefox but viewed in IE

Parameter scope/visibility with scripted datasets

$
0
0
Hello,
I have a report setup that uses a combination of a cascading parameter group and a separate boolean parameter represented as a checkbox. The cascading group populates based on script datasets backed by java classes.

Functionally the report provides a list of customer orders and the cascading group lets you select a company, division, then list of customers. The check box controls whether or not closed orders are included in the report. All of this works fine when submitting the parameter set to generate the report.

I've now got a requirement to retrieve my list of customers based on the setting of the "include closed orders" checkbox. This is because some customers may not have any open orders, to controlling the list of customers you see during the parameter loading is needed.

My problem is that the current value of all the report parameters don't seem to show up in the report context when I am inside the backing java classes. The current values of the cascading parameters are there, but the current state of the checkbox is not. The parameter is there, but is left at the default value. It's only when submitting the entire report request that I see the current value of the checkbox.

Is there any way to get access to these current parameter settings while in the middle of the cascading operations? If not, does anyone have suggestions on how I can accomplish this?

Thanks for any input or advice you can share.

Boyd

Scripted Data Source

$
0
0
Hi,
I created one report using scripted data source. If I see the prview of that report the preview will be showing perfectly. If I see the result in webviewer pdf, the report got stucked and If I run the report in Server also the pdf will not be generating. Please suggest me. BIRT Version is 3.7.2. After a long time it shows the following error.

Memory Index out of problem ......Java heap space problem.

we have changed the heap space to 512M i.e. JAVA_OPTS=-Xmx512M
Still we are getting same error.
Could you please help on this.

Regards,
Arun.
Viewing all 542 articles
Browse latest View live