Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Query Builder - Where Clause

edited February 2004 in General
I am stumped on something to do with the Report Builder Query Designer. I
would greatly appreciate any help.

Suppose the following sample table (Items):

ItemName, varchar
ItemColor, varchar
ItemRenewalDate, DateTime
ItemMiles, numeric

I need to extract records where the ItemRenewalDate is less than 2/1/2004 or
the ItemMiles is greater than 5000.
This is easy enough to do with SQL. For example:

select * from Items where ItemRenewalDate<'2/1/2004' or ItemMiles>5000
order by ItemName

My problem is this. I cannot see a way to do this with the Report Builder
Query Designer. I do not see anyway to accommodate the 'or' part of the
where clause. Does anyone have any suggestions or solution?

This is an over simplified example of a more complex problem I have in
several applications of the Report Builder. Surely I am missing something
as RB is so powerful in every other way. I know I can do this by building
the query in code and using it as the pipeline. However, that does not
afford the end user the flexibility for joins with other tables and full
report customization.

Thanks,
Bob

Comments

  • edited February 2004
    Hi Bob,

    It is possible to add an OR in the query designer using the "Search" tab.
    Simply double click a search field to move it to the lower pane and set its
    search value. Then right click over the newly added value and select
    "Insert OR" from the popup menu. You can then move this OR up or down your
    search list with the arrows on the right.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2004
    I knew there had to be a way and I was overlooking something simple.

    Thanks,
    Bob Tucker

This discussion has been closed.