#1 2016-05-24 10:44:24

EGovMetrics
Member
Registered: 2016-05-21
Posts: 39

Report control or Details View with image

Hi,
I need to insert a photo in the Report control
or in the Details View.

Here are some links to better understand:

http://www.egovmetrics.com/Screenshots/ … hot001.jpg

http://www.egovmetrics.com/Screenshots/ … hot002.jpg


Thanks
Best
Joseph Caristena

Offline

#2 2016-05-24 11:42:14

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: Report control or Details View with image

Hello Joseph,

Are you take a look at all the "Report*" app samples? Some of them include images, links (buttons) and more in the Report control. Please take a look and tell me if you have any further question.

Offline

#3 2016-05-24 11:55:54

EGovMetrics
Member
Registered: 2016-05-21
Posts: 39

Re: Report control or Details View with image

Hi,
I think the other Report samples with images are not connected to database mysql.

Thanks
Best
Joseph Caristena

Offline

#4 2016-05-24 11:59:45

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: Report control or Details View with image

Hello,

EGovMetrics wrote:

Hi,
I think the other Report samples with images are not connected to database mysql.

Thanks
Best
Joseph Caristena

In fact this doesn't matter. The JSON source is not important here. However, now I think you wanted to show an image retrieved from the server. Then what you must to do is to use the image's URL in an Image control or an HTML control. Or what I am missing here?

Offline

#5 2016-05-24 17:48:49

EGovMetrics
Member
Registered: 2016-05-21
Posts: 39

Re: Report control or Details View with image

Hi,
YES.
It is working wink
Once in the Report control in the NotesView
in Visual section
then in the value field called HTML
with the following script:

<td>
 <span class="fa fa-sticky-note fa-lg"></span>
 [Record.code]
 <br />
 <img ng-src="[Record.imageurl]" />
</td>

it is working.

But now how can I display the image in the Details View ?

Maybe I should insert in the Details View
an Image control with a SetVar
in the Show event
and pass the value from the NotesView.

Any comment ?

Thanks
Best
Joseph Caristena

...

Offline

#6 2016-05-24 17:55:46

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: Report control or Details View with image

Hello Joseph,

I think you are right: in the same place we assign the record details for the text inputs, we must set the "Image" variable of an Image control with the appropiate record image url.

Offline

#7 2016-05-24 22:36:31

EGovMetrics
Member
Registered: 2016-05-21
Posts: 39

Re: Report control or Details View with image

Hi,
How can I insert a SetVar variable into an Image control ?

In the NotesReport control of the NotesView
in the RowClick I inserted:

SetVar "[CurrentImageUrl]" "[NotesReport.Record.imageurl]" "String"


Then in the DetailsView
in the Show event
I inserted the following script:

SetVar "[ImageUrlDetailsView.Value]" "[CurrentImageUrl]" "String"

An ImageUrlControl is on the DetailsView.
In the Image field of the Source section
I inserted the script:
[ImageUrlDetailsView.Value]

But I am not sure ...

Here is the link of the screenshot:
http://www.egovmetrics.com/Screenshots/ … hot003.jpg

Thanks
Joseph Caristena

...

Offline

#8 2016-05-24 22:40:14

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: Report control or Details View with image

Hello Joseph,

When we deal with Inputs then the "Value" variable is the correct one, but for the Image control we must deal with the "Image" variable. Then, if I am not wrong, the below line:

SetVar "[ImageUrlDetailsView.Value]" "[CurrentImageUrl]" "String"

Must be something like this instead:

SetVar "[ImageUrlDetailsView.Image]" "[CurrentImageUrl]" "String"

Of course if the Image controls ID/Name is "ImageUrlDetailsView".

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.