Jump to content

Suppressing Template For Blank Records


dreimer

Recommended Posts

Is there a way to suppress my artwork when the records are blank? This is for imposition purposes where I want to have blank records and no artwork for some positions in the imposed PDF. I tried this rule in the OnJobStart and it validates but the artwork still gets put it. Validating the rule looks correct although it says "ignored at composition time"

 

if (Field("Print Qty") != "")
{
  return FusionPro.Composition.composeThisRecord = true;
}
else
{
  return FusionPro.Composition.composeThisRecord = false;
}

 

Is what I am trying possible?

Edited by dreimer
Link to comment
Share on other sites

Is there a way to suppress my artwork when the records are blank? This is for imposition purposes where I want to have blank records and no artwork for some positions in the imposed PDF. I tried this rule in the OnJobStart

There's your problem. OnJobStart is the wrong place to do this. The whole concept of "this record" doesn't mean anything to the job as a whole. You need to move the logic setting FusionPro.Composition.composeThisRecord to OnRecordStart, where it actually does something specific to each record.

and it validates but the artwork still gets put it. Validating the rule looks correct although it says "ignored at composition time"

 

if (Field("Print Qty") != "")
{
  [color="red"]return[/color] FusionPro.Composition.composeThisRecord = true;
}
else
{
  [color="red"]return [/color]FusionPro.Composition.composeThisRecord = false;
}

Also, get rid of the "return" keywords in there. You only need to set the FusionPro.Composition.composeThisRecord property; you don't need to return it as well, and depending on what else is in the rule, the return statement could break any other logic below it, as "return" basically stops execution of any code in the rule and returns control to the caller. In other words, even though the value returned may not have any effect on the composition, the return statement itself definitely could.

Link to comment
Share on other sites

Well that makes sense.

 

So I tried your rules and the results are not what I wanted. The records get stacked up if the Print qty is empty. I want it to leave those positions blank when that field is empty. So say my Imposition has 7 across and 10 high. So say the first 25 records have a Print qty of 1 the next 20 have no print qty and the last 25 records have a print qty of 1. I would want the 20 positions in the imposed file blank and not stack the last 25 up to the first 25. Hope that makes sense.

 

I think Fusion Pro tries to create the least amount of pages possible when Imposing so I am not sure there is a way to do it with a rule except for the way I did it with a blank page.

Link to comment
Share on other sites

Well that makes sense.

 

So I tried your rules and the results are not what I wanted.

Well, I wasn't trying to solve the entire problem, I was just pointing out why that code in OnJobStart had no effect at all.

The records get stacked up if the Print qty is empty. I want it to leave those positions blank when that field is empty. So say my Imposition has 7 across and 10 high. So say the first 25 records have a Print qty of 1 the next 20 have no print qty and the last 25 records have a print qty of 1. I would want the 20 positions in the imposed file blank and not stack the last 25 up to the first 25. Hope that makes sense.

It's very hard to visualize this kind of stuff, at least for me. If you could collect up a sample job, with the FPI file, that might be worth a thousand words.

I think Fusion Pro tries to create the least amount of pages possible when Imposing so I am not sure there is a way to do it with a rule except for the way I did it with a blank page.

FusionPro creates exactly as many pages as you tell it to, whether it's imposing or not. (Although if you are doing imposition, FusionPro does expect that each record which is composed generates the same number of pages.) But if you skip a record completely, then there are no pages output for it. So while I don't know if I understand completely what you're trying to accomplish, I think you're right that you want a blank page for the record instead of nothing at all. In that case, you don't want to set FusionPro.Composition.composeThisRecord, you just want to set the page usage to output your blank page instead of the "actual" page. Or, possibly more simply, just have whatever rules are populating the page with content return nothing.

Link to comment
Share on other sites

Don, you could put a text or graphic frame over your entire template and fill it with white and turn it on and off in the OnRecordStart rule based on the quantity field:

 

FindTextFrame("white-text-frame").suppress = !!Field("Print Qty");

 

That being said, I think your current solution of adding an extra page to your template is a better method.

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.

Guest
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...