BT_Eng
August 3, 2021, 10:54am
1
Dear all ,
I am in need of your suggestion.
lets say i have two doctype (A and B);
Now i wannan build report in jinja under A doctype:In report i wanna pull filed from the doctype B.
I am little confuse and i need your help bot link or in a comment form
Thank you
Hello,
You mean the Print Format for Reports or the Print Format ?
The Print Format for Reports uses a different templating
engine, which means that the data it can display are what’s only being fed to it. (E.g. the returned data from [report].py
that you have)
If you mean Print Format , you can use some of frappe methods. You may want to check this out:
{%- from "templates/print_formats/standard_macros.html" import add_header -%}
<div>
{% set gl = frappe.get_list(doctype="GL Entry", fields=["account", "party_type", "party", "debit", "credit", "remarks"], filters={"voucher_type": doc.doctype, "voucher_no": doc.name}) %}
{%- if not doc.get("print_heading") and not doc.get("select_print_heading")
and doc.set("select_print_heading", _("Sales Invoice")) -%}{%- endif -%}
{{ add_header(0, 1, doc, letter_head, no_letterhead, print_settings) }}
<div class="row margin-bottom">
<div class="col-xs-6">
<table>
<tr><td><strong>Customer Name: </strong></td><td>{{ doc.customer }}</td></tr>
<tr><td><strong>Due Date: </strong></td><td>{{ frappe.utils.format_date(doc.due_date) }}</td></tr>
<tr><td><strong>Address: </strong></td><td>{{doc.address_display}}</td></tr>
<tr><td><strong>Contact: </strong></td><td>{{doc.contact_display}}</td></tr>
Regards,
Ivan
BT_Eng
August 4, 2021, 10:45am
3
Dear sir,
Thank you for the response,
I mean like I have two doctype A and B
I will have have report for A and report for B as well
I want merge both report A and B…So that i dont have to jump from a A to B or B to A…
Thank you
Hello,
How about making a new report and get the results from both reports, and after that, append their data?
Regards,
Ivan
BT_Eng
August 5, 2021, 9:36am
5
Thank you…I am trying in that way for now…I am little to frappe google wasnt enough for me
THANK YOU SO MUCH
1 Like
Any idea how to do this @iRaySpace
@BT_Eng were you able to solve this?
how can we make 2 different reports and append the data ? have you found any solutions to this ?