You can use
scrlfile from KOMA-script.
That gives me the following
scrlfile.sty 2012/06/15 v3.12 KOMA-Script package (loading files)
ltxdoc.cls 2007/11/11 v2.0u Standard LaTeX documentation class
report.cls 2007/10/19 v1.4h Standard LaTeX document class
size10.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
doc.sty 2010/02/04 v2.1e Standard LaTeX documentation package (FMi)
multicol.sty 2011/06/27 v1.7a multicolumn formatting (FMi)
Unfortunately, as soon as a
\maketile command is run, everything breaks. There is a pretty simple reason for that.
ltxdoc loads the package doc as well, which is redefining
maketitle. This way, you can use multiple titles in one document (according to the documentation of doc). Loading package
titlepage lets the error dissappear. But there is one drawback: The command
\maketitle isn't doing anything now.
But: You can save the original definition of maketitle (by the
report class) and later (after
doc is processed) you can restore it.
If you want to do this is for you to decide.
By the way:
\BeforePackage is also provided by