Personal in my project I use MVC, in the front end I use angular / html / js, etc. I need to print a report, what is the best way to do it? which tools to use?
I tested it using this code:
$scope.printReceita = function () {
document.getElementById('btn1').onclick = function () {
var conteudo = document.getElementById('receita').innerHTML,
tela_impressao = window.open('about:blank');
tela_impressao.document.write(conteudo);
tela_impressao.window.print();
tela_impressao.window.close();
};
}
But I'm having difficulty with the following situation, I have this h3:
<h3 ng-show="cons_obs.length > 1"> Observações</h3><br />
Even if the variable cons_obs.length is == -1, "Remarks" appears in the printout.
I imagine you have some form / tool that is most appropriate.