Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Perplexing issue between BRDPro and iHub with a report design
CodeRookie
<p>Hi, all!</p>
<p>I've run into an issue that has me tearing my hair out trying to find what the problem is (and I don't know if I'm even looking in the right place to solve it).....</p>
<p> </p>
<p>In my report, I am pulling a datetime in from the DB that is in UTC format, and we have a JS file that converts to local time for us. This time is used in the first data table of the report. </p>
<p>I have a second data set / table that looks for information based on the time passed in from the first table. It also uses a second value (ladle number) passed in from the first table for a parameter as well.</p>
<p> </p>
<p>So, here is the perplexing part...... When I run the report in BRDPro (Version: 4.4.0</p>
<p>Build id: v20150206), I get the correct data for the second table, but when I upload it to iHub (v3.1.1), the information in the second table is wrong. The JS file is the same in both locations.</p>
<p> </p>
<p>I've pretty much looked at everything I can think of that might cause the discrepancy in the data, but so far have come up with nothing. Any help would be greatly appreciated.</p>
<p> </p>
<p>Thanks,</p>
<p>Scott </p>
<p> </p>
Find more posts tagged with
Comments
jfranken
<p>Hi Scott,</p>
<p> </p>
<p>I'm not totally clear how the date is getting passed around and used, but here are a few suggestions:</p>
<p> </p>
<p>1. <span style="color:rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;">Build id: v20150206 of the Designer corresponds to the iHub 3.1.0 server. If you have build </span>v20150710 of the Designer which goes with iHub 3.1.1, i recommend testing the report in that Designer to determine whether or not it is a version issue.</p>
<p>2. Are you able to see the time value that is being used in the second table when you run the report (either by displaying it on the report or writing it to the log file)? Does it show the same (correct) time when the report is run from the Designer and the server? Perhaps the system time on the server is set to a different time than the Designer machine meaning the "local time" is different which would yield different data.</p>
<p>3. Are you accessing the same database (or data object) and using the same credentials when running from the Designer and the server? Maybe the query is the same in both cases but the data is different.</p>
<p> </p>
<p>If you are still unable to find the cause, please open a support ticket and send the report and JS file.</p>
<p> </p>
<p>Regards,</p>
<p>Jeff</p>
micajblock
<p>Could there be a difference in the time on your computer and that of the iHub? Also what I would do is display the values (original time form DB, converted time, and ladle number) in a grid between the 2 tables. That way you can see what values will be used in the second table.</p>
CodeRookie
<p>Jeff and Mica,</p>
<p> </p>
<p>Good morning, and thanks for the guidance. I will set up a grid to see what is being passed between the two tables. It just seems very odd that it works in Designer, but gets goofy on iHub itself. Jeff, to answer your question about the user, we have a specific username and password that is tied to reporting / database access, and it works both in Designer and on the iHub server.</p>
<p> </p>
<p>I'll post the results I get.</p>
<p> </p>
<p>Have a great day!</p>
<p> </p>
<p>Scott</p>
CodeRookie
<p>So, I put a grid in the design, and the correct values are being passed as parameters. Now I just have to dig a bit deeper to see why the query is processing them wrong.</p>
<p> </p>
<p>Thanks,</p>
<p>Scott</p>
micajblock
<p>I think you are using commercial BIRT. The being the case I would suggest using the below code to display the query text in the BIRT error window.</p>
<pre class="_prettyXprint">
// Example of logging for debugging. Messages will appear in the error log.
logger = java.util.logging.Logger.getLogger("birt.report.logger");
logger.warning ('the query is: ' + this.queryText);</pre>
CodeRookie
<p>Mica,</p>
<p> </p>
<p>Yes, I am using commercial BIRT, so I will give that a try.</p>
<p> </p>
<p>Thanks,</p>
<p>Scott</p>
CodeRookie
<p>Good morning, all! So, we have found a solution to the problem.....</p>
<p> </p>
<p>Here is the original query:</p>
<p> </p>
<div>select Top 2</div>
<div> heat_no,</div>
<div> ladle_no,</div>
<div> eaf_produced_dt_stamp,</div>
<div> mgo_amount = isnull((select mgo_amount from L3_whse.dbo.heat_slag_chemistry A where A.heat_no = heat_product_data.heat_no and A.location in ('1','2') group by A.heat_no having analysis_date = max(analysis_date)),0)</div>
<div>from heat_product_data</div>
<div>where eaf_produced_dt_stamp < ?</div>
<div>and ladle_no = ?</div>
<div> </div>
<div>By adding 'Order By heat_no desc', it started returning the correct information that I was looking for.</div>
<div> </div>
<div>Just thought I'd post our findings, as I know everyone was probably on the edge of their seat waiting...... LOL!!!</div>
<div> </div>
<div>Have a great day!!!</div>
<div> </div>
<div>Scott</div>