There are two things one should remember while using the wrapfigure.
- The page breaks should be taken care of manually.
- The correct placement options
{R} or {r} should be used.
In your case, the figure comes at the end of a page and you are allowing latex to float it (by using {R}). That is why the figure goes to the top. When we change it to {r} (means exactly here) we get,
........
til samme server/data. En anden grund var også at vi ikke har brugt MySQL ret meget hvilket vi begge gerne ville, for at lære at bruge det. Dog var det ikke noget specielt krav.
\begin{wrapfigure}{r}{10cm}
\centering
\includegraphics[width=9cm]{example-image-a}%{./pictures/planning}
\caption{Complet Soma Database}
\label{fig:databaseComplet}
\end{wrapfigure}
\section{Database opbygning.}\label{sec:databaseopbygning}
Databasens opbygning har ændret sig meget fra start til slut. Fra start af var databasen
..........
Now the worry is about page break. We place the
\begin{wrapfigure}{r}{10cm}
\centering
\includegraphics[width=9cm]{example-image-a}%{./pictures/planning}
\caption{Complet Soma Database}
\label{fig:databaseComplet}
\end{wrapfigure}
inside the section \section{Database opbygning.}\label{sec:databaseopbygning} like:
.....
\section{Database opbygning.}\label{sec:databaseopbygning}
%
Databasens opbygning har ændret sig meget fra start til slut. Fra start af var databasen meget stor, og en smule indviklet at overskue. Men efter flere omstruktureringer blev databasen, mere simplere og mere overskuelig og derved også nemmere at arbejde videre på, men også mere effektiv. Grunden til der er lavet 2 databaser til brugere. Er at den ene database som indholder login oplysninger, på senere tidspunkt skal kunne bruges til flere systemer og ikke kun The Soma Project. Vi har så valgt at når du opretter en bruger i databasen, er der en trigger på User tabellen som automatisk går ind op opretter brugeren
%
\begin{wrapfigure}{r}{10cm}
\centering
\includegraphics[width=9cm]{example-image-a}%{./pictures/planning}
\caption{Complet Soma Database}
\label{fig:databaseComplet}
\end{wrapfigure}
%
i login databasen, så man derved kun skal oprette brugen et sted og triggeren så tager sig af resten. \newline
Grunden til vi prøver at holde designet simpelt er både pga. at den er nemmere at overskue og
.......
we get:

which is the desired placement.
Conclsions and notes
- When you use
wrapfigure, generally you don't mean it to float.
Hence, use smaller case placement holders like r and l....
- The code should be placed at appropriate place in your .tex file so that it takes care of the page breaks (you should do it manually).
- What we need here is the Minimum (non)Working Example. We don't expect you to put your entire code given as a link. Please try to reduce your code to the minimum and try to post it here in this site. Now your code had graphics and other
\incude... files which we could not compile. If a MWE is given here, it will be easy for those who try to help you out of the problem.
{figure}[b]notwrapfigurewhich is for wrapping text around the image. – Martin Scharrer♦ May 27 '12 at 11:04Rtor? Capitals makes the image to float. – Fèlix Galindo Allué May 27 '12 at 15:11