I have some valueCollectionDatasource objects declared on my Main Window (used for graphs in a dashboard). These are ad-hoc queries and don’t have a corresponding Entity or View to work from.
For example:
<valueCollectionDatasource id="offerStatsDs">
<query>
<![CDATA[select e.offercode, e.offerdesc,
sum(e.orders) as ordCount,
sum(e.totpurch) as totAmount
from rade$OfferStats e
where e.category = :component$txtCategory
and e.purchdate between :component$dateStart and :component$dateEnd
group by e.offercode, e.offerdesc
order by 1
]]>
</query>
<properties>
<property datatype="string"
name="offercode"/>
<property datatype="string"
name="offerdesc"/>
<property datatype="long"
name="ordCount"/>
<property datatype="CurrencyDatatype"
name="totAmount"/>
</properties>
</valueCollectionDatasource>
How do I translate this to v7 and declare it in XML?
As an aside, losing the “:component$” option means I have to write more code (setParameter calls). It was so much easier before…
Since I now have to set the parameters in code, how do I reference the Data Loader in code when it doesn’t have a base entity to put in the type?
@Inject
private CollectionLoader< ...what goes here... > offerStatsDl;