I have a main report and subreport. It is linked with exp_vchr_id. It is working fine. Executing each row level for each exp_vhr_id and populating data.
However I need to modify sub report to pass a parameters in to it like p_elemet1,p_element2 this is creating a problem for me.
After I merged my subreport into my main report, when I ran report I am entering values for p_elemet1,p_element2, then subreport data is showing wherever it matches with parent exp_vchr_id and all other rows I am displaying only parent data not subreport data.
What I wanted to do now is I wanted to suppress parent row whenever no data found from the subreport.
Here is what I did:
1. Created a shared variable in sub report as:
Formula Field (v_code_blk)
whileprintingrecords;
shared Stringvar v_gl_code_blk := rtrim(ltrim({exp_vouchr_itm.gl_code_blk}));
2. Used that variable in main report as:
Created a formula field as
whileprintingrecords;
shared Stringvar v_gl_code_blk
3. In details section where my main repot data and subreport data is located, selected Section Expert open the X-2 for Suppress(No Drill-Down) formula, and coded as follows
if IsNull({@v_code_blk}) then true else false
but it is not suppressing.
If I change code like this (reverting true false)
if IsNull({@v_code_blk}) then false else true then it is working and suppressing all the rows.
I need a help!
-nb
However I need to modify sub report to pass a parameters in to it like p_elemet1,p_element2 this is creating a problem for me.
After I merged my subreport into my main report, when I ran report I am entering values for p_elemet1,p_element2, then subreport data is showing wherever it matches with parent exp_vchr_id and all other rows I am displaying only parent data not subreport data.
What I wanted to do now is I wanted to suppress parent row whenever no data found from the subreport.
Here is what I did:
1. Created a shared variable in sub report as:
Formula Field (v_code_blk)
whileprintingrecords;
shared Stringvar v_gl_code_blk := rtrim(ltrim({exp_vouchr_itm.gl_code_blk}));
2. Used that variable in main report as:
Created a formula field as
whileprintingrecords;
shared Stringvar v_gl_code_blk
3. In details section where my main repot data and subreport data is located, selected Section Expert open the X-2 for Suppress(No Drill-Down) formula, and coded as follows
if IsNull({@v_code_blk}) then true else false
but it is not suppressing.
If I change code like this (reverting true false)
if IsNull({@v_code_blk}) then false else true then it is working and suppressing all the rows.
I need a help!
-nb