locked
custom report RRS feed

  • Question

  • Hi all,

    I have generated a custom report which contains 'account name' as a field. Its working fine. I need a functionality like if I am clicking on the account name it will navigate to the particular account form. How can i do it?.

    Regards,
    Rajsekhar
    Monday, March 23, 2009 6:30 AM

Answers

  • Hi,

    OTC is Object Type; i.e. 1 = Account, 2 = Contact etc ......

    So if you add the following for the URL Navigation jump .... :
    =IIF(IsNothing(Parameters!CRM_URL.Value),"http://localhost:5555/MicrosoftCRM/CRMReports/viewer/drillopen.aspx?ID={"& Fields!customerid.Value.ToString()&"}&OTC=1" ,Parameters!CRM_URL.Value & "?ID={"& Fields!customerid.Value.ToString()&"}&OTC=1")

    If you are in doubt about content of CRM_URL, just print it in the heading of your report for teting ...and thencopy and paste.

    I have added the code in red; so that you can test the linking while in VS developing your reports.

    it will jump to a default URL if CRM_URL not set; else it will use the standard one.

    See also what Jonas has described:
    http://gustafwesterlund.blogspot.com/2008_01_01_archive.html 
    Monday, March 23, 2009 2:05 PM

All replies

  • Hi,

    1. Download existing report; Competitor Win Loss
    If you download one of the existing reports, like Competitor Win Loss from the report register, you will see how it's done from there.

    2. CRM URL Parameter
    Basically you need a CRM_URL parameter in your report, as you will see in the standard reports. This one is set by CRM upon launch of report to relevant URL.

    3. Jump To URL property
    And for the field where you would like to have the link; select properties; look in the navigation folder, and fill in relevant value in "Jump to URL" field.


    Morten

    Monday, March 23, 2009 8:12 AM
  • A little addition to using the CRM_URL parameter in your report. This will only work if you upload your custom report from MS CRM (and not upload it from the Report Manager).
    • Proposed as answer by Daniel Middel Monday, March 23, 2009 8:13 AM
    Monday, March 23, 2009 8:13 AM
  • It's possible to set a default value for the parameter; so that it will work also when you launch it from other places then CRM.
    Monday, March 23, 2009 8:23 AM
  • Hi Morten,

    Thanks for reply. What value I have to set to the Jump to URL property. There are so many options. How to find OTC value for a particular entity.

    Regards,
    Rajsekhar
    Monday, March 23, 2009 8:37 AM
  • Morten can you tell me how you use the CRM_URL from other places than CRM? I have created a custom reportviewer which I access from my own webapplication. The app uses data from MS CRM. But I can't use the CRM_URL to open the CRM records (I have to use javascript popup instead).
    Monday, March 23, 2009 8:55 AM
  • Hi,

    OTC is Object Type; i.e. 1 = Account, 2 = Contact etc ......

    So if you add the following for the URL Navigation jump .... :
    =IIF(IsNothing(Parameters!CRM_URL.Value),"http://localhost:5555/MicrosoftCRM/CRMReports/viewer/drillopen.aspx?ID={"& Fields!customerid.Value.ToString()&"}&OTC=1" ,Parameters!CRM_URL.Value & "?ID={"& Fields!customerid.Value.ToString()&"}&OTC=1")

    If you are in doubt about content of CRM_URL, just print it in the heading of your report for teting ...and thencopy and paste.

    I have added the code in red; so that you can test the linking while in VS developing your reports.

    it will jump to a default URL if CRM_URL not set; else it will use the standard one.

    See also what Jonas has described:
    http://gustafwesterlund.blogspot.com/2008_01_01_archive.html 
    Monday, March 23, 2009 2:05 PM
  • As said, using the CRM_URL parameter from an application other than CRM itself cause a lot of problems.
    I have a custom ASPX which shows reports from reporting services. This ASPX is integrated in MS CRM (I don't use the default MS CRM reportpage). When I change the report in the ASPX, I upload it through the Report Manager and not via CRM.

    Using the CRM_URL parameter:
    - Does not work because I have to encode the CRM url (http://localhost:5555/etc). CRM_URL will never get a value by itself, because it is not initiated by MS CRM.
    - Is not multi-tenancy because I have to hardcode the company name.
    - Will not create a new window, but opens the drilldown record in the entire MS CRM window.
    - Changes my ID and OTC to lowercase after uploading the report, so it doesn't work. Fixed with & UCase("ID") & (so not really an issue).

    I can bypass all these problems by using javascript(window.open("/acct/etc"); to open an account record. The problem here is that some clients have JS disabled, so the popup will never work anyway. Also, I rather have the drilldown server-sided than client-sided.

    Wednesday, March 25, 2009 10:49 AM
  • Hi,

    Have you tried setting the default value for CRM_URL on the report server, and not in the report itself?

    I experienced that if i assigned a default value in the report, it was not carried over once registered on the report server.

    Check if that solves your problem.

    Morten
    Wednesday, March 25, 2009 10:54 AM
  • ... and your right; will not work for multi ten...
    Wednesday, March 25, 2009 10:55 AM