How to use Dynamic Attributes in Yarg Report?

Hi…
How do i add dynamic attributes in Yarg report?

Hi…
Is it not possible to put the dynamic attributes of an Entity into the Yarg Reports?

Hi, @Narayanan!

It is possible to put dynamic attributes to report, but with some workaround. You could use DataManager to load entities with dynamic attributes. For example, simple Groovy dataset for entity Colour with dynamic attribute dynString:

import com.haulmont.cuba.core.global.AppBeans;
import com.haulmont.cuba.core.global.DataManager;
import com.haulmont.cuba.core.global.LoadContext;
import com.mycompany.testapp.core.entity.Colour;

def result = []
def dm = AppBeans.get(DataManager.NAME);
def lc = new LoadContext<>(Colour.class);
lc.setLoadDynamicAttributes(true);
lc.setQueryString('select c from testapp$Colour c');
dm.loadList(lc).each { c ->
    result.add(['dynString': c.getValue("+dynString"), 'description': c.description])
}

return result

We have an GitHub issue about adding ability to use dynamic attributes in entity datasets.

Regards,
Sergey.