Load expression from database field

Stimulsoft Reports.WEB discussion
ecpmiranda
Posts: 52
Joined: Sun Jun 05, 2016 9:35 pm

Load expression from database field

Post by ecpmiranda »

Can I load an expression from a database field?
I want to save this expression in a varchar field on a SqlServer database

{"The person " + DataSet1.NamePerson + " is nice"}

and set DataColumn property of a textBox with the name of the database field.

I tried but it´s not working. Is there a way to do this?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Load expression from database field

Post by HighAley »

Hello.

You could use next expression to show expression from the data column:

Code: Select all

{Stimulsoft.Report.Engine.StiParser.ParseTextValue(Data, sender as StiComponent)}
Thank you.
ecpmiranda
Posts: 52
Joined: Sun Jun 05, 2016 9:35 pm

Re: Load expression from database field

Post by ecpmiranda »

This is very powerful!! This report tool is really great! Thanks!
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Load expression from database field

Post by Alex K. »

Hello

Let us know if you need any additional help.

Thank you.
ecpmiranda
Posts: 52
Joined: Sun Jun 05, 2016 9:35 pm

Re: Load expression from database field

Post by ecpmiranda »

Can I also use this expression to parse a RichText stored in a database field?

Code: Select all

{Stimulsoft.Report.Engine.StiParser.ParseTextValue(Data, sender as StiComponent)}
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Load expression from database field

Post by HighAley »

Hello.

You don't need to parse Rich Text. Just specify the column and set the Full Convert Expression property to True.

Thank you.
ecpmiranda
Posts: 52
Joined: Sun Jun 05, 2016 9:35 pm

Re: Load expression from database field

Post by ecpmiranda »

Did not work.

I tried a simple expression.
First, using the rtf editor in designer like this, and works fine!
My name is {DataSet1.PersonName}
The result in report viewer: My name is Edson


Then I save this rtf expression in a database field like this and set FUll Convert Express = true:
{\rtf1\ansi\ansicpg1252\deff0\deflang1046{\fonttbl{\f0\fswiss\fprq2\fcharset0 Century Gothic;}}
{\colortbl ;\red0\green0\blue0;}
\viewkind4\uc1\pard\li720\qc\cf1\b\f0\fs24 My name is \{DataSet1.PersonName\}\par}
The result in report viewer: My name is {DataSet1.PersonName}
The expression was not evaluated.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Load expression from database field

Post by HighAley »

Hello.

We have reproduced the issue.
We need some time for analyzing of it.
We will let you know about results.

Thank you.
edsonmiranda
Posts: 29
Joined: Thu Jul 07, 2016 2:06 pm

Re: Load expression from database field

Post by edsonmiranda »

Hello,
I am having the same problem and I need to load RTF expressions from database field. I tried to set FullConvert Express = true but is not working.
Do you have a fix for this issue?

Thanks!
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Load expression from database field

Post by HighAley »

Hello.

Unfortunately, we can't change this behavior but we are working on a workaround.
We need more time to prepare an answer for you.

Thank you.
Post Reply