Lenovo Software Help Center

Working with Binary Data in Report Services

Quick Start Guide - Binary Data
This tutorial is designed as a quick "How Do I Work With Binary Data" tutorial.  It walks through the steps necessary to upload an image to a database.  Every webNetwork 6.0 installation ships with a database called webNetwork Demo Database, so you already have the database necessary to complete this tutorial on your own system.

Setup the database table.
  1. Start Form Builder.
  2. Go to the Form Properties tab.
  3. Click Wizard.
  4. Choose Save to Database and hit Next.
  5. Choose "webNetwork Demo Database".  Enter sa as the User ID and click Next.
  6. Select Create New Table.  Enter EmployeeImages as the table name.
  7. Change the Primary Key Name to employeename and the data type to Text.
  8. Click Done.
  9. Click Create/Modify Table in the toolbar.
  10. Click Add Field.
  11. Enter employeepicture as the Field Name and choose Binary as the Type of Data.  Hit Save then Done.
  12. Click Add Field.
  13. Enter originalfilename as the Field Name and choose Text as the Type of Data.  Hit Save then Done.
  14. Click Add Field.
  15. Enter contenttype as the Field Name and choose Text as the Type of Data.  Hit Save then Done.
  16. Hit Done to close the Table Manager.
Create the form frontend
  1. Click on the Form Designer tab.
  2. Click New Form Frontend in the toolbar.
  3. Choose Orange as the template.
  4. Click the Form Fields tab.
  5. Choose Text Field for employeename.
  6. Choose File Upload for employeepicture.
  7. Do not include contenttype or originalfilename on the form.
  8. Click Save.
  9. Save the form and call it EmployeePictures (this name will be referenced in future tutorials).
Configure the required field (employeename)
  1. Right click the text field for employeename and choose Data Behavior.
  2. Click the Validation tab.
  3. Check the box for Required.
  4. Click Save.
Configure the file upload field
  1. Right click the yellow File Upload field and choose Data Behavior.
  2. Change Upload To to Database.
  3. Enter jpg,gif,png in the Allowed File Extensions.  This states that we will allow those 3 file types to be uploaded.
  4. Click the Advanced tab.
  5. For Org File Name, choose originalfilename.  That means the name of the file that was uploaded will be stored in this field.
  6. For Org Content Type, choose contenttype.  The content type for the file that was uploaded will be stored in this field.  This is necessary for a field where mutliple file extensions are allowed, and needed when we try to view it later.
  7. Click Save.
  8. Save the form.
Testing the form
  1. Run the form by clicking Run Form in the toolbar.
  2. Enter a name and browse and choose an image.
  3. Click Save Data and the data will be saved, and the binary image will be stored in the database.


This tutorial is the second of a two-part quick start guide to working with binary data.  This is a quick, no-frills walk-through of the how to setup a basic form/report with binary data.  In the previous tutorial, a database table and form were created to hold allow uploading of an employee picture.  In this tutorial, the images will be displayed in a report.


Create a Query
  1. Open Report Builder.
  2. Click the Switch to Query Builder Mode tab.
  3. Choose webNetwork Demo Database, enter sa as the User ID and hit Connect.
  4. Click View/Add Table(s) in the toolbar.
  5. Expand all the Default + signs and click TABLE.
  6. Check the box next to EmployeeImages.  Note: If this table does not appear, then you need to start with part 1 of this tutorial found in a previous post on this blog.
  7. Click Add to Query.
  8. Add all of the fields to the query by clicking on their names.
Create the Report Frontend
  1. Click the Switch to Graphical Designer Mode tab.
  2. Choose New Report With Template from the toolbar.  This option is found under the New Report dropdown.
  3. Change the Style to Orange and click Save.
  4. Right click in the originalfilename column and choose Delete Column.
  5. Right click in the contenttype column and choose Delete Column.
Configure the Binary Display
  1. Right click the yellow employeepicture image and choose Edit Display Properties.
  2. Click the Binary tab.
  3. Choose the radio button for Display As Image.
  4. Choose DB for File Name Src.
  5. Choose originalfilename as the File Name.
  6. Choose DB for Content Type Src.
  7. Choose contenttype for Content Type.
  8. Click Save.
Test the Report
  1. Save the report and run it.  The uploaded images will appear next to the employee names.  If you right click and save the image, the original file name will be used.



    • Related Articles

    • Error using Report Services on headless server

      When we click on the "insert database field" icon in Report Builder, we see a red X next to the field name. The following error is also generated:  java.lang.NoClassDefFoundError  at java.lang.Class.forName0(Native Method)  at ...
    • Analytics Link report not working after upgrading to 6.3.0.x

      Problem:  Analytics Link reports not loading after upgrading to 6.3.0.x Cause:  We discovered in about version 6.3.0.127 that the ActionID that define the events for the Audit database were changed thus causing the Link Report in the Analytics tile ...
    • Javascript to help control refreshing data in a different frame.

      Javascript to help control refreshing data in a different frame. parent.frames['frame name here'].location.reload();   Refresh a specific frame on a split pane report after an add / update / delete on a form.  Example for this will be you may have a ...
    • Support and Professional Services

      Support is now included with an up to date UW product maintenance renewal.   The following items, however, are not included and still require purchasing Professional Services. Installation of production Unified Workspace system Installation of ...
    • Keystroke and Application History Data

      Problem: How much data does the LanSchool student store for keystroke and application history? Cause: By design Prerequisite(s): LanSchool Teacher LanSchool Student Solution(s): The size of the keystroke file which saves the information can grow to 1 ...
    • Popular Articles

    • Can a Teacher see Students outside of school?

      This content has moved! Visit the new LanSchool Classic Help Desk It looks like you may be interested in LanSchool Classic General FAQ.
    • LanSchool Latest Release Notes

      This content has moved! Visit the new LanSchool Classic Help Desk It looks like you may be interested in LanSchool Classic Latest Release Notes.
    • How to uninstall LanSchool Student and WebHelper from Chromebook

      This content has moved! Visit the new LanSchool Classic Help Desk It looks like you may be interested in Mass Deploying LanSchool Student for Chromebook.
    • LanSchool 8.0.2.82 Release Notes

      LanSchool™ Release Notes Updated: December 16, 2019 Component Versions LanSchool 8.0.2.82, December 16, 2019 Chromebook App 8.0.2.13, December 16, 2019 Chrome Web Helper: 8.0.2.5, December 16, 2019iOS TA and Student 8.2.0, December 16, 2019 Android ...
    • Controlling multiple students at once

      Problem: Can I remote control multiple computers at once? Cause: N/A Prerequisite(s): LanSchool Teacher and Student Solution(s): If all of the computers in the lab are the same basic image or configuration (for example. all Windows XP machines with ...
    • Recent Articles

    • Allow Help Desk to reset Image Challenge images

      Issue Customer would like to allow Help Desk users to only be able to reset user Image Challenge images when they have been forgotten by a user. Solution This can be done by assigning specific users in the system the User Group Admin role, as well as ...
    • Troubleshoot RDS

      This is a good article, from Microsoft, on how to troubleshoot RDS/RDP logon issues. https://social.technet.microsoft.com/wiki/contents/articles/37841.remote-desktop-services-rds-logon-connectivity-overview-and-troubleshooting.aspx
    • Building an Employee Phonebook system

      Building a Mini Application Post #20 Can it really be that simple to create a little application with Report and Form Builder?  This tutorial shows you that it is - and actually helps you make a useful application at the same time as learning how to ...
    • Working with Binary Data in Report Services

      Quick Start Guide - Binary Data This tutorial is designed as a quick "How Do I Work With Binary Data" tutorial.  It walks through the steps necessary to upload an image to a database.  Every webNetwork 6.0 installation ships with a database called ...
    • Lenovo Unified Workspace 6.5.9.41 Released

      Lenovo Unified Workspace 6.5.9.41 Released 05-18-2021 Below is a list of enhancements and fixes for Unified Workspace 6.5.9.41 If you need assistance with your update, please contact support at 800-505-6865 (Monday-Friday, 8:00am-5:00pm EST - ...