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

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


Comments

  • 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 


  • 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

  • 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.


  • Thanks a lot buddy that works!


Sign In or Register to comment.