We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon
If you became a customer of the Syncfusion Reporting Platform or the Report Viewer, Report Designer, or Report Writer components before October 2019 and have questions related to those products, you can request support through our forum system. However, please note that this support system is only for existing customers who are still using the Syncfusion Reporting Platform or its components and not for new customers looking for reporting products from Syncfusion.

For new customers or those with general reporting questions, we recommend contacting our support team at https://support.boldreports.com/, which is a separate brand created by Syncfusion for its reporting solutions. Our team will be happy to assist you with any questions you may have.

Thank you for choosing Syncfusion for your reporting needs.

How to apply styling to a value using Expressions

Hi

In report designer, is it possible to apply styling to a table cell value (from dataset) using Expressions?

For example, data set returns the records below, and if it contains the word "total", I would like the value to be bold.

Apple                              10
Pear                                 15
Orange                            7
Fruits Total                     32
Pepsi                                20
Sprite                               8
Beverage Total               28

I tried using Format() in Expressions but it does not seem to extend to text styling.

Thank you.

Regards
Erna

5 Replies

VS Vinoth Srinivasan Syncfusion Team February 24, 2017 12:07 PM UTC

Hi Ernawita, 
 
Thanks for contacting Syncfusion support. 
 
Yes, the style can be applied/modified to specific cell based on its current value using expression. You need to set following expression to “Font Weight” property of the tablix cell using property window by selecting the entire row. 
 
=IIf(LCase(Fields!Items.Value).ToString().Contains("total"), "Bold", "Default") 
 
We have prepared a simple report based on your requirement and it can be downloaded from the below location. 
 
Regards, 
Vinoth S. 



EH Ernawita Hamidon February 27, 2017 03:41 AM UTC

Hi Vinoth

Thank you for your reply.

I tried using your sample report but I get this error message: "An error occurred while processing the report item 'Items' and Invalid Expression : ". When I remove the font weight expression from the row and set to Default, I am able to preview the report.

Please see attached file for the screenshot of the error: 1.png is the error when font weight property expression is in place, and 2.png is the successful preview without the font weight property expression.

I have tried on my own report too and I get the same invalid expression error.

Appreciate your help to look into this. Thank you.

Regards
Erna


Attachment: Img_18212c1e.rar


VS Vinoth Srinivasan Syncfusion Team February 27, 2017 09:47 AM UTC

  
Hi Ernawita, 
 
We could run the styling expression report without any exception at our end, please find the snapshot below.  
 
 
 
We request you to share the assembly version used at your end, it will help to provide the solution at the earliest. 
 
Regards, 
Vinoth S. 



EH Ernawita Hamidon February 27, 2017 09:56 AM UTC

Hi Vinoth

I am using report designer version 1.1.0.107.

Regards
Erna


VS Vinoth Srinivasan Syncfusion Team February 28, 2017 09:23 AM UTC

Hi Ernawita, 

A support incident has been created under your account. Please log on to our support website to check for further updates. 


Regards, 
Vinoth S. 


Loader.
Live Chat Icon For mobile
Up arrow icon