Christian
Christian

Reputation: 1

Get the total value from a different dataset in report builder (crm online 2016)

I'm attempting to create a report which will get datas from different datasets. I using a Dynamics CRM Online, where RDL Sandboxing is enabled. Because of this i can't make a report with custom code, so i only can make the predetermined functions to get a result.

The report has one level of grouping, and I need to sum the values within each group only (not a total for all groups).

I have to Datasets:

Main-Dataset:
ItemID | Name
1 | X
2 | Y

Second-Dataset:
ItemID | Buyed Value| Customer
1 | 100 | A
1 | 200 | B
2 | 100 | B

Now i want to copy the result of the values, depending on the ItemID in a Textbox.

In the result my report must show something like this:

ItemID| Total Value| ....
1 | 300 | ....
2 | 100 | ....

I my first attempts i try it with the following code:

=SUM(Lookup(Fields!ID.Value, Fields!ID.Value, Fields!Buyed.Value, "Dataset2"))

but that shows an error.

This code only shows me a concatenation of the values:

=Join(LookupSet(Fields!ID.Value, Fields!ID.Value, Fields!Buyed.Value, "Dataset2"),";" + vbcrlf)

I test a report with custom code also, but when i am upload the rdl report to dynamics it shows me an error:

RDL Sandboxing is enabled.

I have anonymized my values.

Hope some one can help me. Sorry for my bad english.

Best Regards, Christian

Upvotes: 0

Views: 387

Answers (1)

Dan Scally
Dan Scally

Reputation: 2042

Without Custom Code I'm pretty certain you can't get the Sum() of a LookUpSet(), sorry.

You'll need to add a new dataset that creates the Totals you want, and look up against that instead.

If possible though I'd get the server administrator to enable custom code if possible - it's really powerful.

Upvotes: 0

Related Questions