================================================================================
Query with filter elements in dataitem
================================================================================

query 1307 "CF Forecast Entry Dimensions"
{
    QueryType = Normal;
    Caption = 'Cash Flow Forecast Entry Dimensions';

    elements
    {
        dataitem(Cash_Flow_Forecast_Entry; "Cash Flow Forecast Entry")
        {
            filter(Cash_Flow_Forecast_No; "Cash Flow Forecast No.")
            {
            }
            filter(Cash_Flow_Date; "Cash Flow Date")
            {
            }
            column(Sum_Amount_LCY; "Amount (LCY)")
            {
                Method = Sum;
            }
        }
    }
}

--------------------------------------------------------------------------------

(source_file
  (query_declaration
    (query_keyword)
    object_id: (integer)
    object_name: (quoted_identifier)
    (property
      name: (property_name)
      value: (identifier))
    (property
      name: (property_name)
      value: (string_literal))
    (elements_section
      (elements_keyword)
      (query_dataitem
        (dataitem_keyword)
        name: (identifier)
        table_name: (quoted_identifier)
        (query_filter
          (filter_keyword)
          name: (identifier)
          field_name: (quoted_identifier))
        (query_filter
          (filter_keyword)
          name: (identifier)
          field_name: (quoted_identifier))
        (query_column
          (column_keyword)
          name: (identifier)
          field_name: (quoted_identifier)
          (property
            name: (property_name)
            value: (identifier)))))))

================================================================================
Query with filter elements and caption
================================================================================

query 100 "Item Sales by Customer"
{
    elements
    {
        dataitem(Item; "Item")
        {
            dataitem(ItemLedgerEntry; "Item Ledger Entry")
            {
                DataItemLink = "Item No." = Item."No.";
                
                filter(Posting_Date; "Posting Date")
                {
                    Caption = 'Date Filter';
                }
                
                filter(Entry_Type; "Entry Type")
                {
                    Caption = 'Type Filter';
                }
                
                column(Item_No; "Item No.")
                {
                }
                
                column(Quantity; Quantity)
                {
                    Method = Sum;
                }
            }
        }
    }
}

--------------------------------------------------------------------------------

(source_file
  (query_declaration
    (query_keyword)
    object_id: (integer)
    object_name: (quoted_identifier)
    (elements_section
      (elements_keyword)
      (query_dataitem
        (dataitem_keyword)
        name: (identifier)
        table_name: (quoted_identifier)
        (query_dataitem
          (dataitem_keyword)
          name: (identifier)
          table_name: (quoted_identifier)
          (property
            name: (property_name)
            value: (property_expression
              (comparison_expression
                left: (quoted_identifier)
                operator: (comparison_operator)
                right: (member_expression
                  object: (identifier)
                  member: (quoted_identifier)))))
          (query_filter
            (filter_keyword)
            name: (identifier)
            field_name: (quoted_identifier)
            (property
              name: (property_name)
              value: (string_literal)))
          (query_filter
            (filter_keyword)
            name: (identifier)
            field_name: (quoted_identifier)
            (property
              name: (property_name)
              value: (string_literal)))
          (query_column
            (column_keyword)
            name: (identifier)
            field_name: (quoted_identifier))
          (query_column
            (column_keyword)
            name: (identifier)
            field_name: (identifier)
            (property
              name: (property_name)
              value: (identifier))))))))
