How To Hide Some Fields When Printing Sales Register Report

Hello,

If I print Sales Register Report, then all fields in the report are shown (see image below). I want to hide unnecessary fields when printing so I can print it in portrait. I set report/print hide via Customize form but the fields still appears???

Later I see on Account Receivable/Payable Report, when click on print then it shows as below. It seemed it uses pre-defiend template design? Only certain fields are shown…

How to set Sales register report like this? How to hide unused fields when printed?

Tks

https://frappe.github.io/frappe/user/guides/reports-and-printing/print-format-for-reports.html

I created a html template for Sales Register report but it doesn’t show Total Row?? How to get Total Row to be appeared?..here’s the html template:

<!--<div style="margin-bottom: 7px;" class="text-center">
	{%= frappe.boot.letter_heads[frappe.defaults.get_default("letter_head")] %}
</div>
-->

<style>
	.print-format table, .print-format tr, .print-format th, 
	.print-format td, .print-format div, .print-format p {
		font-family: Helvetica;
                font-size: 100%;                
		vertical-align: top;
	}
	
</style>

<h4 class="text-center">{%= __(report.report_name) %}</h4>
<h5 class="text-center">
	{%= dateutil.str_to_user(filters.from_date) %}
	{%= __("s/d") %}
	{%= dateutil.str_to_user(filters.to_date) %}
</h5>
<hr>
<table class="table table-bordered">
	<thead>
		<tr>
				<th style="width: 20%">{%= __("Invoice No") %}</th>
				<th style="width: 15%">{%= __("Posting Date") %}</th>
				<th style="width: 25%">{%= __("Customer") %}</th>
				<th style="width: 20%">{%= __("Grand Total") %}</th>
				<th style="width: 20%">{%= __("Outstanding Amount") %}</th>
			
		</tr>
	</thead>
	<tbody>
		{% for(var i=0, l=data.length; i<l; i++) { %}
			<tr>
				{% if(data[i][__("Posting Date")]) { %}
					<td>{%= data[i][__("Invoice")] %}</td>
					<td>{%= dateutil.str_to_user(data[i][__("Posting Date")]) %}</td>
					
					<td>{%= data[i][__("Customer Name")] %}</td>
					<td style="text-align: right">{%= format_currency(data[i][__("Net Total")]) %}</td>
					<td style="text-align: right">{%= format_currency(data[i][__("Outstanding Amount")]) %}</td>
				{% } else { %}
					<td></td>
					<td></td>
					<td></td>
				
					<td></td>

				{% } %}
			</tr>
		{% } %}
	</tbody>
</table>
<p class="text-right text-muted">Printed On {%= dateutil.str_to_user(dateutil.get_datetime_as_string()) %}</p>

I looked at a sample from Account Receivable.html. But looks there’s no codes to add total row, but the total does appear on html print view. How to get this appeared? Anybody know pls?

I already checked Add Total Row for the report…

@jof2jc you can sum the values while you loop in js

Link down[quote=“rmehta, post:2, topic:8631, full:true”]
https://frappe.github.io/frappe/user/guides/reports-and-printing/print-format-for-reports.html
[/quote]