CRM2016 on Premisis
I have amended this post as I have managed to make some progress.
I'm creating a custom invoice with VS SSRS. I am using fetchXML as a datasource
I have two datasets in this report
Invoice Header
<fetch>
<entity name="invoice" enableprefiltering="1" >
<attribute name="invoiceid" />
<attribute name="duedate" />
<attribute name="datedelivered" />
<attribute name="invoicenumber" />
<attribute name="new_invoicetype" />
<link-entity name="account" from="accountid" to="customerid" link-type="outer" alias="account" visible="true" >
<attribute name="address2_stateorprovince" />
<attribute name="address2_line2" />
<attribute name="new_paybydirectdebit" />
<attribute name="address2_city" />
<attribute name="address2_line1" />
<attribute name="new_companyname" alias = "companyname" />
<attribute name="address2_postalcode" />
<attribute name="address2_line3" />
<attribute name="name" />
<attribute name="new_pono" />
</link-entity>
</entity>
</fetch>
Now here is my problem. How do I only return the records in a second dataset for the selected invoice. I have tried multiple options but I either get every invoice detail line in the entity or none at all
Invoice Summary
<fetch>
<entity name="invoicedetail" >
<attribute name="manualdiscountamount" />
<attribute name="invoiceid" />
<attribute name="productidname" />
<attribute name="baseamount_base" />
<attribute name="priceperunit" />
<attribute name="quantity" />
<attribute name="extendedamount_base" />
<attribute name="extendedamount" />
<attribute name="baseamount" />
<attribute name="tax" />
<link-entity name="product" from="productid" to="productid" link-type="inner" alias="Product" >
<attribute name="price" />
<attribute name="description" />
</link-entity>
</entity>
</fetch>
*This post is locked for comments