Developer Guide to having Setup Time and Run Time Barcode Images in Custom Production Reports for Shop Floor Insight

Skip to main content

Developer Guide to having Setup Time and Run Time Barcode Images in Custom Production Reports for Shop Floor Insight

You are here:

This article is intended for developers, and includes guidance when they are given the task to create a custom Production Order report for Shop Floor Insight.

A custom Work Center Task List, Machine Center Task List, or production report can include Shop Floor Insight barcodes for recording setup and run time against production operations.

The stock production order report 23044108 “SFI Production Order”, will generate a code 39 barcode as an image, and then then render the resulting values as barcode images.  It shows ‘setup time’ and ‘runtime’ barcodes.

Example barcode reports in the 50xxx range can be found here: https://dev.azure.com/InsightWorks/External%20Examples/_git/Shop%20Floor%20Insight%20Examples?path=/ShopFloorInsightExampleReports

Barcode Format

A Shop Floor Insight barcode is a specially formatted fixed character barcodes that references a barcode lookup table in Business Central, which in turn includes all of the information needed to clock into a specific operation on a specific production order line, on a specific production order.  You do not need multiple scans with Shop Floor Insight.

With the barcode format shown below, the scanner returns:

Time type Example scanned value
Setup time /N000001D0%
Run time /O000001D0%

The barcode breaks down as follows:

Part Meaning
/ Opening delimiter
N or O N identifies setup time; O identifies run time
000001D0 Eight-character hexadecimal ID from SFI Barcode Entry.MapID
% Closing delimiter

The hexadecimal value identifies a barcode entry that maps to the Production Order No., Production Order Line No., and Operation No. It does not directly encode those fields or a time duration.

For the same production order, line, and operation, setup and run barcodes use the same hexadecimal ID. Only the N or O identifier changes.

The delimiters come from Barcode Format on Shop Floor Setup. Use the methods below so the report respects the configured format.

Generate the Barcode Text and Images

The standard production report uses Code 39 (3 of 9) barcode images. Shop Floor Insight itself reads the text returned by the scanner; another symbology can work if the scanner supports it and returns the correct text.

The following example follows the standard report’s image-generation approach for current Business Central versions. Add these variables and procedures to your custom report:

var
    BarcodeMgmt: Codeunit "SFI Barcode Mgmt";
    BarcodeGenerator: Codeunit "IWX Barcode Generation";
    SetupBarcodeImage: Record "SFI TempBlob" temporary;
    RunBarcodeImage: Record "SFI TempBlob" temporary;
    SetupBarcodeText: Text;
    RunBarcodeText: Text;

local procedure BuildOperationBarcodes(
    ProdOrderNo: Code[20];
    ProdOrderLineNo: Integer;
    OperationNo: Code[20])
begin
    SetupBarcodeText := BarcodeMgmt.getRoutingSetupBarcode(
        ProdOrderNo, ProdOrderLineNo, OperationNo, true);

    RunBarcodeText := BarcodeMgmt.getRoutingBarcode(
        ProdOrderNo, ProdOrderLineNo, OperationNo, true);

    BuildBarcodeImage(SetupBarcodeText, SetupBarcodeImage);
    BuildBarcodeImage(RunBarcodeText, RunBarcodeImage);
end;

local procedure BuildBarcodeImage(
    BarcodeText: Text;
    var BarcodeImage: Record "SFI TempBlob" temporary)
var
    TempBlob: Codeunit "Temp Blob";
begin
    Clear(BarcodeImage);
    Clear(TempBlob);

    BarcodeGenerator.Get3of9Barcode(
        TempBlob, '*' + BarcodeText + '*', 170, 20);

    BarcodeImage.WriteToTempBlob(TempBlob);
end;

Call BuildOperationBarcodes for each operation before its report dataset row is output. Supply the actual Production Order Line No., in addition to the production order and operation numbers.

The barcode-management methods create or reuse the required SFI Barcode Entry and return its formatted barcode text. Do not invent or hard-code the hexadecimal ID.

The * characters passed to Get3of9Barcode are Code 39 start/stop markers. For example:

  • Image-generation input: */N000001D0%*
  • Expected scanner output: /N000001D0%

The dimensions 170, 20 match the standard report’s generation parameters. Check readability at the final printed size.

Display the Images in an RDLC Layout

Add these columns to the report dataitem that outputs each operation:

column(SetupBarcodeBlob; SetupBarcodeImage.Blob)
{
}
column(RunBarcodeBlob; RunBarcodeImage.Blob)
{
}
column(SetupBarcodeValue; SetupBarcodeText)
{
}
column(RunBarcodeValue; RunBarcodeText)
{
}

Add two Image controls inside the operation’s repeating row in the RDLC layout:

Property Setup image Run image
Source Database Database
Value =Fields!SetupBarcodeBlob.Value =Fields!RunBarcodeBlob.Value
MIMEType image/bmp image/bmp
Sizing FitProportional FitProportional

Label the images Setup Time and Run Time. The optional text columns can be displayed beneath the images to help troubleshoot scans.

This approach embeds barcode images in the report and does not require a barcode font.

Verify the Printed Report

Print a sample and scan both barcodes into a text editor. Confirm the complete values include /, N or O, eight hexadecimal characters, and %, without the * markers.

Then test the barcodes in the Shop Floor Insight scanning interface against the intended operation. Clock-on behavior follows the applicable Shop Floor Insight configuration.

Use Shop Floor Barcode Entries to inspect the corresponding mapping. For example, /N000001D1% and /O000001D0% reference different entries; they are not the standard setup/run pair for one identical operation mapping.

Related Articles

Printing Barcodes in Shop Floor Insight — standard production traveler and separate setup/run barcodes:
https://kb.dmsiworks.com/knowledge-base/printing-barcodes-in-shop-floor-insight/

Developer Guide to Custom Shop Floor Insight Badges — related barcode concepts, image generation, symbology, and scanner troubleshooting; its examples concern employee badges:
https://kb.dmsiworks.com/knowledge-base/developer-guide-to-custom-shop-floor-insight-badges-and-printing-shop-floor-insight-employee-badges-outside-of-business-central/

Downloadable Example barcode reports in the 50xxx range (these are copies of the product reports) https://dev.azure.com/InsightWorks/External%20Examples/_git/Shop%20Floor%20Insight%20Examples?path=/ShopFloorInsightExampleReports

Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
5
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.
Need help?

Leave A Comment

Table of Contents
Go to Top