How to concatenat URL with Record's attribute in Report's HTML editor?


Guest

How to concatenate URL with Record's attribute in Report's HTML editor?

For example:

But the result is not what I expected.

Thanks a lot.


DecSoft

Hello Zeng,

Yes; please, try by using "{{}}" for the variables instead "[]". Then your code must be something like that:



Guest

Thank you, David.

I've tried using "{{}}", AppBuilder report error in console:

The code is:


DecSoft

Hello Zeng,

I forget we deal with "src" attributes... in this case we can do something like this:

However, note "Record.Url" must store the complete URL to be loaded into the "IFrame". So you must prepare a record's field with the URL you want to load into the "IFrame". Take a look at the "Report5" sample.



Guest

Hello, David.

The above code works well.

I emphasis on "concatenate" to combine literal strings and Record attributes to get more flexibility just like Post #1.

Perhaps there is a way...

Thank you very much anyway. [:)]


Guest
Hello Zeng,

I forget we deal with "src" attributes... in this case we can do something like this:

However, note "Record.Url" must store the complete URL to be loaded into the "IFrame". So you must prepare a record's field with the URL you want to load into the "IFrame". Take a look at the "Report5" sample.

I've read all the Report samples before I launch this post. :>


DecSoft

Hello Zeng,

Yes; I understand. However, AngularJS doesn't allow concatenations in the context of an SRC attribute. If you receive the Records' data from the server, just concatenate the URL in a new record's field and use it in your application.

If the Records' data is local and you use an URL to load it (assigned to the Report control), you must modify the source file to add the appropiate URL record's field. If you use the Records' data variable instead of an URL, you must modify that variable accordingly to add the record's URL field.


I've read all the Report samples before I launch this post. :>

That's good! But other people can also read this post. :)



Guest
Hello Zeng,

Yes; I understand. However, AngularJS doesn't allow concatenations in the context of an SRC attribute. If you receive the Records' data from the server, just concatenate the URL in a new record's field and use it in your application.

If the Records' data is local and you use an URL to load it (assigned to the Report control), you must modify the source file to add the appropiate URL record's field. If you use the Records' data variable instead of an URL, you must modify that variable accordingly to add the record's URL field.


I've read all the Report samples before I launch this post. :>

That's good! But other people can also read this post. :)

Okey, I got it.

Thanks very much again!. :)


DecSoft

Hello Zeng,


Okey, I got it.

Thanks very much again!. :)

No problem! Please, let me know if you have any further question or need some other help.



Guest

Use a HTTPClient to get server data , then prepare URL with Records' attribute.

In HTTPClient's Success Event, type:

In Report's HTML editor, type:

It works correctly. :cool:


DecSoft

Hello Zeng,

Yes; that's can be a possible approach. Thanks for sharing with us!


Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.

This website uses some useful cookies to store your preferences.

I agree. Hide this note. Give me more information.