Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to add Value from subreport in main crystal report formula
    primarykey
    data
    text
    <p>Below Is My crystal report structure (shown in Image) ,I am using below formula to get <code>Fee Total</code></p> <pre><code>If{DataTableDoctorInfo.Fee_Unit}="Percent" Then formula = ({DataTableDoctorInfo.Fee}/100)*{DataTable1.Number of Patient} Else formula={DataTableDoctorInfo.Fee}*{DataTable1.Number of Patient}* Sum ({DataTableDrmonthlyData.Payable Amount}) End If </code></pre> <p>now I also want to add sub total In my formula which i am getting In my <code>subreport</code> from column having <code>sum</code> of that column values ,Now I want to use this sum in above formula something like this </p> <pre><code> formula = ({DataTableDoctorInfo.Fee}/100)*{DataTable1.Number of Patient}* {that sum value which I am getting in sub report} </code></pre> <p><code>DrMonthlySubRepoPatient</code> is My sub report shown in image in <code>section 3</code> ,How I can achieve this ? I tried this code in <code>Main report</code> formula of FeeTotal </p> <pre><code>WhilePrintingRecords; Shared CurrencyVar myTotal; myTotal :=myTotal; If{DataTableDoctorInfo.Fee_Unit}="Percent" Then formula = ({DataTableDoctorInfo.Fee}/100)*{DataTable1.Number of Patient}* myTotal Else formula={DataTableDoctorInfo.Fee}*{DataTable1.Number of Patient}* Sum ({DataTableDrmonthlyData.Payable Amount}) End If </code></pre> <p>and this formula in subreport fo Payble amount field</p> <pre><code>WhilePrintingRecords; Shared CurrencyVar myTotal := Sum ({DataTableDrmonthlyData.Payable Amount}) </code></pre> <p>but its giving following error,How do I resolve it?</p> <pre><code>`The remaining Text does not appear to be part of the formula ` </code></pre> <p><img src="https://i.stack.imgur.com/PBv8s.png" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload