Monthly Archives: December 2010

Change application configuration in an already published ClickOnce app

For a detailed description, se this excellent article:

Quick steps

1) Remove the .deploy filextension from all files within your Application Files folder

2) Edit the .config file as requested

3) Start a Visual Studio console prompt and navigate the Application Files folder with the current version

4) Run command
mage –update Myapplication.exe.manifest

5) Re-enter the .deploy filextension to all files except the xxx.application and xxx.manifest

6) Run command
mage -update Myapplication.application -appmanifest Myapplication.exe.manifest

7) Then move back up to the folder where the publish.htm and the other .application files exist and run command
mage -update Myapplication.application -appmanifest “Application Files\Myapplication_1_2_0_13\Myapplication.exe.manifest”

8) You’re done

Errors that might occur:

System.Deployment.Application.DeploymentException (Subscription)

Unable to install this application because an application with the same identity is already installed. To install this application, either modify the manifest version for this application or uninstall the preexisting application.


Run command ”mage –cc” to clear ClickOnce cache.


How to create a custom report for Microsoft Dynamics CRM 4.0 using SQL Server Reporting Services (SSRS)

There’s a lot articles on the subject out there and a good place to start is So You Want to Become Custom Report Writer Expert.

Here’s a brief tutorial on the major steps needed:

1) Create your SQL query. Use SQL Server Management Studio to create your SQL query. Try to make SQL Server perform as many of the calculations and groupings as you can, rather than doing this in SSRS, for perfomance reasons. Ideally, create a view that gathers all data needed for your report. If you want to use CRM prefiltering rememeber to use the “CRMAF_” prefix to your “from table” alias.

2) Create a new Reports project with Visual Studio 2005 or 2008 (Business Intelligence Studio). Add a new Report Wizard report using the query or view you just created. Design your report until your satisfied with it.

3) Create a simple report within Dynamics CRM by using the CRM Report Wizard (any report should do, we just want the framework of the report). Then download a copy of that report, you should receive a RDL file.

4) Open the RDL file in notepad och replace the datasource connectionsstring server and initial catalog. Downloaded reports always gets the connectionstring “localhost/adventure_works” instead of the actual database.

5) Add the RDL file to your reporting project. Replace the query in dataset DSMain with the query/view of your own.

6) Copy the content (table, graphs, etc) of the report you created in step 2 to the newly imported CRM report. If you want, copy backgroundcolors and fonts to make your report look like a standard CRM report. Then delete the original contents.

7) Edit the report you created in CRM by uploading the modified RDL file and your done!