I'm new to LaTeX and this forum. I hope I can formulate the question well enough.

My document class is scrreprt, so it's one-sided, but I want to have the section in the left part of the header and the chapter in the right part on every page, with this code the output is the chapter in both cases and I want to have a headsepline under the header.

And I read that in one-page documents only right pages exist for LaTeX and every page is then considered odd. Shouldn't it be possible to write \ihead{\leftmark} for example? And here's my code so far:

\usepackage{scrlayer-scrpage}
\automark[section]{chapter}
\clearpairofpagestyles
\cfoot[\pagemark]{}


I hope you can help me!

Maybe the following helps:

\documentclass{scrreprt}
\usepackage{blindtext}% only for dummy text

\usepackage[
automark,
autooneside=false,% <- needed if you want to use \leftmark and \rightmark in a onesided document
]{scrlayer-scrpage}
\clearpairofpagestyles