Jump to content

BIRT Developer Center Download


Photo
- - - - -

BIRT 4.3.1 (Maximo 7.6) sub-query error - wrong value binded

sub-query error

  • Please log in to reply
3 replies to this topic

#1 PPB

PPB

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 16 February 2016 - 07:10 PM

Hi All,

 

I have an issue in the new 4.3.1 report designer and even in Maximo. When I use sub-query in the report the first binding is ok but then for all records the sub-data is displayed in the report.

 

E.g. I have a MASTERPM report where I show all related JP sequence. When I run the report for more master PM the first record shows the proper jobplan sequences which jobplan sequences is displayed for all PM after that.

 

I tried 2 solution here:

 

1.

jpDataSet = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName());
jpDataSet.open();
 
var sqlText = new String();
 
// Add query to sqlText variable.
sqlText2 = "select masterpmseq.jpnum, jobplan.description as jpdesc, masterpmseq.interval as intval "
+ "from masterpmseq "
+ "inner join jobplan on jobplan.jpnum = masterpmseq.jpnum "
+ "where "
+ "masterpmseq.masterpmnum = ?"
;
 
jpDataSet.setQuery(sqlText);
jpDataSet.setQueryParameterValue(1, rows[0]["mpmnum"]);
 
 
 
2.
jpDataSet = MXReportDataSetProvider.create(this.getDataSource().getName(), this.getName());
jpDataSet.open();
 
var sqlText = new String();
 
// Add query to sqlText variable.
sqlText2 = "select masterpmseq.jpnum, jobplan.description as jpdesc, masterpmseq.interval as intval "
+ "from masterpmseq "
+ "inner join jobplan on jobplan.jpnum = masterpmseq.jpnum "
+ "where "
+ "masterpmseq.masterpmnum = '" + rows[0]["mpmnum"] + "'"
;
 
jpDataSet.setQuery(sqlText);

 

 

In the previous versions this worked but right now in the new version in both case in designer and Maximo as well the first sub-query result is bounded to the main record.

 

Does anyone idea why?

 

Kind regards

Peter



#2 Vineet Joshi

Vineet Joshi

    Advanced Member

  • Members
  • PipPipPip
  • 84 posts

Posted 04 May 2016 - 07:33 AM

Hello,

 

FYI, I am using BIRT 4.3.1 and maximo 7.6

I am facing the same issue but in report designer only, report is working fine in Maximo. I guess this was a bug in Version 3.7.1 but was not updated until 4.3.1. 

 

Thanks 



#3 PPB

PPB

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 04 May 2016 - 05:27 PM

Hi Jack S,

 

Thanks for your reply I had the same experience back in February so it is just faulty in the designer.

 

Cheers,

Peter



#4 Vineet Joshi

Vineet Joshi

    Advanced Member

  • Members
  • PipPipPip
  • 84 posts

Posted Today, 05:32 AM

Hi PPB,

 

This is not an issue. All we have to do is to make some modifications and it will work fine.

 

Select maindataset --> go to advanced Properties --> set "Needs Cache for data-engine" to true.