locked
Custom report from Outlook client in Offline mode RRS feed

  • Question

  • Hi!

    I'm developing a custom report for showing single record data for some entity. User-defined parameter for this report is ID of the entity. Report must be available by pressing a button within entity's form without entering the ID by the user. It was relatively easy to find how to achieve desired functionality in online mode, but for now I'm unable to find out the same solution for offline. There is no reporting services installed on client PC during Outlook client installation, so I suppose the only way to run the report is using built-in OfflineViewer.aspx page. But I found no articles on how to use it for now. Could any one suggest any ideas on how to resolve my issue?

    Thanks in advance!
    Tuesday, June 17, 2008 3:23 PM

Answers

All replies

  •  

    Are you using CRM 3.0 or CRM 4.0?  With CRM 4.0, reports can be available offline.

    http://blog.customereffective.com/blog/2008/04/run-microsoft-c.html

     

     

     

    Tuesday, June 17, 2008 5:00 PM
    Moderator
  • Sorry, forgot to mention it. I'm using 4.0. I read this article you suggested, thanks for it. But I have a bit different issue. Reports could be executed when in offline mode, that's right, but the problem is that I need to execute it from URL with all neccessary parameters passed. I thought initially that Outlook client will make installation of SQL Server Express with Reporting Services and I'm be able to execute the reports in the same way as for regular RS on main server: not from CRM, but from external URL, pointing to report with necessary parameter values provided. But in fact Outlook client did not use local web site and local web services, it runs the offline reports somehow inside it's code, so I can't implement server reports launching from URL behavior.

     

    May be I'm trying to build too complicated solution and there are some ways to develop required functionality using built-in routines of MS CRM, but for now only solution I see is the launch of report from URL by external (to MS CRM) Reporting Services viewer. If there are any ways to launch the MS CRM report with all parameters filled automatically with necessary data using built-in MS CRM report viewer, I would appreciate if someone point me to such ability. Smile

     

    P.S. Sorry for my bad English, it's not my naitive. Wink

    Tuesday, June 17, 2008 6:36 PM
  • it doesn't work that way--you are using a local web server and a local report engine while offline, so you can't use the same links.  You will need to have users run these reports using the offline client while offline.

     

    Tuesday, June 17, 2008 8:35 PM
    Moderator
  •  Joel CustomerEffective wrote:
    it doesn't work that way--you are using a local web server and a local report engine while offline, so you can't use the same links. 

    It's ok to use local web server and report engine (different URLs are ok also), but I can't figure how exactly. There are no web server and RS installed on client, I suppose CRM use some on-the-fly instances to show the reports and I'm seeking the ways to control the offline reports execution from the custom code. I suppose it'll be the pain for end-users, if they'll be forced to manually search for neccessary record to show within the report instead of just clicking on a entity form's report button.

    Tuesday, June 17, 2008 8:49 PM
  • Running reports on line and off line process is exactly the same.  If your report is available from the record form or view when on-line, it will be available the same way when offline, it will just reflect the local cdata.  Your users will still be able to just click on the entity form's report button.

     

    Users who go offline will just need to make sure that their local data settings are set to take reports offline in their crm settings.  see crm/local data settings in the crm Outlook client.

    Tuesday, June 17, 2008 9:28 PM
    Moderator
  •  Joel CustomerEffective wrote:

    Running reports on line and off line process is exactly the same.  If your report is available from the record form or view when on-line, it will be available the same way when offline, it will just reflect the local cdata.  Your users will still be able to just click on the entity form's report button.

    Let me describe the problem in more detail. To view the report witin built-in CRM report viewer, the ID of the record must be specified. For now I can't see any way to specify parameters automatically for internal viewer, so my solution for online report view was to publish report for external use (there is a command for this in CRM). After that I was able to run report using standard reporting services viewer (not CRM one) with parameter value specified in URL. Something like http://<CRM Server/RS Server>/ReportServer/Pages/ReportViewer.aspx?%2fContact&rs%3aCommand=Render&CRM_FilteredContact=select%20contact0.*%20from%20FilteredContact%20as%20contact0%20where%20contactid%20=%20'<SOME GUID>'. This thing I can't do while offline as since there is no Reporting Services installed on client PC. So I'm searching for solution. May be parameter value could be specified in URL for internal MS CRM report viewer also, but for now I do not know, how. But this would be the best solution, if it is possible at all.

    Wednesday, June 18, 2008 8:21 AM
  • to make your report specific to one record, use CRM prefiltering.  Here's a good overview: http://blogs.msdn.com/crm/archive/2007/01/30/inside-report-prefiltering.aspx

    To use prefiltering, use the CRMAF_ prefix in your query.  When a prefiltered report is run from a record, it will be specific to that id.

    This will work both on-line and off-line.  You do not need to do anything different for the offline reports.

    So If my report query was:

    Select accountid, name, address1_line1, address1_city, address1_state
    from FilteredAccount as CRMAF_FilteredAccount

    When I ran this report from the account record (on-line or off-line) it would return the guid of the record that I was running it from.

    Also, just regular SRS parameters work when run ofline as well

    Wednesday, June 18, 2008 10:51 AM
    Moderator
  •  Joel CustomerEffective wrote:
    to make your report specific to one record, use CRM prefiltering.  Here's a good overview: http://blogs.msdn.com/crm/archive/2007/01/30/inside-report-prefiltering.aspx

    To use prefiltering, use the CRMAF_ prefix in your query.  When a prefiltered report is run from a record, it will be specific to that id.
    ...

    Thanks a lot, Joel! That was exactly what I've been searching for. I saw this article during my searching, but didn't read it thoroughly enough to notice prefilter's capability to limit the query scope to single record inside the entity's form. Thanks a lot again! Smile
    Wednesday, June 18, 2008 11:28 AM
  • you're welcome.  One other little thing, when you use prefiltering, make sure that your query does not include any dbo. prefixes.  These can cause problems with the prefiltering working correctly.
    Wednesday, June 18, 2008 11:31 AM
    Moderator
  •  Joel CustomerEffective wrote:
    you're welcome.  One other little thing, when you use prefiltering, make sure that your query does not include any dbo. prefixes.  These can cause problems with the prefiltering working correctly.

    Thanks, I'll keep this in mind. BTW, I have no "Print" button inside Outlook client report viewer in Offline mode. This button is there on the same client and same record when in Online mode and I'm able to print the report. But only export to Excel and PDF is available when Offline. Is it some kind of limitation or just problem with my setup?
    Wednesday, June 18, 2008 1:14 PM
  • I never noticed that before, but you're right.  I suspect it has to do with that they are using a light version of SRS for offline reports, and it doesn't include the print rendering engine.  You can right click and use the IE print menu, but that doesn't work for multiple page reports.

     

     

    Wednesday, June 18, 2008 1:26 PM
    Moderator
  •  Joel CustomerEffective wrote:

    I never noticed that before, but you're right.  I suspect it has to do with that they are using a light version of SRS for offline reports, and it doesn't include the print rendering engine.  You can right click and use the IE print menu, but that doesn't work for multiple page reports.


    Wish they drop Excel export renderer instead of print renderer. Anyway there is a workaround: export to PDF and print from Adobe Reader.
    Wednesday, June 18, 2008 2:10 PM