Building a Report - Need guidance for sub-reporting?

This question has suggested answer(s)

I'm probably pushing my luck in terms of assistance, so far this forum has been incredible in helping out a novice like myself. 

I am building a Quote Report using FetchXML in Visual Studio (BIDS).  

This may be the wrong approach (and not afraid to hear it) but this is how I have build my current 'prototype' if you will.  (Apologies for not using correct vernacular relating to SQL, I have no coding experience).  I feel as though I am probably going about this backwards in terms of entities. 


DataSet1 - Primary Entity "Quote Detail"  (This is where I pull the information about productid's, prices, etc).  Essentially these are the quote products. 

I then have two Linked Entities in the same query/dataset.  Product and Quote. (The product entity is where I pull SKU's, or descriptions, and break down types)

The Quote entity is obviously where such items like (Customer, Addresses, Total Amounts, essentially the bulk of the report).  

                        I applied a filter to the Linked Quote based on quotenumber (ie. QUO-1234-ABCD) which works to identify which Quote I would like to work with. 

Here is where my problem is:  Say there were 3 revisions to the quote: rev1 (includes items) rev2 (includes different items) rev3 (includes dif items)

If I run my report with a single filter of Quote #, I pull the items from all 3 revisions.  

So I need to specify 2 filters:  QuoteNumber, and RevisionNumber. 

Right now, the quote works and builds perfectly, (but the hangup is I need to manually enter the revision number as a parameter)

In the past, I have used pre-filtering to specify a primary entity.  

Can this be done with linked entities?  More importantly, two linked entity fields?

In a nutshell, I need to:

Run a report from an open Quote window, have it automatically know which Quote# to pull the quote details from, and also know the revision number, to specify which items get added.  

All Replies
  • Update:  

    I simply enabled pre-filtering and removed the existing filter/parameters that I had in my report, uploaded and it works.  

    Even though I have developed a working Quote system, if anyone reading this is gouging their eyes because I'm doing it all wrong....please tell me.  

    We paid a developer to create a quote the last time, and the quote included a sub-report which I believe was how he selected the correct items to add.

    I have done no such sub-report.  In fact the entire report is off of a single dataset...

    If I did this wrong, please do not hesitate to say so, but I would appreciate a starting point from my mistakes.

  • Hi The Koalabat,

    My name is Josh Wells and I am a support engineer on the Microsoft Dynamics CRM Support team.  If the report is doing what you want it to do, then you did it right.  There is not necessarily a right or wrong way to do it.  It's all about preferences and what you are comfortable with.  The developer you previously worked with may have used a standard parent report they use for most of their reports and then created a sub-report for your particular request.

    I'd say you did a great job if it works as intended and this was your first report with FetchXML and LinkEntities.

    Thank you for using Microsoft Dynamics CRM Communities,

    Dynamics CRM Support Blog

    Josh Wells
    Support Engineer
    Microsoft Dynamics CRM