How To Suppress Records In Subreport Based on Value in Main Report

I want to supress records in the Details section of my subreport based on a value in the Details of my Main report (main report could have same record as subreport).
I created the following formula with a shared variable and placed it in the Details section of my main report:
WhilePrintingRecords;
Shared StringVar sCertCode :={ACCPASCERT.CERT_CODE}
I placed the subeport in the Group Footer of the Main Report.
In the subreport, in the Section Expert I added the following formula for Supress of the Details section:
WhilePrintingRecords;
Shared StringVar sCertCode;
sCertCode = {ACCJBCERTS.PERS_CODE}
Unfortunately even though the value in the main report is the same as the value in the subreport, those records are not being suppressed in the subreport.
Would appreciate any ideas.
Thanks.

Thanks Zilla.
The group is not based on Cert_Code but on another database field.
I can try linking on the Cert_Code. But, how do you make the link "<" ">" when linking the main report and the subreport. I don't see that as an option?
Edited by: Giulia Smyth on Feb 27, 2009 4:05 PM

Similar Messages

  • Looping thru sub report based on dataset in main report.

    Hello all,
    I have a report which has few parameters and I scheduled  it to run and export in excel. This report run multiple time based on parameter value and then export the data into different excel file. 
    Here is what I'm looking for:
    1. Create a main report with temporary data set with all the parameter values.
    2. Run sub report with parameter values from main report and then export it to excel file, I assume it will help to create one single excel file with multiple tabs.
    Questions are:
    1. How I can create s dataset in main report (may be use XML as a data source) and write a query? Since I don't have access to database I cannot add a table for parameters values so I need to know how I can create a dataset with all the values
    2. Is this a right approach or there is a another way to handle it?
    Look forward for expert advice.
    Thanks,
    P

    Hi Parry2k,
    According to your description, you want to create a report with several parameters and configure subscription to send delivery the report to users, but you haven’t permission to access database.
    According to my knowledge, as long as a user can connect to a SQL Server instance, the user is able to create temporary tables, there are no special permissions. To use XML as data source, we can select XML from type drop-down list, then embed xml in dataset
    query text box.
    To set parameter values, we can create Available values and Default Values manually or create datasets for the parameter, then get values from the datasets.
    In this case, I would recommend you asking database administrator to grant permission to access database to you. Creating temporary tables is not a good approach to solve the problem.
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    Wendy Fu
    TechNet Community Support

  • Shared DateVar in Subreport and datediff calculation in Main Report?

    Hello experts,
    I am using CRXI sp2.  I have a report that contains two subreports for different dates in the same date field that are identified by a Service Code.  The subreports have been placed in the same group footer 1a to be displayed and the calculation resides in the main report group footer 1b.  The shared variables are as follows:
    whileprintingrecords;
    shared datevar Codedate5473;
    Codedate5473:={@Codedate5473};
    and
    whileprintingrecords;
    shared Datevar Codedate5623;
    Codedate5623:={@Codedate5623}
    The main report has the following calculation is in group footer 1a.
    Whileprintingrecords;
    Shared numbervar daysbetween;
    if (isnull({@Shared 5623})or isnull({@Shared 5473})) then 0
    else daysbetween:= datediff("d",{@Shared 5623},{@Shared 5473})
    This returns negative numbers as well as calculations where one of the shared variables is null.
    I reset the calculation in the report header as well.
    Thanks for your help in advance.
    Kevin

    Hi Kevin,
    I can reproduce your issue, As per my knowledge the crystal will make some issues in null value computation as well as  shared variable  computation
    In your report i can see , you tried to access values from subreport to main report through shared variable. that will make problem. we can access values from main report to subreport without any issue using shared..dont ask me the reason..i am not the right person to say that... lol.
    The another wrong thing  i was found in your formula is , you are not resetting the shared variable any where.. so once the date field is null, the shared variable returning the previous value.
    So this is the solution for you..
    1,You have to add one more subreport for displaying your result., Lets say 'Sub report3'
    and create a formula, like.(Same which you have write before for the result)
    shared datevar Codedate5473;
    shared Datevar Codedate5623;
    numbervar daysbetween;
    WhilePrintingRecords;
    daysbetween:= datediff("d",Codedate5473,Codedate5623);
    daysbetween;
    2, Re- write your first two formulas like this
    For Subreport1,
    WhilePrintingRecords;
    shared dateVar Codedate5473;
    if isnull({Codedate5473}) then
    Codedate5473:=date(0,0,0)
    else
    Codedate5473:=date({Codedate5473});
    For subreport2
    WhilePrintingRecords;
    shared dateVar Codedate5623;
    if isnull({Codedate5623}) then
    Codedate5623:=date(0,0,0)
    else
    Codedate5623:=date({Codedate5623});
    Hope this will works for you,
    Cheers,
    Salah.
    Edited by: salahudheen muhammed on Aug 7, 2009 1:05 PM

  • How to count records from 2 tables and show in RDLC Report

    hi all,
    its being a one day searching for the solution but No Luck.
     I have two SQL tables tblstudetail and tblfeereceiptdetail.
    i just want to count records from both tables and show in RDLC report.
    I tried SQl Query Like This:
    select a.session, a.course,
    Count(CASE a.ADstatus WHEN 'OK' THEN 1 ELSE 0 END ) AS Admission,
    Count(CASE s .I_receiptstatus WHEN 'OK' THEN 1 ELSE 0 END) AS Feeprint
    from
    tblstudetail a
    FULL join
    tblfeereceiptdetail s on s.studentID = a.studentID
    where a.session = '2015' AND s.Fsession = '2015' AND a.adcat = 'Regular'
    GROUP BY a.session,a.course
    ORDER by a.course
    The result Show the Same Value in Both columns
    Session    Course      Admission       FeeDetail
    2015          B.A. I               275              275
    2015          B.A. II              307             307
    2015         B.A. III             255            255
    2015          B.Sc. I             110             110
    2015           B.Sc. II           105            105
    2015          B.Sc. III            64               64
    Actully I want to Count How many ADMISSION have been Taken(FROM tblstudetail) and How many FEE RECEIPT have been Print (From tblfeereceiptdetail).
    please guide me for this as soon as possible.
    thanks in advance...

    I am counting 'OK' in both the table columns I.e 'ADstatus' in tblstudetail and 'feereceiptstatus' in tblfeereceiptdetail
    please suggest me

  • Dynamically Set Subreport Background Color to the Same Value as Main Report Background Color

    I have a report that contains a subreport.  The main report has groupings in it.  I am dynamically setting the background color of the group rows based on an expression.  That part is working fine.  The problem that I am having is that
    I don't know how to get the subreport to "inherit" the background color of the grouping that holds it.
    Basically, I have different row shadings on my report differentiating the groupings except for the rows where the subreport shows.
    How do I go about setting the subreport background color to equal it's contaiing grouping's background color?  Thanks in advance for any and all assistance provided.

    The parameter method given by gpshukla will send the info to the subreport, but you don't need the color parameter in the main report, only the subreport. The trick is in setting the value of that parameter.
    Right-click the cell with the embedded subreport, you can select subreport properties.
    Select Parameters and add a parameter.
    The name column is the name of the parameter in the subreport (color) and value is the value to set it to.
    Set name to "color" (no quotes).
    Set Value to the same expression used to set the background color for the row.
    In the subreport, click the design surface to select the report (not header or footer).
    In the properties pane, select background color and choose expression from the dropdown.
    Type =Parameters!color.Value into the expression builder.
    This will work assuming that background color in the main report row will not change without also refreshing the subreport.
    "You will find a fortune, though it will not be the one you seek." -
    Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

  • Subreport data use to group Values in Main Report

    Hello,
    I create a Subreport in my header to calculate values, the formula is based on a specific sorting and comparison of previous values.
    In my main report I need to Group my values depending on the result. Because the group I will made on the Main Report can't be the same sorting of the SubReport.
    SUB-REPORT
    1 Paris (result "Capital")
    2 Lille (result "Same Country of Paris")
    3 Lyon (result "Same Country of Paris")
    4 London (result "Capital")
    5 Manchester ("Same Country of London")
    MAIN-REPORT
    Group
    - CAPITAL (Paris, London)
    - Same Country of London (Manchester)
    - Same Country of Paris (Lille, Lyon)
    My issue, is that I don't know how to group values on MainReport based on a formula Result of the SubReport
    OR, may be there is a way to search on value in the sub-report ?

    You can't use a shared variable to group on from a sub report in the main report since a shared variable evaluation time is done whileprintingrecords.
    Try using a SQL expression to return the same result as the subreport would. You  can  then group on the SQL expression
    Edited by: Zilla Eh on Jan 15, 2009 6:39 PM

  • How to calculate percentage and difference of two values in matrix report in ssrs 2008

    Hi everyone,
    DB--SQL server
    SSRS-2008
    I am creating matrix report with grouping on WEEK and Fiscalyearweek,
    I need to calculate of difference between FY14W01,FY15W01 ande  percentage of those..
    how to calculate in ssrs level.
    Thank You, Manasa.V

    Hi veerapaneni,
    According to your description, you want to calculated the increment percentage and difference between two fiscal year week within each week. Right?
    In this scenario, since we need to do calculation based on values between dynamically generated cells, we can't simply use expression to achieve this goal. In this scenario, we need to use custom code to record the value for fiscal 14 and fiscal 15, then
    we can calculate the difference and percentage within the column group. We have tested your case in our local environment, please refer to the steps and screenshots below:
    1. Add the custom code below into the report (you may need to modify the data type based on your scenario:
    Public Shared Value1 as Integer
    Public Shared Value2 as Integer
    Public Shared previous as string
    Public Shared previousweek as string
      Public Shared Function GetValue(Value as Integer,product as String,Week as String) as Integer
    If product =previous and Week =previousweek  Then
         Value2=Value
    Else
    previous=product
    previousweek=Week
    Value1=Value
    End If
         return Value
      End Function
      Public Shared Function GetPct()
         return (Value2-Value1)/Value1
      End Function
    Public Shared Function GetDiff()
         return Value2-Value1
      End Function
    2. Design the matrix like below:
    3. The result look like below:
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • Use subreport total in formula in main report

    Hi,
    I have a subreport which is a total figure. I just want to muliply this by a number in a field on the main report, can this be done?
    Any help appreciated!

    Symptom
    A report contains a subreport. Data from the subreport is required for calculations in the main report.
    How can you share subreport data with the main report in version 7 (or higher) of the Crystal Reports Designer?
    Resolution
    Shared variables, introduced in Crystal Reports version 7, make it easier to pass values from a subreport to the main report. Using shared variables requires two formulas: one to store the value in a shared variable, the other to retrieve the value from the shared variable.
    The most important thing to remember when using shared variables is that Crystal Reports must first evaluate the formula where the value is stored before evaluating the formula that retrieves the shared variable.
    For example if you want to pass a grand total from the subreport to do a calculation in the main report, follow these steps:
    1. In the subreport, create a formula similar to the one below:
    //@SubFormula
    //Stores the grand total of the
    //{Orders.Order Amount} field
    //in a currency variable called 'myTotal'
    WhilePrintingRecords;
    Shared CurrencyVar myTotal := Sum ({Orders.Order Amount})
    2. Place this formula in your subreport.
    3. In the main report, create a formula that declares the same variable name:
    //@MainFormula
    //Returns the value that was stored
    //in the shared currency variable called
    //myTotal in the subreport
    WhilePrintingRecords;
    Shared CurrencyVar myTotal;
    myTotal
    4. Place @MainFormula in a main report section that is beneath the section containing the subreport.
    NOTE:======
    For the shared variable to return the correct value in the main report, you must place @MainFormula in a main report section that is beneath the section containing the subreport. This ensures Crystal Reports evaluates the @SubFormula before @MainFormula.
    One way to do this is to insert a section below the section containing the subreport, and place @MainFormula in this new sub-section:
    · On the 'Format' menu, click 'Section'.
    · On the 'Sections' list, click the section containing the subreport.
    · Click 'Insert' (at top of dialog box). This inserts an additional subsection.
    · Click 'OK' to return to the report, and insert @MainFormula into this new sub-section.
    The next time you preview the report, @MainFormula displays the value from the subreport. In this particular example, that value was the grand total of the {Orders.Order Amount} field.
    ============
    5. Once you have verified that @MainFormula is returning the correct value from the subreport, you can include this formula in other main report formulas, such as:
    //@NewFormula
    //includes data from subreport
    {@MainFormula}+ Sum ({Customer.Last Year's Sales})
    · Place this formula in the same section as @MainFormula, or in a section further down on the report.
    You have now successfully shared data from a subreport with the main report.
    NOTE: =====
    This is not possible with On Demand Subreports in Crystal Reports.

  • How to pass Presentation Variable Value from Main Report to Detail Report

    Hello,
    I've 2 reports that is attached to each other. In my main report i've several report prompts and i am using i"s prompted" on my detail report to attach them.
    But 2 of my report prompts are presentation variables(Names : FIRST, SECOND). Both are in date format. I've a filter in my main report like;
    "ASSIGNMENTS_F"."EFFECTIVE_START_DATE" BETWEEN @{FIRST} AND {SECOND}
    It works fine when i run the main report. But when i click on the numbers, i see that i can not filter my detail report with the chosen values for 2 presentation variables. It just shows all the dates.
    I've tried adding both presentation variables in both reports as columns and adding 'is prompted' filter to them. But did not work either.
    I just cant pass the written values for presentation variable prompts to detail report..
    Please help :)

    Hi,
    What you can try is refer the filte condition in the main report to the detailed report with the option--> Filter based on another request.
    Or you try creating another intermediate report which will refer the main report filters and pass the filters to the detailed report.
    Hope this helps.
    Regards
    MuRam

  • How to suppress records with vzero value in a union report in OBIEE?

    Hi
    I have a Union report ,Rep1 union Rep 2,with a cloumn A in rep1 and a dummy column in place of column A in rep 2.
    I want to restrict the records where A= 0 in the union report.
    How to go abouth this.
    Thanks in advance !!

    hi,
    In report1 let the column be as it is ,why are you changing the f(x) to case statement.Did you check is data there in that column of report1.
    In the union report make tat dummy column as 0 or 1 accordingly as per your requirement.So it would retrieve all the values of column of report1.
    Check the join conditions established and play with the joins like give a full outer join and check if the data is coming including 0's if so then you can pply filter on that column saying column not equal to 0,so the remaining values gets populated.
    Cheers,
    KK
    Edited by: Kranthi.K on May 18, 2011 2:03 AM

  • How to suppress records that contain zero values

    Dear folks,
    Please take a look at my query below. This is a sample query with only 6 columns but my actual query has about 70 columns. Basically I need to be able to suppress those rows where numerical values are zeros across a row. But even if one column has a value greater than zero, I need that row. Is there any better way to do it or this is the only way to do it? I am just trying to avoid creating a big WHERE clause with all fields in there. Kind regards.
    with my_table as (
    Select 'A' as org, 12 as val_1, 13 as val_2, 14 as val_3, 40 as val_4, 100 as val_5 from dual
    union all
    Select 'b' as org, 12 as val_1, 13 as val_2, 14 as val_3, 40 as val_4, 100 as val_5 from dual
    union all
    Select 'c' as org, 12 as val_1, 13 as val_2, 14 as val_3, 40 as val_4, 100 as val_5 from dual
    union all
    Select 'A' as org, 0 as val_1, 0 as val_2, 0 as val_3, 0 as val_4, 0 as val_5 from dual)
    select * from my_table
    where
    ( val_1 != 0 And val_2 != 0 and val_3 != 0 and val_4 != 0 and val_5 != 0)

    Hi,
    dreporter wrote:
    Dear folks,
    Please take a look at my query below. This is a sample query with only 6 columns but my actual query has about 70 columns. Basically I need to be able to suppress those rows where numerical values are zeros across a row. But even if one column has a value greater than zero, I need that row. Is there any better way to do it or this is the only way to do it? I am just trying to avoid creating a big WHERE clause with all fields in there. Kind regards.Sorry, I don't know of any way to avoid referencing each column by name.
    The fact that you want to do this hints that this is a denormalized table, designed to make coding difficult and inefficient. A better design would be:
    SELECT 'A' as org, 12 as val,  1 AS col_num     FROM dual  UNION ALL
    SELECT 'A',           13,            2              FROM dual  UNION ALL
    SELECT 'A',        4,            3          FROM dual  UNION ALL
    SELECT 'A',        40,            4          FROM dual  UNION ALL
    SELECT 'A',         100,            5          FROM dual  UNION ALL
    ...Then you could use the MAX function to see if any of them were greater than 0, regardless of how many there were.
    with my_table as (
    Select 'A' as org, 12 as val_1, 13 as val_2, 14 as val_3, 40 as val_4, 100 as val_5 from dual
    union all
    Select 'b' as org, 12 as val_1, 13 as val_2, 14 as val_3, 40 as val_4, 100 as val_5 from dual
    union all
    Select 'c' as org, 12 as val_1, 13 as val_2, 14 as val_3, 40 as val_4, 100 as val_5 from dual
    union all
    Select 'A' as org, 0 as val_1, 0 as val_2, 0 as val_3, 0 as val_4, 0 as val_5 from dual)
    select * from my_table
    where
    ( val_1 != 0 And val_2 != 0 and val_3 != 0 and val_4 != 0 and val_5 != 0)That shows the rows where ALL 5 of the columns are not 0.
    If you want the rows where AT LEAST 1 of the columns are not 0, then use OR instead of AND.
    != means not equal to 0. You said you were interested in whether the columns were greater than 0, which is &gt;=.

  • [Solved] How to update records in entity based on view with distinct

    Hi
    - I have a relational view of the form:
    SELECT DISTINCT
    FROM TAB1, TAB2, ...- I created instead of triggers for delete, update and insert.
    - I created an entity object on this and an updatable view object
    - I added this to my module.
    - Then I test the view object in the module (module > test), and if I try to update an existing record, I receive the error:
    (java.sql.SQLException) ORA-02014: cannot select FOR UPDATE from view with DISTINCT, GROUP BY, etc.
    So, ADF internally create as select FOR UPDATE cursor to update the modified record and as the error shows, this is not possible on a view with distinct, ...
    Is there a way to work around this error without to rewrite the view?
    I was thinking that there is maybe a way to force ADF not to use the select FOR UPDATE and use UPDATE .. SET <value> WHERE <pk>, or maybe to create a new instead of trigger to catch the select FOR UPDATE?

    Arti,
    Here's another solution (that will still use locking, and can help avoid the "lost update" problem):
    http://stegemanoracle.blogspot.com/2006/03/using-updatable-views-with-adf.html
    John

  • How to create a Top 10 based on values from a database?

    I have a database table that stores scores for events, like a rating system.
    Users choose an event they want to score, enter their score/rating and insert this into the database table.
    This gives me, in my table:
    Event - Rating - User
    Soccer - 5 - Joe Public
    Soccer - 4.5 - Jane Public
    Tennis - 3 - Joe Public
    ...and so on.
    I would like to do two things.  Firstly, I need to calculate the average for each event, which is easy enough, although I haven't quite got my head around the GROUP BY clause which, as I understand it, only allows me to use one database field?
    Secondly, I would like to display, dynamically from the database, a list of top 10 events based on the results of the average ratings.
    How easy is this to achieve?  I'm using ASP/VBScript and MSSQL database.
    Appreciate any advice offered.  Thanks.
    Regards
    Nath.

    Hi.  Here is what I've got, so far, to calculate the average:
    SELECT     AVG(mgscore) AS mgAVGscore, mgmovieID, mgmovie, mgmovierelease
    FROM         dbo.MGreviews
    GROUP BY mgmovieID, mgmovie, mgmoviecert, mgmovierelease
    How would I then run the RANK function?  Here's the example you provided:
    SELECT RANK() OVER (ORDER BY Age) AS [Rank by Age],
           FirstName,
           Age
      FROM Person
    I've tried this:
    SELECT     RANK () OVER ORDER BY AVG(mgscore) AS mgAVGscore AS [Rank by Score], mgmovieID, mgmovie, mgmovierelease
    FROM         dbo.MGreviews
    GROUP BY mgmovieID, mgmovie, mgmoviecert, mgmovierelease
    ...but this produces the following error:
    Error in list of function arguments: 'AS' not recognized.  Can you help?  I'm not sure I'm quite understanding how the RANK function works.
    Much appreciate.
    Regards
    Nath.

  • How do I add auto text based on value in numeric field?

    Need help... I'm trying to add auto text to a text field based on a value in a numeric field. I want my text field (summary box) to say "Passed" if the value (score box) is equal to 10 and the field to say "Not Passed" if the value is equal to less than 10. My numeric field is being calculated by selecting drop-down lists.
    Thanks in advance for your help.
    Ed Watson
    Here's a link to the document I created...
    https://files.acrobat.com/?trackingid=KGLIT#folder/c3106c32-2e69-4a5f-8ef2-94d25623dbfb

    I think I figured it out.  I used the following script:
    if(NumericField1.rawValue ==1){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==2){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==3){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==4){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==5){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==6){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==7){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==8){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==9){TextField1.rawValue = "Did Not Pass"}
    if(NumericField1.rawValue ==10){TextField1.rawValue = "Passed"}
    There's probably a cleaner way to do the same thing but at least this works for now.  Hope this helps someone else.

  • Without using SubReport or SQL Command in Main Report, get desired results without duplicating

    It seems so simple.  I just need the cost, at a certain time (based on a parameter), for each item.  I wrote a SQL Command that works beautifully, but when it connects to the existing report, it slows to a horrible crawl and cannot be used for tables with over 4 million records.  Here is the SQL Command that provides the desired results:
    SELECT TOP 1 WITH TIES "INVENTITEMPRICE"."ITEMID", "INVENTITEMPRICE"."PRICETYPE", "INVENTITEMPRICE"."MARKUP", "INVENTITEMPRICE"."PRICEUNIT", "INVENTITEMPRICE"."PRICE", "INVENTITEMPRICE"."PRICEQTY", "INVENTITEMPRICE"."ACTIVATIONDATE", "INVENTITEMPRICE"."DATAAREAID"
    FROM ("AX09PROD"."dbo"."INVENTITEMPRICE" "INVENTITEMPRICE" INNER JOIN "AX09PROD"."dbo"."INVENTTABLE" "INVENTTABLE" ON (("INVENTITEMPRICE"."ITEMID"="INVENTTABLE"."ITEMID") AND ("INVENTITEMPRICE"."DATAAREAID"="INVENTTABLE"."DATAAREAID")))
    WHERE  ("INVENTITEMPRICE"."DATAAREAID"=N'TMC' AND "INVENTITEMPRICE"."PRICETYPE"=0 AND "INVENTITEMPRICE"."ACTIVATIONDATE"<={?As Of Date})
    ORDER BY ROW_NUMBER () OVER(PARTITION BY "INVENTITEMPRICE"."ITEMID" ORDER BY "INVENTITEMPRICE"."ACTIVATIONDATE" DESC)
    I've attached the report with saved data.  However, when I remove the restrictions of just certain items, it is unusable as it is SO SLOW!
    I can also get the desired results from using a subreport but it takes forever to export due to the number of records/items.  Whenever possible, I avoid subreports for this reason.  I've attached that report with data as well.
    Please be patient as I'm not savvy in SQL, but decent in generating reports.  What am I doing wrong?  This seems SO simple.  The premise is that I want the corresponding information based on the date entered:  If the date entered is 3/15/2014, the result should be 91.15 as indicated below.  I'd simply like this value to be placed in a formula per item.
    Item 80014:
    Activation Date
    Cost Price
    6/2/2014
    104.43
    4/1/2014
    91.58
    3/1/2014
    91.15
    2/1/2014
    92.89
    1/1/2014
    93.57
    Any assistance would be GREATLY appreciated!
    Thanks!
    Teena
    Update:  I was unable to attach the reports with .rpt or .txt extensions.  There were well under 1MB.  Any suggestions?

    hi Teena,
    if you're going the inline subquery route, try something like the following...the last line in the sub-query 'where' clause should in theory take care of matching the correct price based on relating the item id's between your cost price & inventory data. this should leave you with distinct values for each itemid then. hopefully it won't error out as i'm just guessing on the syntax.
    SELECT DISTINCT
    "INVENTTABLE"."ITEMID",
    "INVENTTRANS"."DATAAREAID",
    "INVENTTRANS"."DATEPHYSICAL",
    "INVENTTRANS"."QTY",
    "INVENTTABLE"."ITEMGROUPID",
    "INVENTTABLE"."ITEMNAME",
    "INVENTTRANS"."TRANSREFID",
    "INVENTTRANS"."STATUSISSUE",
    "INVENTTABLE"."ITEMTYPE",
    "INVENTTRANS"."TRANSTYPE",
    "INVENTTRANS"."RECID",
    "INVENTTRANS"."DIRECTION",
    SELECT TOP 1 "INVENTITEMPRICE"."PRICE"
    FROM "AX09PROD"."dbo"."INVENTITEMPRICE" "INVENTITEMPRICE"
    WHERE  "INVENTITEMPRICE"."DATAAREAID" LIKE 'TMC%'
    AND "INVENTITEMPRICE"."PRICETYPE"=0
    AND "INVENTITEMPRICE"."ACTIVATIONDATE"<={?As Of Date}
    AND "INVENTITEMPRICE"."ITEMID" = "INVENTTABLE"."ITEMID"
    ORDER BY "INVENTITEMPRICE"."ACTIVATIONDATE" DESC
    ) AS ITEMPRICE
    FROM  
    "AX09PROD"."dbo"."INVENTTABLE" "INVENTTABLE"
    LEFT OUTER JOIN "AX09PROD"."dbo"."INVENTTRANS" "INVENTTRANS"
    ON ("INVENTTABLE"."DATAAREAID"="INVENTTRANS"."DATAAREAID")
    AND ("INVENTTABLE"."ITEMID"="INVENTTRANS"."ITEMID")
    WHERE 
    "INVENTTRANS"."DATAAREAID" LIKE 'TMC%'
    AND (("INVENTTABLE"."ITEMGROUPID" LIKE 'RAW%') OR ("INVENTTABLE"."ITEMGROUPID" BETWEEN '000' AND '999') OR ("INVENTTABLE"."ITEMGROUPID" LIKE 'Ship_Box'))
    AND "INVENTTABLE"."ITEMTYPE" IN (0,1)
    ORDER BY 
    "INVENTTABLE"."ITEMGROUPID",
    "INVENTTABLE"."ITEMID",
    "INVENTTRANS"."DATEPHYSICAL" ASC
    Message was edited by: Jamie Wiseman

Maybe you are looking for

  • My experience, perhaps of help to someone...

    Got a copy today here in Japan (on business from Canada and with the strength of our dollar - nice little discount!), and installed it as an upgrade. I have a MB Pro 1st gen with 2GB RAM and about 25GB of HD space left on the original 100GB drive. *S

  • Issue while changing fields in a fillable form PDF (Acrobat 10.1.4 Pro)

    Good Afternoon! This is my first time posting here, so forgive me if this is in the wrong place. I am an IT technician trying to support a user who is trying to change a PDF into a fillable form using Acrobat 10.1.4.  She is trying to use the wizard

  • Report on slow-moving items

    Hello gurus, I would like to creat a report on slow-moving items in LIS, similar to report RMCBLH30 (TAC MC46). But in 'my' report I would like to see only those slow-moving items in stock. RMCBLH30 unfortunatelly gives my all slow-moving items, even

  • How to identify new records in a table using OBIEE

    Hi, I have price change table as and when a record comes into this table i have to generate an alert. Then show a report with the price changes on which i can invoke an action to go into my transactional system to make the chnage. And once the change

  • PDF, iPad, and iBooks question

    I seem to be able to import any PDF into itunes, but only certain ones will let me drag them onto my iPad for iBooks.  What are the restrictions that let me copy some but not others?