Jump to content

Suppress FP Expression resource


Recommended Posts

I am trying to suppress a FP Expression image, but can't get it working with the following OnRecordStart script because the SetGraphic function only seems to work with graphic resources. The error message says that a FP Expression resource is not a graphic resource:


var boyframe = FindGraphicFrame("shirt");

var girlframe = FindGraphicFrame("tattoo");


if (Field("gender") == "m")



boyframe.suppress = false;

girlframe.suppress = true;





girlframe.suppress = false;

boyframe.suppress = true;



Is there another function? I can't find it.

Any idea is very welcome.

Link to comment
Share on other sites

While I'm not familiar with FP Expression, I do know that if you don't have the graphic linked as Resource your code will not work.


Are "shirt" and "tattoo" field names in your data file that reference the entire file name of the image you're wanting to bring in? If so, CreateResource may be the solution you're searching for:



Link to comment
Share on other sites

Oh, okay. I may be over my head with this FP Expression dilemma but my last ditched effort would be to try:



Or, could you not apply the rule to the graphic frame and then just suppress it with the OnRecordStart rule?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...