Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » GROUPING on DATA Expression Value(Can I Group a table based on an Expression Value?)
GROUPING on DATA Expression Value [message #1692451] Wed, 15 April 2015 19:26 Go to next message
Ken Strickland is currently offline Ken StricklandFriend
Messages: 14
Registered: April 2015
Junior Member
I have added a Data Expression (named Status) to a Table and would like to group based on the value. Is this possible?

I click on the Table, Insert Group, Above. I then group on the Status variable. When I View as PDF there is no data. Without the grouping, it looks fine.
Re: GROUPING on DATA Expression Value [message #1693288 is a reply to message #1692451] Wed, 22 April 2015 21:33 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Have you tried creating this field as a computed column in your data set instead?

Michael

Developer Evangelist, Silanis
Re: GROUPING on DATA Expression Value [message #1693973 is a reply to message #1693288] Wed, 29 April 2015 16:51 Go to previous messageGo to next message
Ken Strickland is currently offline Ken StricklandFriend
Messages: 14
Registered: April 2015
Junior Member
I am not sure how to create a field as a computed column.

I have a table that I added a Data variable (Status) to and I see the correct value when I preview the report. When I try to Group on this variable it I get nothing. When I try to add a chart to the report and select the table with this variable, I do not see anything in the preview data section. ????
Re: GROUPING on DATA Expression Value [message #1693974 is a reply to message #1693288] Wed, 29 April 2015 16:53 Go to previous messageGo to next message
Ken Strickland is currently offline Ken StricklandFriend
Messages: 14
Registered: April 2015
Junior Member
I am not sure how to create a field as a computed column.

I have a table that I added a Data variable (Status) to and I see the correct value when I preview the report. When I try to Group on this variable it I get nothing. When I try to add a chart to the report and select the table with this variable, I do not see anything in the preview data section. ????
Re: GROUPING on DATA Expression Value [message #1693977 is a reply to message #1693974] Wed, 29 April 2015 17:14 Go to previous messageGo to next message
Ken Strickland is currently offline Ken StricklandFriend
Messages: 14
Registered: April 2015
Junior Member
The Status value is a DATA field expression value ( READY ML1, READY ML2, or NOT READY). I would like to group on this value, or insert a chart using this table. When I try to preview the table using a chart all the values are blank.
Re: GROUPING on DATA Expression Value [message #1693986 is a reply to message #1693977] Wed, 29 April 2015 19:16 Go to previous messageGo to next message
Ken Strickland is currently offline Ken StricklandFriend
Messages: 14
Registered: April 2015
Junior Member
It appears that some of my date values are set to 0000/000, which is not a valid date. The input data is from a CSV file and I don't have any way to change the initial value. How can I check the value and change it to 1999/365?
Re: GROUPING on DATA Expression Value [message #1694134 is a reply to message #1693986] Thu, 30 April 2015 19:30 Go to previous messageGo to next message
Ken Strickland is currently offline Ken StricklandFriend
Messages: 14
Registered: April 2015
Junior Member
This could be part of my problem:

df = new Packages.java.text.SimpleDateFormat("yyyy/ddd");
LASTUSE_DATE = df.parse(dataSetRow["DC_D::DCDLSTRF"]);

The DCDLSTRF = 0000/000 and it prints out as Dec 31, 2

I need a way to compare for 0000/000 and change it to 1999/365.

Re: GROUPING on DATA Expression Value [message #1694137 is a reply to message #1694134] Thu, 30 April 2015 20:06 Go to previous messageGo to next message
Ken Strickland is currently offline Ken StricklandFriend
Messages: 14
Registered: April 2015
Junior Member
When I try to create a new chart with this data, I get the following error:

A BIRT exception occurred. See next exception for more information.
Can not convert the value of 1.2090618E7 to java.sql.Date type.

Re: GROUPING on DATA Expression Value [message #1694139 is a reply to message #1694137] Thu, 30 April 2015 20:31 Go to previous messageGo to next message
Ken Strickland is currently offline Ken StricklandFriend
Messages: 14
Registered: April 2015
Junior Member
I used the .replace to filter out the 0000/000:

LASTUSE_DATE = df.parse(dataSetRow["DC_D::DCDLSTRF"].replace("0000/000","1999/365"));

Still no luck with grouping based on the Status (Data Expression Value in table), or using the table as input for a new chart. Help.......
Re: GROUPING on DATA Expression Value [message #1694141 is a reply to message #1694137] Thu, 30 April 2015 20:34 Go to previous message
Ken Strickland is currently offline Ken StricklandFriend
Messages: 14
Registered: April 2015
Junior Member
I figured out how to filter the 0000/000 date using the .replace

LASTUSE_DATE = df.parse(dataSetRow["DC_D::DCDLSTRF"].replace("0000/000","1999/365"));

Still no luck trying to group on the Status filed (Data Expression value in table), or using the Table as input to a new Chart. Please Help....
Previous Topic:Error: Connection is not open.
Next Topic:get DispalyText of Text Item
Goto Forum:
  


Current Time: Sat Apr 20 00:35:53 GMT 2024

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

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

Back to the top