Home General

Search rtm saved as ASCII for keywords.

edited September 2019 in General
We recently refactored our Orders table. We need a way to search our .rtms for specific keywords so we can find which of our 250+ reports need to be changed.

We created a utility to do this, but we found that the text in the rtm is broken up in a way that makes is difficult to search.

Example:

'(SELECT CustomerOrdReference, CustomerAccount, ReceivedTime, Shi' +
'ppedTime,
OrderID '

If I wanted to search for ShippedTime (in bold), our utility would fail because that string has been broken into:
Shi' +
'ppedTime
Is there a way to have the rtm save in a format that leaves the original query format alone? We didn't write the query with Shi and ppedTime on a separate line.

We're trying to do this task without writing a complicated algorithm.

Thank you

Comments

  • Hi Robert,

    RB uses standard Delphi streaming, as defined in System.Classes. I reviewed the Delphi source, the ObjectBinaryToText procedure adds the ' +'. It's hard coded, no way to get around it.

    The other approach to converting templates is to write a utility that uses TppReport to load each template. You can use TdaSQLBuilder to modify the queries programmatically. Check the RBuilder Help topic for TdaSQLBuilder for details.




    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • I looked in the documentation and TDASql is only mentioned a couple times. Could you point me to something better please?
  • Hi Robert,

    Please re-read my prior reply, 'Check the RBuilder Help topic for TdaSQLBuilder for details.' (TdaSQL is a different class).


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
Sign In or Register to comment.