I have to report weekly on the number of documents being stored in one of our document libraries. My manager wants the headline figures:
- Total number of files stored
- Average file size
- Total file size
Until today I have been able to provide these with a custom view. When I tried to run the report this morning I got an error with a correlation ID. I tracked this in the error log and found the following error:
System.Data.SqlClient.SqlException (0x80131904): Arithmetic overflow error converting expression to data type int.
I've figured out that the total file size has gone over 2,147,483,647 bytes. Is there a way that I can recast the file size field as a
bigint or is there a better way to report these figures?