Does anyone out there have experience with setting complex filters on reports sent via script to Doc Agent? We have a pretty straight-forward script which sets a complex filter based on some if/then/else logic after DAS has refreshed the document. It keeps failing in DAS…‘Cannot Refresh Document’. Is there some limitation here I’m not aware of?
We used the very same script with the “addcomplexfilter” function and got the very same response from the DAS. It seemed like certain combination
of functions would not execute at the DAS.We are looking for more information on this topic…
Does anyone out there have experience with setting complex filters on reports sent via script to Doc Agent? We have a pretty straight-forward script which sets a complex filter based on some if/then/else logic after DAS has refreshed the document. It keeps failing in DAS…‘Cannot Refresh Document’. Is there some limitation here I’m not aware of?
Can you set the complex filter and run it successfully in BusObj? I have run into problems setting the complex filter in the past. It usually comes down to the placement of the quotes that BusObj expects. Here is some code that works for me:
Dim strVarInReport as String
Dim strFilterCondition as String
Dim strEnter ’ this holds the actual value(s) for the condition complex condition
StrEnter = “12FG42”
'Build the complex filter to apply
strVarInReport = “Wholesaler Number”
'complicated for a filter on a character type object strFilterCondition = “==”"" strFilterCondition = strFilterCondition & strEnter strFilterCondition = strFilterCondition & “”"" 'msgbox strFilterCondition
FYI, this problem was resolved by using
application.documents.item(“mydoc”).addcomplexfilter instead of activereport.addcomplexfilter in the script. Explicitly naming the report/document fixed the problem. Thanks to Andy Earthal at BO for his suggestion.