CRM 2013 error – The file is too large and cannot be uploaded. Please reduce the size of the file and try again.

One of the CRM Developers had created a report 16 megabytes in size and when they tried to import the report they instantly go the message

file size limit

They searched the internet and fond a page with a likely solution

How to upload large report files in CRM

The eagle-eyed among you will have noticed the CRM developer, they had sent me my own page, awesome.

The blog post was written in March 2011 by a younger Hosk, so I have to admit I only have a dim memory of this problem, luckily for me and other people who have this problem I wrote a detailed blog about it.

This shows the benefit of writing a blog, I can often find the answers to many CRM problems which I have forgotten all about.

Where are reports in CRM 2013?

I was working on a CRM 2013 on-premise instance and I’m never sure where the reports are kept, my way of finding and adding reports is to do an Advanced find

I’m not sure if I have a modified CRM or I just can’t find reports anymore.

Max size limit

You will notice when you try and upload a large report the file size error pops up very quickly, the reason for this is there is a system setting Maximum file Size (in kilobytes)

A tad confusingly this is kept in the Email tab in System Settings

file size limit 1

To get to System Settings

Settings –> Administration –> System Settings –> Maxiumum File Size

The downside of modifying this will mean there larger email attachments but I think you should be able to change this, upload your large report and then set the limit back down.

In the example I changed the limit to 20 megabytes.

.NET machine config

Changing the Max File limit alone won’t resolve the problem, you also have to change the machine.config.

You also need to change the httpRuntime executionTimeout setting and the maxRequestLength value. You can probably guess the maxRequestLength is the file size

<httpRuntime executionTimeout = “9000” maxRequestLength=”20480″ />

So I also had to change the machine.config in v4.0.30319 folder.  In my previous blog post I changed the v2 machine config and for my CRM 2013 instance I changed the v4 machine config.  The reason for this is this setting is in the .NET version being used by CRM.  In my previous blog I was using CRM 4 which used .NET v2 and in CRM 2013 the .NET version is v4.I changed the value in the CRM web.config but I would still get the error and had to make the change in .NET version machine.config.

I would read my previous blog post because it goes into the topic in more detail

HERE IS THE FIX

1. Go to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG
2. Open machine.config
3. Search for <system.web>
4. Add in <httpRuntime executionTimeout=”9000″ maxRequestLength=”10240″ /> under the <system.web> (I added it right before the end)
5. Save
6. Restart IIS

Final thoughts

You will need to make these changes in other servers in other environments because if you try to import these reports where the changes outlined haven’t been made then an error will be thrown when you import the solution

Some people might be wondering why have I written another post about this error/problem.  The first blog post was for CRM 4 and I found I had to change the Maximum file Size System setting, which I didn’t mention in my previous post.

CRM 2011 – Why can’t I add my report to a solution

The quick answer to the question is for me to stop being an idiot.

I had written my report, I had uploaded the report, it was running fine.

I then tried to add the report into the solution, opened my solution –> reports –> adding existing

I then couldn’t find my report!

checked the reports, yep it’s there

did an advanced find, the report appears.

I then edited the report and remembered, this report is a my report, a personal report.

This is the same as creating a personal view, unless you share it everyone then no one else can see.

Reports are slightly different because you can choose an option called Make available to organisation.

To find this option you have to go to the report you created –> Edit –> Actions –> make available to organisation

Then everyone can see it and more importantly you can add to your solution

if you have a change of mind and want the report to be viewed by only you, you can in Actions choose to revert  to personal report.

CRM 2011 – Reporting options in CRM

I had to write a report for a customer this week and unfortunatly I wasn’t able to write the report using the report wizard.

This was very bad news because all other reporting methods take a lot more time.

So what are my options

  • Dashboard and charts
  • Reporting wizard (although for this report it wasn’t any use)
  • Excel Powerpivot
  • SRS reports – FetchXML
  • SRS reports – SQL

To give you some background one of the reports was a report grouping on date (month, year), another group of accounts and another group of Call Type.  In the report they wanted to show the number of resolved calls and the percentage of each call type.

Dashboards and charts were not really used for this because this was a report rather than a visual graph.  I am a big fan of charts and dashboards but one aspect that makes them a harder sell is the dashboards and charts cannot be scheduled and can’t be exported from CRM without doing a print screen (or I haven’t found a way to do this yet, please comment if you know how)

I was able to run the report in Excel PowerPivot, although it took me a while to work out why I couldn’t group the date by month (as seen in many Google searches on the subject).  If you cannot group/format a date in excel to month this is probably because there are some blanks in the date field, if you fill in this blanks you will then be able to format the date by month.

The excel PowerPivot report looked very good and has the advantage of being self sufficent.  What I mean by this is once you have saved the Excel report onto your hard drive you can run the report from your machine without opening CRM and the reason you can do this is because you can refresh the data within Excel.

I think excel is a really useful tool because you can also view the individual lines behind the graph, so it does give you a bit of drill down in basic terms.

I do find some users don’t view reports in Excel very highly and almost don’t see this as a legitimate solution to their reporting needs.

 

I tried to write the report using FetchXML, this does make writing reports quite simple because all you need to do is create the correct advanced find and then download the fetchXML.  The problem I had with this method was all the grouping had to be done then in the report.  My SRS reporting skills are not great and I couldn’t really get round the problem of the report displaying every line, e.g. every call, I didn’t want this I wanted a summary count of the different call types.

Searching around I found you can group one item in a fetchXML.

The other solution is using SQL and doing selects from Filteredlists.  The reason it’s good practise to use filtered lists is these lists automatically add the CRM security to the selects as if you are viewing the records in CRM.  It can be a bit slower and some reports don’t need to worry about security if you are showing summary values and not individual records.

The benefit of creating an SQL report is you can group the data in the SQL statement and use the report to just show the data.

The downside to using SRS is it’s hard to use and formatting the report can be a puzzling and time consuming practise of trial and error.

I really wish Microsoft would supply an easy to use reporting system on the same lines as the dashboards and charts.  Reporting is one of the key areas for CRM, useful reports can help get support for a CRM project from the key decision makers.

My hope is the Sharepoint/SQL Server 2012 new reporting tools are very good and if they are not then Microsoft should buy a company which has already developed a reporting tool.

 

So in the end I did the report in Excel PowerPivot and a version in SRS reports using an SQL statement I wrote.

CRM 2011 – Creating Custom Reports with Bids

I have been dipping my toe into the world of custom reports and trying out the new Bids extension which allows you to create reports using FetchXML.

This is a great because you can do an advanced find in CRM 2011 and then download the fetchXML from this and use is as your datasets

For a great run through in creating your first Custom Report you should use this step by step walkthrough

http://blogs.msdn.com/b/crm/archive/2010/10/26/how-to-creating-custom-report-with-microsoft-dynamics-crm-2011-bids-fetch-extension.aspx

I also found this article which is very good

Getting start with Fetch xml reports in CRM 2011

I will admit to having difficulties in setting up the Datasource, I didn’t understand what I was meant to put in and if you are just trying to do it without the walk through above it’s baffling because it doesn’t really prompt you or indicate what you should put in

  1. Select Microsoft Dynamics CRM Fetch for type and fill in the connection string in the following format: ServerURL;OrganizationName;HomeRealmURL
    1. only ServerURL is required, this would be the url to your CRM server like:https://someserver.crm.dynamics.com
    1. The optional OrganizationName should also be included if you have multiple CRM environments, it will use the first organization otherwise – you will find this value within the Developer Resources area in the CRM client located within Settings > Customizations (refer to the red mark).
    2. The HomeRealmURL, also optional, it will be a registry value from HKLM\SOFTWARE\Microsoft\MSCRMBidsExtensions\HomeRealmUrl
I don’t know why you would need to put in the HomeRealmUrl?
This is what I had to put in
the first part is my CRM url and the second part is the organisation Name.  you can find this in the developer resources which are held in
SETTINGS/Customizations/
and then under Organisation Unique Name
This all seemed like a lot of effort, why could we just paste in the server url with the organisation in it.
Using FetchXML involves a lot of downloading and opening files and then pasting the contents into reports.  It’s a pity that CRM doesn’t offer you the option to save the fetchXml to the clipboard so you could then just paste it into report designer.
I still haven’t got the custom reports working, it’s giving me some kind of permissions error perhaps.  My first experience with the Bids reporting is it’s a good work around from Microsoft and I will give them some credit for that but it does feel like a workaround.  Things are not quite as smooth as they should, the process of doing an advanced find, then downloading it, opening it, changing the alias information and then copying it into SSRS.
Making a report in SSRS is slow process and I think this is an area Microsoft need to spend some time improving.

CRM 2011 – video on reporting using fetch xml

I saw this video from Microsoft about reporting in CRM 2011.  I was interesting to see the new ability to create reports based on Fetch Xml.  I also really liked the button to retrieve the fetch xml button on an advanced find.

This functionality will mean it will be easier for people to create reports because they get the contents using an advanced find.

The video is 10 minutes long but this is time well spent because they walk through making a report from scratch.