﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - ClientUI - Image Binding in ClientUI Reporting</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Image-Binding-in-ClientUI-Reporting/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>Image Binding in ClientUI Reporting</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Image-Binding-in-ClientUI-Reporting/</link><pubDate>Mon, 23 Jun 2014 12:50:07 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Specifying the image/bitmap field owned by the data source can be done like the following.&lt;/span&gt;&lt;/p&gt;&lt;img src="http://www.intersoftpt.com/Community/Attachments/4041/SpecifyImageBitmapFieldAsDataSourceProperties.jpg" alt="Specify Image Bitmap Field as Data Source Properties"&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;However, there is a minor glitch with the Reporting control. The image object doesn’t show the picture as specified in the properties owned by the data source.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;I will have this forwarded to ClientUI development team to be investigated further. Will keep you updated with any news I heard from the team regarding this.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;&lt;strong&gt;Edited on June 23, 2014 11:18 PM&lt;br&gt;Reason: Update Work Item ID&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;This is filed under CLIENTUI-50.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Image Binding in ClientUI Reporting</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Image-Binding-in-ClientUI-Reporting/</link><pubDate>Fri, 20 Jun 2014 10:08:03 GMT</pubDate><dc:creator>aspireectd</dc:creator><description>&lt;p&gt;Thanks but I refer back to my original question. &amp;nbsp;Using your 2nd example, how do I add a property that is an image/bitmap field in my object.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Brent&lt;/p&gt;</description></item><item><title>Image Binding in ClientUI Reporting</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Image-Binding-in-ClientUI-Reporting/</link><pubDate>Thu, 19 Jun 2014 02:53:23 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Since you are using third party data source, you will need to define data definition on the report manually.&lt;/span&gt;&lt;/p&gt;&lt;p&gt;&lt;span style="color: #1f497d;"&gt;To define data source, navigate to the Report Explorer tab and do the following.&lt;/span&gt;&lt;/p&gt;
&lt;ol style="color: #1f497d;"&gt;&lt;li&gt;Click the AddDataSource button to launch a dialog to add a new data source.&lt;br&gt;&lt;img alt="Click the AddDataSource button" src="http://www.intersoftpt.com/Community/Attachments/4041/AddDataSource.jpg"&gt;&lt;/li&gt;&lt;li&gt;Specify the name and type of the data source.&lt;/li&gt;&lt;li&gt;Specify the properties owned by the data source, including its name and type.&lt;br&gt;&lt;img alt="Specifying the data source properties" src="http://www.intersoftpt.com/Community/Attachments/4041/SpecifyDataSourceProperties.jpg"&gt;&lt;/li&gt;&lt;li&gt;Click OK. Now the Report Explorer tab will look like the following.&lt;br&gt;&lt;img src="http://www.intersoftpt.com/Community/Attachments/4041/ReportExplorerTab.jpg" alt="Report Explorer tab after defining data source"&gt;&lt;/li&gt;&lt;/ol&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Hope this help.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Image Binding in ClientUI Reporting</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Image-Binding-in-ClientUI-Reporting/</link><pubDate>Tue, 17 Jun 2014 10:20:53 GMT</pubDate><dc:creator>aspireectd</dc:creator><description>&lt;p&gt;Thanks for the reply, I am not using Entity Framework but a third party ORM (Telerik) so I was going to simply construct a collection and pass it at run time. &amp;nbsp;when creating/editing a datasource through your designer is there a certain property type that I should be using or what is the best approach in my case.&lt;/p&gt;&lt;p&gt;&lt;br&gt;&lt;/p&gt;&lt;p&gt;Brent&lt;/p&gt;</description></item><item><title>Image Binding in ClientUI Reporting</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Image-Binding-in-ClientUI-Reporting/</link><pubDate>Tue, 17 Jun 2014 03:30:44 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="color: #1f497d;"&gt;One of Reporting Reference sample, Product Category sample, has an image object as shown below.&lt;/span&gt;&lt;/p&gt;&lt;img src="http://www.intersoftpt.com/Community/Attachments/4041/ProductCategory_ImageObject.jpg" style="height: 591px; width: 582px;" alt="Image Object on Product Category Report"&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;The image object shows image file from a specified Uri based on the CategoryID field.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;A partial class named &lt;strong&gt;Category&lt;/strong&gt; (Intersoft.ClientUI.Samples.Reporting.DomainModel\Models\NorthwindModel\Category.cs) is used to define the required properties and methods to handle this object.&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;public partial class Category
{
    #region Properties

    private static Dictionary&amp;lt;int, BitmapImage&amp;gt; PhotoDictionary = new Dictionary&amp;lt;int, BitmapImage&amp;gt;();

    public ImageSource Photo
    {
        get { return ResolvePhoto(this.CategoryID); }
    }

    #endregion

    #region Methods

    public static ImageSource ResolvePhoto(int categoryID)
    {
        if (PhotoDictionary.ContainsKey(categoryID))
            return PhotoDictionary[categoryID];
        else
            return null;
    }

    public static void RegisterPhoto(int categoryID)
    {
        Uri uri = new Uri(string.Format("/Intersoft.ClientUI.Samples.Reporting.DomainModel;Component/Assets/Images/Categories/{0}.png", categoryID), UriKind.Relative);
        PhotoDictionary[categoryID] = new BitmapImage(uri) { CreateOptions = BitmapCreateOptions.None };
    }

    #endregion
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;In the view model (&lt;strong&gt;ProductCategoryViewModel.cs&lt;/strong&gt; in “Intersoft.ClientUI.Samples.Reporting \ViewModels\Reference” folder), override the &lt;em&gt;LoadPrerequisiteData&lt;/em&gt;. Invoke RegisterPhoto() method for each items of result and pass its CategoryID as the parameter.&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;protected override async void LoadPrerequisiteData()
{
    CategoryRepository productModelRepository = new CategoryRepository(new NorthwindDFEntities());
    SelectResult result = await productModelRepository.LoadDataAsync();

    foreach (Category category in result.Items)
    {
        Category.RegisterPhoto(category.CategoryID);
    }

    base.LoadPrerequisiteData();
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;In the Report Designer, select the Image component; and click on its smart tag to open the Image Task. Set the Image Binding to Category.Photo.&lt;/span&gt;&lt;/p&gt;
&lt;img src="http://www.intersoftpt.com/Community/Attachments/4041/ImageBinding.jpg" alt="Image Binding"&gt;
&lt;p&gt;&lt;span style="color: #1f497d;"&gt;Should you have different scenario, please feel free to let me know.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Image Binding in ClientUI Reporting</title><link>http://www.intersoftsolutions.com/Community/ClientUI/Image-Binding-in-ClientUI-Reporting/</link><pubDate>Mon, 16 Jun 2014 17:12:03 GMT</pubDate><dc:creator>aspireectd</dc:creator><description>&lt;p&gt;How do I specify that a datasource property is an image type that will get picked up by your image object.&lt;/p&gt;</description></item></channel></rss>