Using Report Variable in Filter

Hi


We have defined some report variables (e.g. CompanyCode) and I would like to filter one of my inbound datasets using this value. Something like:

ClientCompany=CompanyCode

Where client company is a field on the dataset and companywide is my report variable.

If I say ClientCompany=CompanyCode it looks for a field on a dataset called CompanyCode and barfs, likewise if I use #CompanyCode.

Is this possible, if so what is the correct usage too make it work?

thanks

It should work as in any other place. Just write

ClientCompany=<#CompanyCode>

I've just tested in the "20.Range Reports" demo: I changed the filter in the config sheet to be Discontinued=<#IsDiscontinued>

And then added the report variable:
ordersReport.SetValue("IsDiscontinued", false);

And it is working as expected. What error do you see when using <#CompanyCode> syntax?

Adrian


Not sure what was happening last night but this morning the following works:

CompanyCode='<#CompanyCode>'

The quotes matter as is a string and without them it looks for a data column 'C01' when the code is 'C01'.

Thanks for your help