[Tex/LaTex] Remove automatic page break after paragraph

reportsectioningsections-paragraphs

i'm using the report class and have set the section depth to 5 using the following command:

\setcounter{secnumdepth}{5}

However, when I use the \paragraph{} section, the compiled pdf adds a page break before the next section.

enter image description here

How can I get rid of this page break?

Example:

\paragraph{example section}~\\ \indent
example phrase

edit 02/29/16
It was brought up that the code posted does not produce the same result. So here's the code:

\documentclass{report}

% Set paper size
\usepackage[letterpaper]{geometry}

% This sets up the header.
\usepackage{fancyhdr}

% Indent first paragraph of each section
\usepackage{indentfirst}

% Adding pictures
\usepackage{graphicx}

% Provides unnumbered equations
\usepackage{amsmath}

% Number citations based on position in text and not TOC, LOF, LOT, LOE
\usepackage{notoccite}

% Common text symbols
\usepackage{textcomp}

% url and section linking support
\usepackage[colorlinks=true,linkcolor=black,anchorcolor=black,citecolor=black,filecolor=black,menucolor=black,runcolor=black,urlcolor=black]            {hyperref}

% Section levels
\setcounter{secnumdepth}{5} % depth of sections/paragraphs
% \setcounter{tocdepth}{5}  % depth of table of contents

% Acronym package
\usepackage{acro}
\acsetup{first-style=short}

% include pdfs
\usepackage{pdfpages}

% Properly format code
\usepackage{listings}
\usepackage{color}
\usepackage{courier}

\pagestyle{fancy}

\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                                {-3.25ex \@plus1ex \@minus.2ex}%
                                {1.5ex \@plus .2ex}%
                                {\normalfont\normalsize\bfseries}}

\makeatother
\begin{document}
...
\subsubsection{CRS Safety}
\subsection{Previous Team's Project}
\section{Biometrics}
\subsection{Detecting the User State}
\subsubsection{Electrical Activity in Skeletal Muscles}
\paragraph{Muscle Control of Lower Limb Movement in Transfemoral Amputee}
that when i type for a paragraph

...
\end{document}

Here is the result:
enter image description here

I don't mind that the text starts on the same line as much as that there's now a page break after the paragraph.

Best Answer

The posted code does not produce the image shown (example phrase comes on the next line) Nor does it allow a page break, the code below shows

enter image description here

If you reduce the page height by one line, by changing

\addtolength\textheight{-9\baselineskip}

to

\addtolength\textheight{-10\baselineskip}

The whole of the \paragraph section, including its heading moves to the next page.

\documentclass{report}

\setcounter{secnumdepth}{5}
\addtolength\textheight{-9\baselineskip}
\begin{document}

\chapter{zzz}
Z

ZZ

ZZ

\section{aaa}
A

AA
\subsection{bbb}
B

BB
\subsubsection{qqqqqqq}
Q

QQ

\paragraph{example section}~\\ \indent
example phrase

EEE1

EEE2
\end{document}

However you should never use a construct such as ~\\ \indent You should just use \paragraph as you would use \section. If you need to make it into a display heading, adjust its definition using \@startsection

\documentclass{report}

\setcounter{secnumdepth}{5}
\addtolength\textheight{-9\baselineskip}
\makeatletter
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                                    {-3.25ex \@plus1ex \@minus.2ex}%
                                    {1.5ex \@plus .2ex}%
                                    {\normalfont\normalsize\bfseries}}

\makeatother
\begin{document}

\chapter{zzz}
Z

ZZ

ZZ

\section{aaa}
A

AA
\subsection{bbb}
B

BB
\subsubsection{qqqqqqq}
Q

QQ

\paragraph{example section}
example phrase

EEE1

EEE2
\end{document}