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

How to...

edited December 2006 in General
I want to set the following search criteria:

Year(DocDate) = Year(GetDate())
Month(DocDate) = Month(GetDate())-1

It seems that the 2nd part behind the '=' is parsed as a string so SQL will
look like:

SELECT .... WHERE ... Year(DocDate) = 'Year(GetDate())' ... etc

how can I solve this?

JeePee

Comments

  • edited December 2006
    Hi JeePee,

    The Query Designer in ReportBuilder currently does not support the use of
    SQL functions in the Where clause. You will need to edit the SQL manually
    in order to get the effect you are after.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited December 2006
    Hi Nico,

    This means that when I go into manually SQL-mode I'll miss the support of
    setting end-user selection-criteria dialogs within my reports?

    --
    Regards,

    JeePee

  • edited December 2006
    Hi JeePee,

    One option would be to use the TdaSQLBuilder object to manually enter the
    current date into the Where clause of the query. This way, you would not
    need to remove any of the existing autosearch criteria or linking. Take a
    look at the TdaSQLBuilder topic in RBuilder help for more information and
    code examples.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.