Look ahead
Hi,
I am reposting this question in this section because I didn't get a response
when I posted in the subreport section.
I am using RB 7.04.
In a subreport, I have a string variable located in the Group Header where
the lookahead property is set to True. I am trying to set the variable in
the Detail before print event. The variable is coming out blank.
I tried to reproduce this logic in the main report, and everything works.
It stops working as soon as I put it in a subreport. Is there something
about a subreport that's preventing me from doing this? Is the subreport a
2 pass report?
Thanks,
Yelena
I am reposting this question in this section because I didn't get a response
when I posted in the subreport section.
I am using RB 7.04.
In a subreport, I have a string variable located in the Group Header where
the lookahead property is set to True. I am trying to set the variable in
the Detail before print event. The variable is coming out blank.
I tried to reproduce this logic in the main report, and everything works.
It stops working as soon as I put it in a subreport. Is there something
about a subreport that's preventing me from doing this? Is the subreport a
2 pass report?
Thanks,
Yelena
This discussion has been closed.
Comments
Please check my answer to your previous question... it seems like the same
issue. When you place a Variable inside a subreport and use its OnCalc
event to update another variable in the main report you will need to create
a global var that more or less links the two or else you will have no access
to the objects inside the main report.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I think you are misunderstanding what I'm trying to do so I will try and
explain it again.
First of all, I am only using one variable - located in the group header.
Second, I am not using the OnCalc event, the code for setting this variable
is in the Detail After Print event. I am reseting the variable on the Group
End. Also, the variable and the code I'm using to set the variable are in
the subreport. I am not trying to go between the main report and the
subreport.
The problem is that the Variable in the group header is coming out blank
when I know for sure that it's supposed to be displaying something.
Thanks,
Yelena
Sorry, in your previous post you gave the code in the OnCalc event of one of
your variables so I assumed this was the same code. I'm unsure why you are
experiencing this behavior and I am unable to recreate it on my machine. I
posted the test template I am using to try to recreate the issue below. If
possible, please alter (or create a new one) the example so that I can see
this behavior on my machine and send it in .zip format to
support@digital-metaphors.com.
http://www.digital-metaphors.com/tips/Vartest.zip
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
variable value. The last record's value is different then every other
value. In your example, you only have one detail record and the value is
always the same. Can you please try it with multiple details, with
different values.
Thanks,
Yelena
Please create a simple example or alter the one I posted so that it
recreates the behavior you are experiencing and send it in .zip format to
support@digital-metaphors.com.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
explains it better.
Thanks,
Yelena
This question is being handled through email.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com