Skip to main content
Question

The sub report parameter works only after the sub report be triggered

  • January 19, 2021
  • 3 replies
  • 544 views

Forum|alt.badge.img+6

Hello,

      I’ve studied the article, but I do meet a issue. 

     I write a sub report, and want the sub report be displayed only when it is having count(lines)>0

        Per my test, only when the subreport be trigger at least once, will the

         subReport1_Count having value.

 

        Like below

 

3 replies

meganfriesen37
Captain II
Forum|alt.badge.img+12

I usually do this as a variable in my sub report to count the number of records there.  Then in the main report, under the Visible Expression I call my sub report variable 


Forum|alt.badge.img+6
  • Author
  • Captain II
  • January 27, 2021

@meganfriesen37 
Thank you for helping me with this.
Yes, I also add the variable in my sub report to count the number of records
and also I call sub report in main report

 

My problem is:

$subReport_count will not have value, if I’d like to use it to determine the visibility  of the first call

I can use it, for the second call

 

So I make the first section invisible all the time, and using the first time’s result to control the second section.

it is working, but can I do it within 1 call?


Forum|alt.badge.img+6
  • Author
  • Captain II
  • June 10, 2021

Hello, 

      Did somebody else meet this same kind of issue?
      It is a little bit frustrated if I have to call sub report twice, 

     The first time to get the varible be set value.
      Then, use the frist time’s result to control the the second time’s visibility.