This document already has a ‘ DocumentElement ‘ node

I faced this exception while trying to generate a xml document programmatically in C# using XmlDocument and XmlElement.

I didn’t know what was going on, and then I figured out that I was adding multiple elements to the XmlDocument. To solve this, add a “root” element to XmlDocument and then add multiple child elements within the root. The XmlDocument is supposed to only contain 1 child element as expected in XML.

Slow Gradle build time in Android Studio when using libGDX

Follow the SO answer: http://stackoverflow.com/a/35859572/5539403

In Android Studio go to File -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle

Check the ‘Offline work’ under ‘Global Gradle settings’

However, if it Gradle needs to get libraries from the Internet, turn off ‘Offline work’ and run it for first time, then turn the option on to speed up build process.

Creating additional series from same table column for Line graphs in SSRS

I spent quite a lot of time experimenting to be able to do this.

Say you have a table like so

KPI        Value    Date

Temp      34        …

Press      12         …

 

And you would like to have 2 lines in the line graph, one for temperature, one for pressure, the series for pressure may use the secondary y axis. The series for pressure may use a totally different chart type(column).

To do this, don’t add KPI as a series group, add Date as a category group and add Value twice as values.

for the first Value, use IIf(Fields!KPI.Value = “Temp”, sum(Fields!Value.Value, Nothing).

for the second Value, use IIf(Fields!KPI.Value = “Temp”, sum(Fields!Value.Value, Nothing).

Configure the second value to use secondary y axis and you’re done.