Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Manipulating Flat File Query
Manipulating Flat File Query [message #534126] Tue, 18 May 2010 07:44 Go to next message
No real name is currently offline No real nameFriend
Messages: 18
Registered: April 2010
Junior Member
Hi,
I have a Data Set, which uses a .ssv File. Using the beforeOpen script I want to add a where clause.
However, I cannot change the query further than:
this.queryText = "SELECT * FROM ERP_RM_SALES.ssv"

Even the simplest change leads to the following Error:
this.queryText = "SELECT * FROM ERP_RM_SALES.ssv where id = '1'"

Chart barChart:
+ An exception occurred during processing. Please see the following message for details:
Failed to prepare the query execution for the data set: SalesCust
Failed to prepare the following query for the data set type (org.eclipse.datatools.connectivity.oda.flatfile.dataSet).
[SELECT * FROM ERP_RM_SALES.ssv where id = '1']
Invalid table name:C:\Projects\ReportMgmt\jboss-5.1.0.GA\server\default\co nf\REPORTS\data\ERP_RM_SALES.ssv where id = '1'

What am I doing wrong?
Re: Manipulating Flat File Query [message #534288 is a reply to message #534126] Tue, 18 May 2010 15:00 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Tobias,

The flat file datasource does not support where clauses. You have to
use a filter on the dataset. Take a look at this example:
http://www.birt-exchange.org/devshare/designing-birt-reports /1214-flat-file-filter-with-hidden-parameter/#description

Jason

On 5/18/2010 3:44 AM, tobias.koehler1987@googlemail.com wrote:
> Hi,
> I have a Data Set, which uses a .ssv File. Using the beforeOpen script I
> want to add a where clause. However, I cannot change the query further
> than:
> this.queryText = "SELECT * FROM ERP_RM_SALES.ssv"
>
> Even the simplest change leads to the following Error:
> this.queryText = "SELECT * FROM ERP_RM_SALES.ssv where id = '1'"
>
> Chart barChart: + An exception occurred during processing. Please see
> the following message for details:
> Failed to prepare the query execution for the data set: SalesCust
> Failed to prepare the following query for the data set type
> (org.eclipse.datatools.connectivity.oda.flatfile.dataSet). [SELECT *
> FROM ERP_RM_SALES.ssv where id = '1']
> Invalid table
> name:C:\Projects\ReportMgmt\jboss-5.1.0.GA\server\default\co
> nf\REPORTS\data\ERP_RM_SALES.ssv where id = '1'
> What am I doing wrong?
Re: Manipulating Flat File Query [message #534452 is a reply to message #534288] Wed, 19 May 2010 09:20 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 18
Registered: April 2010
Junior Member
Thank you!
Is it also possible to add Filters to a Data Set via Script?
I want to filter the Data Set depending on which Report Parameters are filled.

[Updated on: Thu, 20 May 2010 09:01]

Report message to a moderator

Re: Manipulating Flat File Query [message #534571 is a reply to message #534452] Wed, 19 May 2010 14:42 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Take a look at
http://www.birt-exchange.org/devshare/designing-birt-reports /1216-adding-filter-to-table-dataset-dynamically/#descriptio n

Jason

On 5/19/2010 5:20 AM, tobias.koehler1987@googlemail.com wrote:
> Thank you!
> The Filter is a nice Feature. Is it also possible to add Filters to a
> Data Set via Script?
> I want to filter the Data Set depending on which Report Parameters are
> filled.
Previous Topic:How to control pagebreak on PDF report
Next Topic:How to rescale pie chart according to the number of groups
Goto Forum:
  


Current Time: Thu Apr 25 21:07:35 GMT 2024

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

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

Back to the top