Using Parameter Date Range Values in Report

Post Author: rsteeg
CA Forum: General
i would like to include the selected start and end dates on my report to display the range of the report.  I cannot recall how to do it.  Can any one help?  I am using CR X.

Post Author: Crystal Fire
CA Forum: General
"All Dates Between "+ ToText(Minimum({?Your Date Field}),"M/d/yyyy")" and "ToText(Maximum({?Your Date Field}),"M/d/yyyy")

Similar Messages

  • Which BW variable is used for date(range) when creating a portal service

    Hi,
    Can any one please let me know which BW variable is to be used for date(range) when creating a portal service for searching based on dates.
    Thanks
    Abhai

    Hi Arun,
    its just a portal service which would be called when  searching a document created on a particular date or betwwen a range of date.so what i require is which BW variable to be used when handling range.As for variable technical name we use VAR_NAME_I  and for single value variable we VAR_VALUE_EXT_I
    in the similar manner i want BW variable to be used for range of values.
    Thanks
    Abhai

  • Supress details in subreport based on date ranges in main report

    I am using Crystal XI R2 and am working with Human Resources Data.
    The main report is grouped on and generates a list of temporary teaching positions like this:
    Smith, John
         FTE_____Start Date_______End Date
          .3 ______09/01/2007______10/20/2007
          .2 ______10/05/2007 ______04/15/2008
          .2 ______04/01/2008 ______06/30/2008
    The subreport (generated from a different source, but linked to main report on ) generates a list of days the employee worked as a Teacher on Call:
         TOC Date______ Portion of Day Worked
         09/05/2007______1.0
         09/19/2007______0.6
         10/08/2007______0.4
         10/09/2007______1.0
          04/08/2008______0.6
          04/18/2008______1.0
    Employees are granted seniority for TOC days worked, EXCEPT when they are already employed in a Teaching position >=.4 FTE  (because they are already granted full seniority for that period), so I need to be able to suppress records that fall within date ranges listed in the Main Report where the combine FTE is >=.4.     
    I believe this question has two parts:
    1. how do I evaluate the date ranges to combine overlapping periods?  Results would look like this... (I don't need to be able to see this, but I'm assuming I'd have to create a date range with the results in order to answer question #2 - but I haven't worked much with ranges.)
        FTE_____Start Date______End Date
          .3______09/01/2007______10/04/2007
          .5______10/05/2007______10/20/2007 
          .2______10/21/2007______03/31/2008
          .4______04/01/2008______04/15/2008
          .2______04/16/2008______06/30/2008
    2. how do I supress the TOC dates in the Subreport that fall within the start and end dates of all the employee's positions >= 0.4 FTE ?  Supreport results for this example would look like this...
         TOC Date______ Portion of Day Worked
         09/05/2007______1.0
         09/19/2007______0.6
         04/18/2008______1.0
    (I will sum the "portion" values and mulitply them by a constant variable to complete the seniority calculation.)
    Thank you in advance for any assistance you may be able to provide!

    Thanks for your help Graham, I have continued to work with this and I took the BO Crystal III course.  Your suggestions gave me a sense of  direction.
    I was not able to share a date range array with the subreport (kept getting error messages saying "call BO" , but I WAS able to share the startdate array and the enddate array.  I also shared the fte values array. 
    I had wanted to use a loop  to check
    if TOCdate in startarray[x] to endarray[x]
    then ftearray[x]
    and  sum the new range of fte[x] values so that I could suppress any TOCdates where fte was >=0.4.   But I couldn't quite get there, I kept coming up with formulas that displayed only the first value or the last or zero.
    So I used the following formula for each index (returnindex value had to be changed for each case), then added them all together.
    shared datevar array startArray;
    shared datevar array endArray;
    shared numbervar array FTEArray;
    local numbervar arraylength:= ubound(startArray);
    local numbervar i;
    local numbervar returnindex :=-1;
    If arraylength >=1 then
    if not({AAATDDET.Date} in startarray[1]to endarray[1])then
    0 else
    if {AAATDDET.Date} in startarray[1]to endarray[1] then
    (returnIndex:= i;);
    i:=i+1;
    if returnindex =0 then
    ftearray[1]

  • How to create a report using XML data source from Crystal Report Designer

    Hi,
    Iu2019m having Crystal Report Designer XI R2 SP4. Iu2019m trying to create a report using XML data source stored on disk. This is a customer order report and the xml is structured in such a way that it has an order details header part (master) and then it has several order lines (detail). One order line can have several order line characteristics (detail-detail). So what I need to know is now I can design this layout from the designer. If this was done using views I can do it with sub-reports but using xml data this seems to be different. Can you help me to design this layout? I have included the xml and xsd as well.
    Thank you in advance.
    Regards,
    Chanaka
    XML
    <?xml version="1.0" encoding="UTF-8"?>
    <CUSTOMER_ORDER_CONF_REP_REQUEST xmlns:xsi="http://www.w3.org/2001/XMLSchema" xmlns="urn:ifsworld-com:customer_order_conf_rep">
        <CUSTOMER_ORDER_CONF_REP>
            <ORDER_NO>D555809</ORDER_NO>
            <PRINTED_DATE>2009-03-26T08:52:54</PRINTED_DATE>
            <AUTHORIZE_NAME>Chanaka</AUTHORIZE_NAME>
            <CUSTOMER_NO>CU-1473-INV</CUSTOMER_NO>
            <CUST_NAME>Mr.Johan Matts</CUST_NAME>
            <SHIP_ADDR_1>93,Main Street</SHIP_ADDR_1>
            <SHIP_ADDR_2>Negambo Road</SHIP_ADDR_2>
            <SHIP_ADDR_3>Watthala</SHIP_ADDR_3>
            <SHIP_ADDR_4>SRI LANKA</SHIP_ADDR_4>
            <BILL_ADDR_1>93,Main Street</BILL_ADDR_1>
            <BILL_ADDR_2>Negambo Road</BILL_ADDR_2>
            <BILL_ADDR_3>Watthala</BILL_ADDR_3>
            <BILL_ADDR_4>SRI LANKA</BILL_ADDR_4>
            <CUSTOMER_PO_NO>112984638</CUSTOMER_PO_NO>
            <CUSTOMER_FAX>112984639</CUSTOMER_FAX>
            <CUSTOMER_EMAIL>abcbababab</CUSTOMER_EMAIL>
            <ORDER_LINES>
                <ORDER_LINE>
                    <LINE_NO>1</LINE_NO>
                    <CUSTOMER_PART_NO>NW-IP11</CUSTOMER_PART_NO>
                    <CUSTOMER_PART_DESC>iPod</CUSTOMER_PART_DESC>
                    <SALE_UNIT_PRICE>1200</SALE_UNIT_PRICE>
                    <PRICE_TOTAL>1200</PRICE_TOTAL>
                    <DISCOUNT>0</DISCOUNT>
                    <PRICE_QTY>1</PRICE_QTY>
                    <ORDER_LINE_CHARACTERSTICS>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID xsi:nil="1"/>
                            <CHARACTERISTIC_VALUE xsi:nil="1"/>
                        </CHARACTERISTIC_ITEM>
                    </ORDER_LINE_CHARACTERSTICS>
                </ORDER_LINE>
                <ORDER_LINE>
                    <LINE_NO>2</LINE_NO>
                    <CUSTOMER_PART_NO>NW-IP24</CUSTOMER_PART_NO>
                    <CUSTOMER_PART_DESC>XGA Projector</CUSTOMER_PART_DESC>
                    <SALE_UNIT_PRICE>500</SALE_UNIT_PRICE>
                    <PRICE_TOTAL>1500</PRICE_TOTAL>
                    <DISCOUNT>0</DISCOUNT>
                    <PRICE_QTY>3</PRICE_QTY>
                    <ORDER_LINE_CHARACTERSTICS>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>1</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>Free Instalation</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                    </ORDER_LINE_CHARACTERSTICS>
                </ORDER_LINE>
                <ORDER_LINE>
                    <LINE_NO>3</LINE_NO>
                    <CUSTOMER_PART_NO>NW-IP02</CUSTOMER_PART_NO>
                    <CUSTOMER_PART_DESC>Sony DVD Player</CUSTOMER_PART_DESC>
                    <SALE_UNIT_PRICE>1000</SALE_UNIT_PRICE>
                    <PRICE_TOTAL>1000</PRICE_TOTAL>
                    <DISCOUNT>0</DISCOUNT>
                    <PRICE_QTY>1</PRICE_QTY>
                    <ORDER_LINE_CHARACTERSTICS>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>1</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>Free 5 DVDs</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                    </ORDER_LINE_CHARACTERSTICS>
                </ORDER_LINE>
                <ORDER_LINE>
                    <LINE_NO>4</LINE_NO>
                    <CUSTOMER_PART_NO>NW-IP99</CUSTOMER_PART_NO>
                    <CUSTOMER_PART_DESC>Flatscreen TV</CUSTOMER_PART_DESC>
                    <SALE_UNIT_PRICE>1500</SALE_UNIT_PRICE>
                    <PRICE_TOTAL>1350</PRICE_TOTAL>
                    <DISCOUNT>10</DISCOUNT>
                    <PRICE_QTY>1</PRICE_QTY>
                    <ORDER_LINE_CHARACTERSTICS>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>1</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>Free Delivery</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>2</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>1 year additional warranty</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                    </ORDER_LINE_CHARACTERSTICS>
                </ORDER_LINE>
                <ORDER_LINE>
                    <LINE_NO>5</LINE_NO>
                    <CUSTOMER_PART_NO>NW-IP56</CUSTOMER_PART_NO>
                    <CUSTOMER_PART_DESC>Sony MP3 Player</CUSTOMER_PART_DESC>
                    <SALE_UNIT_PRICE>200</SALE_UNIT_PRICE>
                    <PRICE_TOTAL>400</PRICE_TOTAL>
                    <DISCOUNT>0</DISCOUNT>
                    <PRICE_QTY>2</PRICE_QTY>
                    <ORDER_LINE_CHARACTERSTICS>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>1</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>Free carry belt</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>2</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>Free promotional 4GB memory bar</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                        <CHARACTERISTIC_ITEM>
                            <CHARACTERISTIC_ID>3</CHARACTERISTIC_ID>
                            <CHARACTERISTIC_VALUE>No warranty on memory bar</CHARACTERISTIC_VALUE>
                        </CHARACTERISTIC_ITEM>
                    </ORDER_LINE_CHARACTERSTICS>
                </ORDER_LINE>
            </ORDER_LINES>
        </CUSTOMER_ORDER_CONF_REP>
    </CUSTOMER_ORDER_CONF_REP_REQUEST>
    XSD
    <?xml version="1.0" encoding="UTF-8"?>
    <?report  module="ORDER" package="CUSTOMER_ORDER_CONF_REP" ?>
    <xs:schema targetNamespace="urn:ifsworld-com:customer_order_conf_rep" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:ifsworld-com:customer_order_conf_rep" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:element name="CUSTOMER_ORDER_CONF_REP_REQUEST">
    <xs:complexType>
    <xs:all minOccurs="1" maxOccurs="1">
    <xs:element name="CUSTOMER_ORDER_CONF_REP">
    <xs:complexType>
    <xs:choice minOccurs="0" maxOccurs="50">
    <xs:element name="ORDER_NO" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="PRINTED_DATE" type="xs:dateTime" nillable="true" minOccurs="0"/>
    <xs:element name="AUTHORIZE_NAME" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CUSTOMER_NO" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CUSTOMER_PO_NO" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CUST_NAME" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="SHIP_ADDR_1" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="SHIP_ADDR_2" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="SHIP_ADDR_3" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="SHIP_ADDR_4" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="BILL_ADDR_1" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="BILL_ADDR_2" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="BILL_ADDR_3" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="BILL_ADDR_4" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CUSTOMER_FAX" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CUSTOMER_EMAIL" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="ORDER_LINES" nillable="true" minOccurs="0">
    <xs:complexType>
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
    <xs:element name="ORDER_LINE">
    <xs:complexType>
    <xs:choice minOccurs="0" maxOccurs="39">
    <xs:element name="LINE_NO" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="SALE_UNIT_PRICE" type="xs:float" nillable="true" minOccurs="0"/>
    <xs:element name="PRICE_TOTAL" type="xs:float" nillable="true" minOccurs="0"/>
    <xs:element name="DISCOUNT" type="xs:float" nillable="true" minOccurs="0"/>
    <xs:element name="PRICE_QTY" type="xs:float" nillable="true" minOccurs="0"/>
    <xs:element name="CUSTOMER_PART_NO" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="4000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CUSTOMER_PART_DESC" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="4000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="ORDER_LINE_CHARACTERSTICS" nillable="true" minOccurs="0">
    <xs:complexType>
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
    <xs:element name="CHARACTERISTIC_ITEM">
    <xs:complexType>
    <xs:choice minOccurs="0" maxOccurs="6">
    <xs:element name="CHARACTERISTIC_ID" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="CHARACTERISTIC_VALUE" nillable="true" minOccurs="0">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="2000"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:all>
    </xs:complexType>
    </xs:element>
    </xs:schema>

    Hi Sourashree,
    Thank you for the response and ideas you have given me so far. I can get the fetch the data from the data source without any problem. That is I do the following,
    1.     New Report
    2.     From Create New Connection-> XML
    3.     Provide the u201CLocal XML Fileu201D and have u201CSpecify Schema Fileu201D checked -> Next
    4.     Provide the u201CLocal Schema Fileu201D  -> Finish
    Then I can see the following under XML
    + CUSTOMER_ORDER_CONF_REP_REQUEST
            CUSTOMER_ORDER_CONF_REP_REQUEST
         CUSTOMER_ORDER_CONF_REP_REQUEST/CUSTOMER_ORDER_CONF_REP
         CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES
         CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE
         CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE/ORDER_LINE_CHARACTERSTICS
         CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE/ORDER_LINE_CHARACTERSTICS/CHARACTERSTIC_ITEM
    And from here if I add the following three I can get all the fields I need to the report
         CUSTOMER_ORDER_CONF_REP_REQUEST/CUSTOMER_ORDER_CONF_REP
         CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE
         CUSTOMER_ORDER_CONF_REP_REQUEST/ CUSTOMER_ORDER_CONF_REP/ORDER_LINES/ORDER_LINE/ORDER_LINE_CHARACTERSTICS/CHARACTERSTIC_ITEM
    Then I come to the Linking section. Here I canu2019t link anything. There is a common field called u201CInternal_IDu201D but I canu2019t link using it. So I get a message when I click Next. From here I add all the fields.
    For this point onwards only I need help. How do I group, add fields and design the layout so I can get an report output as follows.
    Date
    Order number                                   Authorized code
    Customer No
    Name
    Phone
    Fax email
    Shipping address 1                              Billing Address 1
    Shipping address 2                              Billing Address 2
    Shipping address 3                              Billing Address 3
    Shipping address 4                              Billing Address 4
    Order Line 1 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026                      LINE_NO     CUSTOMER_PART_NO          CUSTOMER_PART_DESC     SALE_UNIT_PRICE     PRICE_QTY     DISCOUNT     PRICE_TOTAL
    Characteristic details belonging to Order line 1       CHARACTERISTIC_ID 1  CHARACTERISTIC_VALUE1
                                           CHARACTERISTIC_ID 2  CHARACTERISTIC_VALUE2
                                           CHARACTERISTIC_ID 3  CHARACTERISTIC_VALUE3
    Order Line 2 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
    Characteristic details belonging to Order line 2
    Order Line 3 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
    Characteristic details belonging to Order line 3
    Order Line 4 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
    Characteristic details belonging to Order line 4
    Order Line 5 detailsu2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026u2026
    Characteristic details belonging to Order line 5
    How can I achieve this kind of a layout using the give xml and xsd? Should I use grouping if so how should I do the grouping?
    I have included the full xml and xsd in the first mail I posted but I canu2019t see it now. I can include that again if you want.
    Regards,
    Chanaka

  • Same date range values

    Hi Experts,
    I have a complex requirement for a date range functionality.
    Here is the detailed explanation:
    I have field TransactionDate field coming from an Oracle View.
    I have 2 parameters to be created on the same field and either of them can be selected but not both and both can be blank even.
    1. Transaction date on or before
    2. Transaction Date Range
    We may have values for only one prompt at any given point.
    If the user enters value for Transaction date on or before, then report should display data less than or equal to the date entered.
    If the user enters values for the Transaction Date Range, report should display date between the user entered dates.
    If none is entered report should display data for all dates.
    Now, when the Transaction Date Range has same values in Start of Range and End of Range, we need to display the record for maximum(Transaction Date) under a particular account, irrespective of the dates specified, i.e if the user enters current date in Start of Range and End of Range and there will be no records for this date. In this scenario, report should display the maximum(Transaction Date) for that account.
    I've tried all of I could, but ending up with a blank report.
    Any suggestions will be of great help. Thanks in advance.
    Naresh

    HI Naresh,
    Have you tried this,
    add 'maximum' infront of this '...... {DBVW.DT} <= CurrentDate'  condition
    if(({@FrmBalDt}(NotEqualto)" " and {@ToBalDt}(NotEqualto)"  ") and ({@FrmBalDt} = {@ToBalDt})
    and MAXIMUM({DBVW.DT} )<= CurrentDate)
    then maximum({@BalDate})
    else {@BalDate}
    if it is not working, Check where the condition is failing..
    or else try this also
    (not HasValue({?Client Id}) OR {DBVW.CLID} = {?Client Id}) and
    (not HasValue({?Base Currency Code}) OR {DBVW.BCCYCOD} = {?Base Currency Code}) and
    (not HasValue({?Account Type}) OR {DBVW.ACDES} = {?Account Type}) and
    (not HasValue({?Legal Entity Name}) OR {DBVW.CUST} = {?Legal Entity Name}) and
    (not HasValue({?Account Currency}) OR {DBVW.CCY} = {?Account Currency}) and
    (not HasValue({?Account Number}) OR {DBVW.ACNO} in {?Account Number}) and
    (not HasValue({?Account Group}) OR {DBVW.ACGRP} = {?Account Group}) and
    (not HasValue({?Show Latest Statement on or before}) OR {DBVW.DT} <= {?Show Latest Statement on or before}) and
    (if {?Activity Only} = "True" then ({DBVW.CT_CR} <>0 or {DBVW.CT_DB}0)
    ELSE if {?Activity Only} = "False" then ({DBVW.CT_CR} >=0 or {DBVW.CT_DB}>=0)) and
    (if {?Business Days Only} = "True" then (not(datepart("w",{DBVW.DT}) in 7,1) and
    (not HasValue({?Balance Date Range}) OR {@BalDate} = {?Balance Date Range}))
    else if {?Business Days Only} = "False" then ((not HasValue({?Balance Date Range})
    Up to this copy paste of your formula
    OR {@BalDate} = (if maximum({?Balance Date Range})>maximum({DBVW.DT} ) then maximum(date({DBVW.DT} )) else {?Balance Date Range}))))
    i think this may work, without your second formula
    regards,
    Salah
    Edited by: salahudheen muhammed on Sep 11, 2009 4:56 PM
    Edited by: salahudheen muhammed on Sep 11, 2009 5:02 PM

  • Using mulitple data models in a report

    Is it possible to use more than one data model in a report? For example, we have many reports that are based on several data models. There are also various sub-templates that could be associated with a report, independent of the report's main data model. I cannot see a way to join data models, leaving me with only two apparent choices:
    1) Add (replicate) all the sub-template data sources and data sets to each data model
    2) Create a mega model that has everything.
    Any ideas for a better solution? Seems like a common problem...
    Thanks,
    Armand

    Hello, and thank you for answering.
    Puting a # infront of portal30.wwctx_api.get_user didn't work
    When i did that, it resulted in this pl/sql code in the package:
    if l_column.get_value = '#portal30.wwctx_api.get_user' then
    l_style := l_row.get_style;
    l_style.set_color('blue');
    l_style.set_background_color('red');
    l_style.set_font('');
    l_style.set_bold('NO' );
    l_style.set_italic('NO');
    l_style.set_underline('NO');
    l_style.set_blink('NO');
    l_row.set_style(l_style);
    end if;
    It looks like the portal treat all that is inside the value field as text.
    I tried to come around the problem by editing the plsql code which is stored in the database. This worked, but when i tried to edit it from the portal afterwards, my changes wasn't reflected.
    Regards Per-Jarle

  • Analytic functions using window date range

    Here are my requirements:
    For each FLT# Get the MIN and MAX CRSG_DT within 2½ hours period into the same bucket for each day
    I am using Oracle 10gR2
    CREATE TABLE TST_ANAL
    FLT_NBR VARCHAR2(10),
    CRSG_DT DATE ,
    TNBR VARCHAR2(14)
    INSERT INTO TST_ANAL ( FLT_NBR, CRSG_DT, TNBR) VALUES (
    '0002947', TO_Date( '03/01/2007 07:31:57 PM', 'MM/DD/YYYY HH:MI:SS AM'), 'D2007070013438');
    INSERT INTO TST_ANAL ( FLT_NBR, CRSG_DT, TNBR) VALUES (
    '0002947', TO_Date( '03/01/2007 08:31:02 PM', 'MM/DD/YYYY HH:MI:SS AM'), 'D2007070013446');
    INSERT INTO TST_ANAL ( FLT_NBR, CRSG_DT, TNBR) VALUES (
    '0002947', TO_Date( '03/01/2007 05:30:34 PM', 'MM/DD/YYYY HH:MI:SS AM'), 'D2007070013440');
    INSERT INTO TST_ANAL ( FLT_NBR, CRSG_DT, TNBR) VALUES (
    '0002947', TO_Date( '03/01/2007 05:32:07 PM', 'MM/DD/YYYY HH:MI:SS AM'), 'D2007070013427');
    INSERT INTO TST_ANAL ( FLT_NBR, CRSG_DT, TNBR) VALUES (
    '0002947', TO_Date( '03/01/2007 05:32:40 AM', 'MM/DD/YYYY HH:MI:SS AM'), 'D2007070013433');
    INSERT INTO TST_ANAL ( FLT_NBR, CRSG_DT, TNBR) VALUES (
    '0002947', TO_Date( '03/01/2007 05:35:40 AM', 'MM/DD/YYYY HH:MI:SS AM'), 'D2007070013429');
    INSERT INTO TST_ANAL ( FLT_NBR, CRSG_DT, TNBR) VALUES (
    '0002947', TO_Date( '03/01/2007 07:32:45 AM', 'MM/DD/YYYY HH:MI:SS AM'), 'D2007070013434');
    INSERT INTO TST_ANAL ( FLT_NBR, CRSG_DT, TNBR) VALUES (
    '0002947', TO_Date( '03/01/2007 07:32:50 AM', 'MM/DD/YYYY HH:MI:SS AM'), 'D200707001323');
    COMMIT;
    The desired output:
    FLT_NBR     CRSG_DT     MIN     MAX Bucket
    2947     3/1/2007 5:32     3/1/2007 5:32     3/1/2007 7:32     1
    2947     3/1/2007 5:35     3/1/2007 5:32     3/1/2007 7:32     1
    2947     3/1/2007 7:32     3/1/2007 5:32     3/1/2007 7:32     1
    2947     3/1/2007 7:32     3/1/2007 5:32     3/1/2007 7:32     1
    2947     3/1/2007 17:30     3/1/2007 17:30     3/1/2007 19:31     2
    2947     3/1/2007 17:32     3/1/2007 17:30     3/1/2007 19:31     2
    2947     3/1/2007 19:31     3/1/2007 17:30     3/1/2007 19:31     2
    2947     3/1/2007 20:31     3/1/2007 20:31     3/1/2007 20:31     3
    I am sure an Analytic query is the optimal solution. I need help creating the query. So far, I have attempted to use the min() and then both First_value() over partition clause but I do not know how to specify the window clause using a logical date range to calculate the 2 1/2 hours.
    A lot of documentation states that I can use an expression for the range between but I cannot get one even compile
    Need Help or documentation that provide some assistance
    Thanks

    I can get to the min and max, but for bucket, row_number() doesn't take the same windowing logical offset.
    SQL> select flt_nbr,
      2         crsg_dt,
      3         min(crsg_dt) over (partition by flt_nbr,
      4                                         trunc(crsg_dt)
      5                            order by crsg_dt range between (2.5/24) preceding and (2.5/24) following) mn,
      6         max(crsg_dt) over (partition by flt_nbr,
      7                                         trunc(crsg_dt)
      8                            order by crsg_dt range between (2.5/24) preceding and (2.5/24) following) mx
      9  from tst_anal
    10  /
    FLT_NBR    CRSG_DT              MN                   MX
    0002947    01-MAR-2007 05:32:40 01-MAR-2007 05:32:40 01-MAR-2007 07:32:50
    0002947    01-MAR-2007 05:35:40 01-MAR-2007 05:32:40 01-MAR-2007 07:32:50
    0002947    01-MAR-2007 07:32:45 01-MAR-2007 05:32:40 01-MAR-2007 07:32:50
    0002947    01-MAR-2007 07:32:50 01-MAR-2007 05:32:40 01-MAR-2007 07:32:50
    0002947    01-MAR-2007 17:30:34 01-MAR-2007 17:30:34 01-MAR-2007 19:31:57
    0002947    01-MAR-2007 17:32:07 01-MAR-2007 17:30:34 01-MAR-2007 19:31:57
    0002947    01-MAR-2007 19:31:57 01-MAR-2007 17:30:34 01-MAR-2007 20:31:02
    0002947    01-MAR-2007 20:31:02 01-MAR-2007 19:31:57 01-MAR-2007 20:31:02
    8 rows selected.
    SQL> Had to user FIRST_VALUE and then calculate row_number() on that for bucket.
    SQL>
    SQL> select flt_nbr, crsg_dt, mn, mx, dense_rank() over (partition by flt_nbr,
      2                                                             trunc(crsg_dt)
      3                                                      order by rn) bucket
      4  from (select flt_nbr,
      5               crsg_dt,
      6               min(crsg_dt) over (partition by flt_nbr,
      7                                               trunc(crsg_dt)
      8                                  order by crsg_dt range between (2.5/24) preceding and (2.5/24) following) mn,
      9               max(crsg_dt) over (partition by flt_nbr,
    10                                               trunc(crsg_dt)
    11                                  order by crsg_dt range between (2.5/24) preceding and (2.5/24) following) mx,
    12               FIRST_VALUE(crsg_dt) over (partition by flt_nbr,
    13                                                       trunc(crsg_dt)
    14                                          order by crsg_dt range between (2.5/24) preceding and (2.5/24) following) rn
    15        from tst_anal)
    16  /
    FLT_NBR    CRSG_DT              MN                   MX                       BUCKET
    0002947    01-MAR-2007 05:32:40 01-MAR-2007 05:32:40 01-MAR-2007 07:32:50          1
    0002947    01-MAR-2007 05:35:40 01-MAR-2007 05:32:40 01-MAR-2007 07:32:50          1
    0002947    01-MAR-2007 07:32:45 01-MAR-2007 05:32:40 01-MAR-2007 07:32:50          1
    0002947    01-MAR-2007 07:32:50 01-MAR-2007 05:32:40 01-MAR-2007 07:32:50          1
    0002947    01-MAR-2007 17:30:34 01-MAR-2007 17:30:34 01-MAR-2007 19:31:57          2
    0002947    01-MAR-2007 17:32:07 01-MAR-2007 17:30:34 01-MAR-2007 19:31:57          2
    0002947    01-MAR-2007 19:31:57 01-MAR-2007 17:30:34 01-MAR-2007 20:31:02          2
    0002947    01-MAR-2007 20:31:02 01-MAR-2007 19:31:57 01-MAR-2007 20:31:02          3
    8 rows selected.
    SQL> Cheers
    Sarma.

  • Date ranges in sub reports

    I have a Crystal XI report pulling physician information by type of case (MS-DRG) for 6 months of discharges.  The report looks at cases and average length of stay for each physicians top 5 MS-DRGs.  I built a sub report to pull cases and average length of stay for ALL OTHER physicians for the same 5 MS-DRGs.  The goal is for each physician to be able to benchmark their average length of stay with other physicians in the same hospital.  This report will be accessed at the hospitals through Crystal Enterprise InfoView.  In InfoView, I can only see one set of filters instead of one for the main report and one for the sub report, so the end-users can't change the sub report select criteria.  Therefore, I need the parameters passed from the main report.  I can get everything to work except the discharge date range since the link creates and equal link.  We store our dates in number fields in the format YYYYMMDD.
    How can I get the sub report to run for the same date range as the main report?

    1.  I linked on the hospital ID field, but no date field because I don't want an equal join, I want a range of dates.
    2.  Yes, I want the main report and the sub report to use the same range of dates.
    3.  I didn't create additional parameters in the sub report or main report.  The only parameters being used are those created from the linking of the hospital ID. 
    Thanks.

  • Using SSRS Date Range- Data Not shown for date greater than by Analysis Services

    Hello Friends,
     I am using Date Range filters(Start and End Date) in my SSRS Report. The Problem is that if i am using the start date will be today, then the end date will be the future date by using Analysis Service as my Data Source, the report is not generated.
    I don't know why it happens? If I give the date range filters before the current date, then the report will shown.
    The problem is that the future date is not in my database. Could you please answer for this. I am struck in here,.
    Table contains : 1-7-14 ,
    2-7-14,
    3-7-14,
    If my Date Range will be 1st to 3 of 7th month, then the report shows the data.
    if my date starts with 1st of the 7th month and ends in the future, then the report will not shown the 2nd and 3rd records...
    Please teach me why?

    Your question should be posted to the appropriate MSDN forum.  This forum is for questions regarding Microsoft Certifications.

  • Specifying a Date Range for Interactive Reports

    Hi All,
    I'm currently working on Oracle Application Express 11. We have created an application with a standard reports page. On this page there are the following items:
    HTML Region 1: (Parameters)
    Start Date: (Date Picker)
    End Date: (Date Picker)
    Amount: (Displays Read-Only Amount)
    HTML Region 2: (Specify Report)
    Violation Reports (link 1)
    Correct Reports (link 2)
    Fault Reports (link 3)
    All Reports (link 4)
    I would like to know if it's possible that I could enforce the following scenarios on a user:
    If a user clicks a link without specifying a date range, then an error message is displayed prompting the user to specify Start Date & End Date.
    If a user specifies a Start Date that is outside the table's date range, then an error message is displayed prompting the user to enter a valid Start Date. For instance, if the first ever date on the database table is 17/JUL/97 then if a user specifies 16/JUL/97 as his/her Start Date then an error message will be displayed prompting the user to specify a start date from 17/JUL/97 onwards.
    Is this possible? Please advice!
    THANK YOU IN ADVANCE
    Kamo

    Hi Kamo,
    In order for the dates to be used on the reports (which is what I assume you are trying to do?), the user must submit the page to get the dates into the session. Given that, you could have Validation on your page that checks the criteria you need when the page is submitted. You could also have your Region 2 conditional on the dates not being NULL - that way, the user can not click on a link until both dates have been entered and submitted.
    Andy

  • Use parameter to set runtime xlsx report document

    Thanks in advance,
    I'm using BIRT Runtime 4.4.2 with a report design that prompts the user for a value. I want to take the parameter value and pass it to the BIRT Runtime report document name.
    For example, if in response to the parameter prompt, the value of the parameter is now "Johnson," then I want that to become the name or the xlsx document that is automatically named/rendered to the default directory - the user doesn't have to do anything after entering the parameter value and hitting enter.
    I'm aware of the various script options, but not sure where to place them in the report or what specifically to use in the report string to designate the report document name.
    Should I use the afterfactory event to grab the value of the parameter? If so, how do i pass that to something that the report string (url?) on the jsp page will understand?
    New to all of this, so as much detail (where you can point me to go, what to read) without having to use Java would be much appreciated.
    thanks again,

    OK,
    So it sounds like a non-programmer like me has some learning to do.
    First:
    When you say I need to create custom parameters page, you mean that the report parameter option within the report design will capture the information I need, but then I cannot pass that information to the portion of the configuration that specifies the name and file location, so I have to design a custom javascript page that asks for the same information (what is now the report parameter), and also ask for the desired folder location (or just assign a folder location (the location becomes less important if I can rename the report output.)
    Second: I need to use the runtime to not use the BIRT web viewer, to generate the excel output? I'm not sure what this means, but if you point me to the documentation on this, I will figure it out... Once the runtime generates the file, I need to...
    Third: I need to create a display another HTML page containing: the name of the (Excel) output file (using the inputted parameter in step 1), into the default folder location I have also added.
    Am I understanding what is needed? If so, could you point me to the corresponding documentation?
    Thanks for all of your help.

  • Obtaining data within a date range in XL Reporter

    Dear All,
    I'm currently working on BS in XL reporter.
    I was trying to extracting data in a date range, setting PER( Code >= @MthFrom Or Code <= @MthTo ) in report default tab.
    However, the result is shown as all data as of current date. E.g. Selection criteria: >=200808, <=200809, the result is shown as from Begining to 200810.
    Please kindly advise.
    Thank you.
    Regards,
    Julie
    Edited by: Julie Wan on Oct 1, 2008 1:10 PM

    Dear Gordon,
    Thank you for your reply.
    However my case is different to your given link.
    In my case, there is a result coming out, but not within the correct range i selected. It shows all instead.
    I tried to set the period range in report default tab,  in column tab of a expanding column, and in cell tab of an individual cell, but none have worked. E.g. PER( Code >= @MthFrom or Code <= @MthTo )
    Regards,
    Julie

  • Single Date Parameter, but using a date range for selection

    Post Author: fireman204
    CA Forum: Formula
    I'm fairly new to Crystal Reports, so be gentle with me.  I have a report that has 4 parameters.  The report asks for data for a specific month, the YTD data to the end of the selected month, and the same data from the previous year.  It seems there should be a way to enter a single parameter (ie., 2007-4-1), and off that date select all the data for the month, the current year to the end of that month, and then the data from the previous year for the same period.  I know this will be a formula field needed to select the data, but not sure how to get there from here.  Any ideas?  Thanks in advance!

    Post Author: SKodidine
    CA Forum: Formula
    It should be possible for you to create just one parameter to have the user input a single date and then create formulae to create the begin and end dates for the month, YTD and PYTD.  You can then use these formulae for record selection criteria.
    For example, if the user inputs a date of 2007-04-01 for the single parameter then create formulae such as:
    beginmonth
    datevar beginmonth;
    beginmonth := date(year({?My Parameter}),month({?My Parameter}),01);
    endmonth
    datevar endmonth;
    endmonth := cdLastDayOfMonth ({?My Parameter});
    To use the cdlastdayofmonth function, In the formula workshop window, click on "Repository Custom Functions" then under CRYSTAL and DATE right click on cdlastdayofmonth and click on ADD TO REPORT.  Once that is done, then create the above "endmonth" formula.  You should see this new function in your formula workshop window in the FUNCTIONS window under CUSTOM FUNCTIONS.
    beginytd
    datevar beginytd := date(year(currentdate),01,01);
    endytd
    datevar endytd;
    endytd := cdLastDayOfMonth ({?My Parameter});
    beginpytd
    datevar beginpytd := date((year(currentdate)-1),01,01);
    endpytd
    evaluateafter({@endytd});
    datevar endytd;
    datevar endpytd;
    endpytd := date(year(endytd)-1,month(endytd),day(endytd));
    In your record selection criteria, you can use the above formulae like this:
    in {@beginmonth} to {@endmonth}
    or
    in {@beginytd} to {@endytd}
    or
    in {@beginpytd} to {@endpytd};
    This is one way of doing it, perhaps others might pitch in with a more efficient way.

  • How can I use a date range in a list KPI value expression

    I am trying to create a series of status indicators for a document library in SharePoint 2010. I've made a status list for this. One of the desired KPI's is to show the percentage of documents that must be revised and approved within the next two
    months.
    I have a field which logs the next approval date (last approval date plus one year). In the standard form for the KPI I can set the value expression to return the percentage of documents to be reviewed between [Today] and a date that I fill
    in by hand (see image below). But I haven't yet been able to have the target date (two months from today) change dynamically. Is there a way to have the second date increment via a calculation here? Or do I need to use a recurring workflow to do this?
    Any help would be greatly appreciated - also if this post should be elsewhere. I am not a programmer, and just beginning to learn to make use of many of SharePoint's functions.
    Cheers,
    Russ Herald

    I'm not certain if you can use formulas here but if you can use the standard SharePoint Field Formulas you could try the following:
    For the second date could you just put: [Today]+60 to add 60 days to the current date
    Or to work with actual months you could possibly use: =DATE(YEAR([Today]),MONTH([Today])+2,DAY([Today])) to add exactly two months.
    Reference:
    https://msdn.microsoft.com/en-us/library/office/bb862071(v=office.14).aspx#sectionSection2

  • How do I apply filters or limit the rows on my report using a Date field in SQL report builder 3.0?

    I have a status of completed and a date field in the dataset. The date field is either empty or contains a date. All 2015 dates are holding dates.
    So how can I limit the report to only pull completed status with an empty date or a holding date?
    I have not been able to set an OR option on a date field filter and if I add two filters on the date column one for empty one for > 12/31/2014 then it treats it as an "and" and pulls nothing from the list I have in sharepoint.
    any help will be appreciated.

    Hi MB,
    In Reporting Services, the relationship of  filters is “And”, and there is no option to change the relationship from “And” to “Or”. While we can use “or” operator within the expression to create one filter to integrated all filters to work around this
    issue.
    We can add a filter as follows in the dataset to limit the rows in your report:
    Expression: =Fields!date.Value is nothing or Fields!date.Value>"12/31/2014"    Type: Boolean
    Operator: =
    Value: true
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support

Maybe you are looking for

  • Software Component Vector in Modification Adjustment Transport

    Hello all, We are in the middle of a support pack project for our SRM system, and I've run into a snag as I prepare to move them into QAS.  We've had this system for many years, and when DEV was originally installed in 2000 it was as a B2B 2.0a syste

  • Finder window refresh

    My only problem so far with Leopard is that finder windows don't refresh unless you go back and then return to the folder. Surely this could be fixed with a simple solution?

  • Direct iPod to iPad connection

    I've been using an iPod and a portable PC in my travels on my bike. I used the PC to change my playlists which can be controlled through my bike's dashboard and handlebar control. Now I've bought an iPad for its ease of use and better form factor in

  • Css inconsistencies

    im using a css i made to create rollovers on text. i found that inorder for it to apply i had to put the css on the word (style doesnt appear to change tho) and then put the link on the word. once the link is on the css appears on the word. i ddi thi

  • Radial Filter effect not exported to Photoshop, why?

    Suddenly while working on may images in LR5, doing all the usual with Development module I've realised that Radial filter effect is not being exported to CS5; all others ark: healing, spotting, grad filter, and brushes are ok. is it me or there is so