Home
Analytics
overlaying grid to a dynamic image
AndresO
<p><span style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:15px;">I need to overlay a grid(grid2) result from a dataset over an dynamic image that is result of another dataset, and is positioned on other grid's(grid1) cell, I try to make it changing the Background property in the grid(grid1) cell but it only admit URL or embedded image(i need it can be dynamic). Also I try to put this.getStyle().backgroundImage = row["imageURL"]; on the onCreate property of grid's(grid1) cell but it did not work.</span></p>
<p> </p>
<p>Thanks for your time.</p>
<p> </p>
<p>
Find more posts tagged with
Comments
Clement Wong
<p>Andres,</p>
<p> </p>
<p>It is possible to use a style, and then programmatically set the background image URL based on a data set.</p>
<p> </p>
<p>Attached is a sample that has two data sets.</p>
<p> </p>
<p>The Image Data Set will return a URL of the image.</p>
<p>The Customers Data Set will return a list of the customers and their country.</p>
<p> </p>
<p>In the outer grid, we set a style on cell 1, row 1. The style does not have a background image yet.</p>
<p> </p>
<p>Now, in the inner grid, we display a table that will use Customer Data Set.</p>
<p> </p>
<p>In the <em>beforeFactory </em>event, we execute the query for Image Data Set and save the result value. Then we set the style's background image to the URL we just read from the database.</p>
<p> </p>
<p>The attached design was created with OS BIRT 4.4.2. If using commercial BIRT, there are two lines to uncomment, and one to comment in the beforeFactory.</p>
<p> </p>
<p> </p>