MS SQL REPORTING 2000 - Changing Commandtext during runtime
Posted on 2006-11-25
I need to change the commandtext of a report during runtime because my parameters are too complex. The query to be sent to the report is the result of a front end (ASP.neT) query builder which has atleast 10 selection criteria.
sql="select <fieldlist> from view where 1=1"
sqla=" and f1 in (fx1,fx2,fx3....)"
sqlb=" and f2 in(fy1,fy2,fy3...)"
sql=sql & sqla & sqlb
and so on.
One way could be to getreportdefnition for the report, save it as an XML file, modify the command text on the file and then createreport back on the report server.
IS there any other way I could achieve this?