Can someone explain the technicals of this approach.
Where is the sql statement going in the report? Are there specific scenarios where this does or doesn't work?
I had previously believed that the drivers used in CR were specifically read only on the selected tables. So this is a new thing for me.
It has set me thinking as to why I thought what I thought and I'm fairly sure it was based on 'authoritative' comments in a particular CR specialist site. There is an extremely remote ((:-)) possibility that I have misinterpreted such comments and I might have a search to see if I can find it again, although it will be quite a long time ago that I saw it.
So the situation is that if I can write the code in SQL Server Management Studio I should be able to run it in a CR 'Add Command' box - provided it returns something.
GJParker
Yes as I understand it that is correct, the only difficult comes when you want to include paramter values in the command as some DB's / connections require you to add the single quotes for string parameters and some will add handle the SQL without them.
I haven't found the document that sent me off this way, but I can now recall that the situation was a bit different to this in that there was a potential requirement to update the database based on the results calculated in the report. Clearly that is not what we are talking about here and unfortunately I have, over time, mistakenly generalised that experience to a 'no updates' position.
I have never had anyone else ask me for a database update feature with a report so I've never had to review my thinking.
It has set me thinking as to why I thought what I thought and I'm fairly sure it was based on 'authoritative' comments in a particular CR specialist site. There is an extremely remote ((:-)) possibility that I have misinterpreted such comments and I might have a search to see if I can find it again, although it will be quite a long time ago that I saw it.
So the situation is that if I can write the code in SQL Server Management Studio I should be able to run it in a CR 'Add Command' box - provided it returns something.