We are currently using SQR reports and we would like to upgrade it to Crystal reports 2011. Is it possible to convert the SQR query for usage in the Crystal?
2 Answers
To my knowledge there is no "converter" from SQR to Crystal. SQR is a much more powerful tool than Crystal and I would be surprised if there was a converter. With that being said, you can use any SQL query with SQR, so that leads me to believe that you could use an SQR query with Crystal. There may be some slight differences in syntax, but if you understand what the query does it shouldn't be too hard.
Hope that helps,
Chris

- 2,710
- 1
- 17
- 25
-
Thanks, Could you share any guide detailing the SQR and Crystal integration. – guitarist Oct 24 '13 at 04:02
-
@guitarist: I have never done it myself. I'm sure there is some knowledge available on the net that you can find. – campagnolo_1 Oct 25 '13 at 12:24
You can easily parse *.sqr
file and filter out DML/DDL and SELECT statements for reuse in Crystal reports.
For this you can use any scripting language supporting regular expressions.
In Python it would look like this:
For SELECTs:
selects=re.findall(r'begin-select(.*)end-select',sqr_txt, re.MULTILINE|re.DOTALL)
For DMLs/DDLs:
dmls=re.findall(r'begin-sql(.*)end-sql',sqr_txt, re.MULTILINE|re.DOTALL)
After running Python script you can use filtered SQL in Crystal Reports.
This is exact approach I used when I wrote PySQR