Hi,
Try the following code
<odoo>
<data>
<template id="report_saleorder2">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="doc">
<t t-call="sale.report_saleorder_document" t-lang="doc.partner_id.lang">
<t t-set="bg" t-value="True"/>
</t>
</t>
</t>
</template>
<template id="quotation_with_background_data_document" inherit_id="sale.report_saleorder_document">
<xpath expr="//div[hasclass('page')]/div" position="before">
<t t-if="condition">
</t>
</xpath>
</template>
</data>
</odoo>
If you define a variable inside a t-call, It will be available inside the template being called, so you pass data from the template call other than from report, this is possible because sale order calls one template from the main template, if it has only one template in level, we may need to find some other way.
Regards