Working with Binary Data in Report Services

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.



    Can't find the KB

    Unable to find the KB to address your issue ?  

      • Recent Articles

      • Lenovo Unified Workspace End-of-Life Questions and Answers

        Will the shutdown of LUW servers and access to downloads affect my server licensing? No, the shutdown of the customer servers and access to the product and licensing downloads will not affect your server licensing. This license is downloaded and ...
      • How do I determine my Unified Workspace license expiration date?

        The best method for determining the licensing information including the expiration date of your Unified Workspace license: Login to your 8090 management console on each server This may take remoting into each LUW server and relay, opening a browser, ...
      • Lenovo Unified Workspace 7.0.2.13 Released

        Highlights of Unified Workspace 7.0.2.13 Before you install: Please view the installation notes here. 7.0.2.13 requires a 7.0 license file. Below is a list of enhancements and fixes released in Unified Workspace 7.0.2.13 Fixed external storage ...
      • LanSchool Documentation Guides

        LanSchool Classic Teacher Console The LanSchool Teacher Console is the interface teachers will use to manage their classroom and students. It contains all the tools necessary for a teacher to effectively interact with students and create a ...
      • Lenovo Unified Workspace 7.0.1.41 Released

        Highlights of Unified Workspace 7.0.1.41 Before you install: Please view the installation notes here. 7.0.1.41 requires a 7.0 license file. Below is a list of enhancements and fixes for Unified Workspace 7.0.1.41 Updated Log4j Updated Java Updated ...
      • Related Articles

      • 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 ...
      • 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 ...
      • How is data secured in Unified Workspace

        Some customers have asked if Unified Workspace is FIPS Certified and specifically FIPS 140-2.  Being FIPS  certified means that your software uses FIPS  certified cryptographic modules and has been verified by one of the approved NIST laboratories. ...
      • New Directory Services Architecture (AD LDS)

        Unified Workspace has always required an LDAP directory service to serve as the primary datastore for the environment. All configuration objects and user data are stored in this underlying directory service. Until now, LUW required this to be the ...