1 Answer
1

Here is the solution I propose.
I added use of package lastpage to have the last page number automated.
I changed the package graphics to graphicx to have the functionnalities I use to dimention your logo.
This code replaces what you have given.

Since you're new to latex, I decided to make it a little easier. You now sould have only to modify the first few lines after package loading

Samuel, I used your code, but Lyx seems to fall in some sort of loop.
I changed your MyLogo.ext to logo.png, is that the right thing to do?

Mylogo.ext should indeed be replaced by a path to your logo :

It can be an absolute path starting from the root of your system (c:/.../logo.png).

It should however preferably be a relative path originating from the folder where your .texfile belongs to, so that if you move all of this, it will still compile.

For exemple, if the image you want to use is named logo.png and is in the subfolder images/ of the folder where your .tex file is located, you should have the line

\def\MyLogo{images/logo.png}%

Also note that before all of this, you should have declared the document class you use.
For example, in the file I used to try this, I have used a report document class.

\documentclass[10pt,a4paper,titlepage,oneside,onecolumn]{report}

Finally, after this header, you should have your \begin{document} followed by the document itself.
For example in my test document

\begin{document}
test
\end{document}

To conclude, I am not able to test this under Lyx since I use a combination of Miktex 2.9 and Texmaker, but I am sure someone who uses it will be kind enough to confirm whether it works or not.

Maybe one very last thing to lote is that I use Lualatex. Since there is some non-strictly ASCII characters in the exemple, it could have an incidence (even though I don't really think so).
Maybe try to remove the ñ in a first step to make sure it's not the cause of any problem.

Final Solution

After checking everything as sugested by Samuel Albert, I ended trimming the code due to replicated info. The ñ character wasn´t relevant due to LyX configuration, but other parts of the code were. The following code worked:

Samuel, I did some corrections to your code for it to work. It seems that Lyx can create TeX files from it's files and i created such one, then checked for replicated declarations and that's how I was able to make it work, i'll next post the solution, how can i Credit you for you enormous help?
–
AperezCAug 16 '12 at 21:59

@AperezC At the top of and to the left of the answer the Samuel gave, there is an arrow pointing up and an arrow pointing down with a number between them. To indicate that Samuel gave a good answer, you can click on the arrow that points up (an "upvote"). Below these there will be a checkmark, by clicking the checkmark you will indicate that Samuel has answered your question. Both of those actions, upvoting and accepting, will add to Samuels reputation and give him credit for his effort.
–
Scott H.Aug 16 '12 at 23:13

@AperezC Thanks for your corrections. As Scott said, the way in here to reward people for answering is upvoting and marking the answer as being correct. This is also a way to indicate for people that would want to answer a similar question that this was the correct answer to your problem and that it was a quality answer. You should also maybe remove the answer you posted when you could not comment, as it is not relevant anymore.
–
Samuel AlbertAug 16 '12 at 23:19

Sorry to bother you again @AperezC , but could you please check the tickmark under the voting arrows (if you don't see where it is, see for example here link. It will mark it as the accepted question and credit me for it in the process. Thanks in advance.
–
Samuel AlbertAug 17 '12 at 21:09

Done Samuel. Awful days at work. I'll be posting one issue found for this solution, image is a little off-center to the right; if it can be solved, magnificent.
–
AperezCAug 17 '12 at 23:38