Avatar of exalkonium
exalkonium
Flag for United States of America asked on

Microsoft Dynamics CRM -> Implementing ComponentArt charts using Visual Studio

Experts,

Am beginning to work on some of the behind-the-scenes stuff with Microsoft Dynamics CRM.

A client I am customizing the CRM for has decided that the charting feature built-in to the CRM is inadequate, so we have decided to implement ComponentArt's charting solution for ASP.NET ( http://www.componentart.com ). Since I haven't worked with ASP.NET or C# a day in my life, I picked up a book, and I think I can handle this on my own once I get started.

This is the issue: Almost all of the charts I am using need to be context-based, i.e. the end-user will select a contact from the list of contacts, and the reports that I generate all select records that are related to that client.

I am assuming that I am going to be deploying these charts as aspx files with the ComponentArt controls in the code of the aspx files. Then in the code-behind for that file, I will use C# to retrieve which contact was selected to run this report for. Anyone know how I go about doing this? Am I too vague? Is there more information needed?

Thanks.
Microsoft DynamicsASP.NETC#

Avatar of undefined
Last Comment
Jeff Wight

8/22/2022 - Mon
exalkonium

ASKER
Note: I am pretty familiar with C# and the ASP.NET syntax and such now.
Feridun Kadir

How are your users invoking the ComponentArt charts? From within CRM? If so, where?

Depending on how you do this, it is possible for CRM pass the contact record ID to the charting software.
Jeff Wight

I responded to your other questions as well - as Feridun mentioned, where you are invoking the customization will determine how the information is passed to the customization:

If you are going to add an ISV.CONFIG extension (described here: http://msdn.microsoft.com/en-us/library/bb928133.aspx), then there is a option to pass URL parameters (passparams) to your customization (http://msdn.microsoft.com/en-us/library/cc150844.aspx).  You would enable this option and then build your customization to extract the ID parameter from the URL.  From there, you could use the CRM web service to look up all the information tied to that ID and then use it in your page.  

If you are going to load your customization in an iFrame on an existing CRM form, your would use the onLoad event for that entity to dynamically set the iFrame SRC, passing any parameter in your specify from the form.  Here is a description on how to do that: http://technet.microsoft.com/en-us/library/cc150846.aspx.  again with this method, you would build your customization to extract the parameter from the URL and then use it in your page.  

Getting the values from URL using ASP is pretty easy.  Here's an example: http://msdn.microsoft.com/en-us/library/ms524784.aspx.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
exalkonium

ASKER
Well, I am not for sure how yet, but the iframe sounds like it is going to be the best option. Then all I would have to do is build a report in Report Builder 2.0 that has a standard header and footer.

So, let's say I use the iframe. Do I embed this into a report in Report Builder, then pass the query to the iframe? How do I pass the URL from the report to the iframe?
Jeff Wight

The iFrame is embedded in the CRM form.  You can find information on setting up the iFrame here: http://msdn.microsoft.com/en-us/library/cc150849.aspx.  There is a link on that page for creating Dynamic iFrames which is what I think you want.

Basically:

First, you need to publish your Report Builder report so that it accepts a URL parameter that is one of the field accessible on the CRMForm where your iFrame will reside (such as ContactID).  

Second, you need to add an iFrame to your CRM form using the built in CRM customization functionality.  

Third, you need to use an onLoad script to set the iFrame SRC value.  The SRC value would be a concatenation of the URL that points to your report along with the parameter that makes it dynamic.  Something like "http://reportserver/reportbuilderreport.aspx?reportparameter_contactid=" + crmform.ObjectId.

When this is all assembled, a user would load a contact form.  The contact onLoad event would fire, setting the SRC of the iFRAME to be the report that corresponds to the contact that is loading (based on the ObjectID being passed as a parametr to the report).
exalkonium

ASKER
OK, will do some experimenting and let you know.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
exalkonium

ASKER
OK, I'm pretty sure I can do all of this, except I can't figure out one thing.

I am not going to be using iframes or isv.config (I think). I am going to build all the controls into an aspx page with the ComponentArt controls. I'll then have it as a Virtual Directory in IIS. I'll add this to the Reports by selecting "Link to Web Page" and the related record type is contacts, show in form details for related records. So far so good.

The problem is when I select the record in the form details, it says to "Run on all records" not run only on this record. Even then, it doesn't look like anything about all the records is passed in the URL. It looks like it just calls the page but doesn't pass any parameters. Is there more I need to do?

I think I am getting close, just a few more things to do to make this work.
Jeff Wight

I'm not quite following - can you post a screen shot of where in CRM you are trying to run the report from?
exalkonium

ASKER
Sure.

I am starting to wonder if what I am tying to accomplish is even possible through the reports section.

I am thinking I probably will just have to add a button next to reports here, and have it open the report in its own window, and pass in the contactid. I would do this through isv.config, right?
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
exalkonium

ASKER
Picture.
capture.jpg
Jeff Wight

Yep, ISV.CONFIG lets you do that.  That's probably an easier solution.  
exalkonium

ASKER
Any idea where I can get a blank isv.config that isn't prefilled with a bunch of samples?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
exalkonium

ASKER
Nevermind, I found one.
ASKER CERTIFIED SOLUTION
Jeff Wight

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.