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

AllowEditSQL

edited June 2003 in RAP
If I change at runtime the SQL statement manually, and in source code I
want to know is this SQL statement manually written or not, I use the
ppDesigner.DataSettings.AllowEditSQL property. But the problem is, that this
property returns me every time False, and than when the report SQL is
manually written.
What I should do, to recognize between the manually changed SQLs and not
changed?

Greetings,
Jerinic Stasa

Comments

  • edited June 2003
    You'll have to extract the TdaSQL object and check its AllowEditSQL
    property. You'll have to do this in a pass through function. Pass the report
    in the function as the only in parameter. Then return true or false in the
    second parameter list whcih is the result.

    There are examples of creating RAP pass through functions in the tutorials,
    demos and RAP.hlp file.

    Here is an example of extracting the TdaSQL object. There is one of these
    for every dataview in the TdaDatamodule.

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

    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited June 2003
    I think, Stasa wants to describe this:

    - create a new report and set the AlloWeditSQL to true
    - edit the SQL
    - save the report to a file
    - load the report
    --> AllowEditSQL is FALSE
    HTH
    Bernd

    report
    tutorials,
  • edited June 2003
    There is a Designer.DataSettings property that is called AllowEditSQL. If
    you edit the SQL of a dataview, then the dataview's SQL object has its
    EditSQLAsText property set to true at that point. AllowEditSQL is a setting
    on the designer's DataSettings. The Datasettings property on the designer
    should not change when you load a report template. I tests here using RB
    7.02 it doesn't change when you load a template, even when I follow the
    steps described. What setps do I need to take exactly, to get this situation
    where the AllowEditSQL is reset?


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited June 2003
    What I did not mention, was: This happens at runtime only. Teh report is
    loaded at runtime and looses the AllowEditSQL-flag.

    Bernd

  • edited June 2003
    The designer datasettings shouldn't change because a report template gets
    loaded. Can you send an example to support@digital-metaphors.com along with
    the steps needed to get the error.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.