WebI report (version 4.1 SP5) I have 2 queries that have been merged on the field Tagname. Query 1 uses a universe pointed at a SQL Server database. Query 2 uses a universe pointed at an Oracle database. Query 1: selects Tagname, SampleDate, SampleValue where Tagname = user inputted name and SampleDate between user inputted begin date and user inputted end date. Query 2: Selects Tagname, Revision, BeginDate, EndDate, CPK Limit Where Tagname = Result from Query 1 for Tagname The SampleValue field in Query 1 represents sampling test data collected during our manufacturing process. The CPK Limit field represents a control limit upon which we measure the results of our sampling test data. Ultimately my goal is to create an SPC chart that displays a line graph showing sampling test data and CPK Limit over a date range. After merging the dimensions and adding the CPK Limit from Query 2 to Query 1, I got #DATASYNC and #CONTEXT errors. I created a report variable for CPK Limit and now get the #MULTIVALUE error, which makes perfect sense. The data modeling related to Query 2 allows for revision control, for example: Revision A is effective from BeginDate = 1/01/2015 to EndDate = 12/31/2015, CPK Limit = 4000 Revision B is effective from BeginDate = 1/01/2016 to EndDate = 12/31/2017, CPK Limit = 3700 So it makes perfect sense why there are multiple values being returned in that one field. We may run a report for a Tagname from 5/01/2015 to 5/01/2016 which returns both CPK Limits of 4000 and 3700. What I can’t figure out is the correct method for resolving this problem. For each row, I need to apply logic that displays Query2.CPK Limit where Query1.SampleDateTime is between Query2.BeginDate and Query2.EndDate, for example: Q1.Tagname Q1.SampleDate Q1.SampleValue Q2.CPKLimit Machine1 08/17/2015 3875 4000 Machine1 03/15/2016 3925 3700 Any advice is greatly appreciated, thanks
↧