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

MagicSQLText

edited October 2003 in DADE
Can Anyone Help

I want to modify my sql on the fly so have done the following code

{*** Preview The Report ***}
frmMain.repWork.Template.FileName := sRepDir + sPath + sReport;
frmMain.repWork.Template.LoadFromFile;

GetSQLObject(frmMain.repWork,lSQL);

If sCriteria <> '' Then
{*** Inserts Criteria Before Any Group By's ***}
{*** Or Order By's ***}
InsertCriteria(lSQL.MagicSQLText,sCriteria);
{EnDIF}

ShowMessage(lSQL.MagicSQLText.Text);

However this works for one of my reports, but my other report it is not
putting in my criteria on the report I have tryed using
lSQL.EditSQLAsText this works and fixes the problem however the report
no longer prints any of the variables.

Tryed using the example but there does not seem to be any code showing
how to insert Where/And criteria not interested in group by's, order
by's sorry new to RBuilder and still learning I may just be missing
something.

Can Anyone help, Thankyou

Lee

Comments

  • edited October 2003

    Try downloading the following example:

    http://www.digital-metaphors.com/tips/AddSearchCriteria.zip

    --
    Nard Moseley
    Digital Metaphors
    http://www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited November 2003
    Thanks for the reply, however looked though the developer quide the
    help file and having no luck what so ever in finding
    tdaCriteriaOperatorType and the options you can use, the example code
    you have suggested uses dacoLike are there others like Where & And what
    are they and where is this documented for future reference.

    Cheers
    Lee Bambury



  • edited November 2003
    Sorry not where & and but equals, less than, greater than etc.

    Lee


  • edited November 2003

    The TdaSQL object was designed to be an internal implementation class. It is
    not currently documented. This is something we will need to add to a future
    release. For now, consult the source code, daSQL.pas.

    --
    Nard Moseley
    Digital Metaphors
    http://www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.