Expressions for Control source under reports (1 Viewer)

lrarmbruster

New member
Local time
Today, 08:46
Joined
Oct 17, 2012
Messages
6
Are there limitations to the expression you can enter in a report. I have tried entering an expression as the control source for one of my reports and it works perfectly in Access 2010. However when I sync with my SharePoint site and open it in the browser I recieve a sql error.

This is the expression I have tried to use:
=IIf(IsNull([my field])," ",String(Len([my field]),"X"))

This expression adds a space to the the report field if it is empty in the database table but if it is not empty it takes the length of the value and places an X instead of the actual value.

For instance: if the value entered is 123, it would return XXX but if the value entered was 1, it would only return 1 X

My question is, does microsoft access 2010 limit the expressions that can be entered within a control source for a report or is it sharepoint that is limiting the expression? I do not see why it would work within Access 2010 but once it is opened in SharePoint via the browser it returns an error instead of the report.
 

Beetle

Duly Registered Boozer
Local time
Today, 09:46
Joined
Apr 30, 2011
Messages
1,808
A browser is not going to be able to interpret an expression like that. You would need to replace your UI level expression with a table level data macro so that the conversion is done on the server side and the appropriate value simply returned to the report, rather than attempting to have the conversion done within the report itself.
 

Users who are viewing this thread

Top Bottom