0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【Query Builder:Expression】Use icons in a Web report

0
Posted at

Introduction

I would like to talk about showing icon on a web report with Sharperlight expression.
Depending on the number, different color icons are displayed.
image.png

Base Query

Let's create a web report with Sharperlight publisher, and design a query like this.
This should be a simple dataset so I used "Custom Defined Dataset" option to prepare a dataset.
image.png
The dataset is like this.

"Product::String","Stock Left::Number"
"Timber Screw 8G x 25",55
"Timber Screw 8G x 28",120
"Timber Screw 8G x 30",80
"Timber Screw 8G x 35",10
"Timber Screw 8G x 40",32
"Timber Screw 8G x 45",500
"Timber Screw 8G x 60",75

With preview
image.png
On a browser
image.png

Expression

Template

We add a Sharperlight expression, and use a built in template.
image.png

  1. Type icon into Find field to find the expression template
  2. Double-click to transfer the template found to the editor

Editing

Let's start modifing the template.
We do when Stocks Left is 100 or greater than 100, showing Grenn icon, when it is between 30 or greater then 30 and less than 100, showing Yellow icon, otherwise showing Red icon.
Don't forget to set Icon for Data Type property.
image.png
We don't need the column header for this so clear the value from the Description.
image.png

Preview

We can now preview it with Preview button.
image.png

Publishing the report

Save the query and save the web report.
Start Sharperlight service.
View the web report in your browser.
We shoud see the web report like this.
image.png

Conclusion

There are many Sharperlight expressions and we can create more attractive web reports with them.

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?