I’m using Auto Print in a Standard Directive to print Bartender Labels. The amount of labels to print is to be inputted by the user. If I set the value to a constant in the Auto Print widget, it works perfectly. Now I’m trying to use the dynamic option and use callcontextbpmdata.Number01 being set in a BPMdataform and it only prints one label regardless of the value I input. I have a message box that tells me the value of the field is being set but for some reason Auto Print just ignores it and only prints the one label… Any ideas? I’m sure there are other ways to go about this but seems like this should work.
You could make an alternate label whose BAQ joins a table that that causes multiple records to be created for each label. The BPM would think its printing just one label, but there’d be multiple identical records, thus making several labels.
I did it by making a UD table with Key1 values of 1, 2, 3, …, 99, 100. Then the BAQ for the report has a subquery 2 on that UD table with the table criteria Key1 <= @labelCount. Then join subquery2 to the main one and you’ll get multiple copies per original record.
There’s a way to do it without needing the UD table, but it escapes me.
If I had to guess, it’s because the callcontextbpmdata table isn’t part of the GenInv report and can’t use the value. @klincecum this is how i had it setup, I’m setting callcontextbpmdata.Number01 in a pre processing bpm in another method. The Custom code block just pops up to make sure the value is being set.
Another way around this I found is to loop the auto print widget and subtract 1 from the variable and have a condition block to check if it’s > 0. Not ideal but works. However, I’m probably just gonna create the csv in a custom code block and be done with it.
Thank you for both of your responses!
So, I ran into this exact same issue on the GenInv report style, in attempt to auto print bartender labels via data directive.
Here is how I was able to handle it for GenInv and GenRcpt respectively:
In the updatable dashboard / UBAQ I have calc field for “Print (T/F)” checkbox and “Num Labels” integer field, user checks the print box then sets the Number of Labels. I then take that calc field Num Labels value and:
For GenInv: I have a UD field called NumLabels_c on the PartTran table. I set this, then use this field as the dynamic Qty in the Auto Print widget. Works like a charm.
For GenRcpt: I set the base NumLabels field on RcvDtl to the number entered by the user when the update occurs from the UBAQ/dashboard, then I use the RcvDtl.NumLabels field as the dynamic qty in the auto print widget, works like a charm!