我需要重新拼接SQL语句,主要是为了改变WHERE语句,
然后按照下面的代码:
- C# code
presentation_str="style(type=crosstab)"dwsyntax_str=sqlca.syntaxfromsql(new_select,presentation_str,errors)messagebox("dwsyntax_str",dwsyntax_str)if len(errors)>0 then messagebox("err","syntaxfromsql caused these errors:"+errors) returnend ifdw_1.create(dwsyntax_str,errors)if len(errors)>0 then messagebox("caution","create cause these errors:"+errors) returnend ifdw_1.settransobject(sqlca)dw_1.retrieve()
我明明写了类型为CROSSTAB,可是却没有用,得到的还是GRID类型的报表,
请问是怎么回事啊?怎么解决呢?
------解决方案--------------------
如果仅是为了改变where,直接创建好crosstab数据窗口,在setsqlselect即可
------解决方案--------------------
oldsql = getsqlselect()
newsql = oldsql+where
setsqlselect(newsql)