Route print jobs to different printer based on db record 追蹤

Weston Eighmy

We are using ODBC connection for our integration and label fields.

I have an integration setup and also a btw document to provide as template, however I need for print requests to go to a different printer based on the incoming db record.

We have a field called Printer that will be the instruction for which printer to route to.

Is there any guidance available for how this can be achieved?

1 意見

Seb Atkins
評論操作 永久連結

Hi Weston,

We do something similar to send the picking labels to a particular printer based on product catagory or bin location of the product on the order,

The way we have achieved this is we have the integration looking at a "middleman" database (running on our bartender server) rather than directly at our ERP database, this is also due to not every order needing a label in our case and also saves additional strain of the ERP database.

We run an ODBC extract using Crystal Reports of the order table every minute which includes every field we will ever want on a label (we have multiple templates running on the same integration) and filter out only the orders that we require labels for.

Inside Crystal Reports you can also create custom "Formula" fields so we created two additional custom fields one called PrinterName and one called PrinterDocument, we then created a formula to decide what printer (exact printer name on the server) and document (exact file path to required document/template on the server) each record should go to it is essentially one big IF statement.

The data from this extract then get's loaded into the middleman database and the integration detects when a new record is entered into this database.

Within the integration setup there are two sections called "Document" and "Print Option Overrides" we then use a variable of %PrintDocument% in the documents and %PrinterName% in the printer override, this tells the integration to use the PrintDocument and PrinterName fields from the database that we created earlier in the crystal report.

Hope this helps,