How to share variables in Crystal Reports [closed]

-1

I have a variable in my report and would like to use it in a sub-report.

How do I do this?

    
asked by anonymous 19.02.2014 / 19:53

1 answer

3

You can create a variable within a formula as follows (using Basic Syntax):

shared variavel as string

variavel = "teste"

formula = variavel

Do not forget that this formula should be at a higher hierarchical level than the sub-report.

Then, within your subreport, create another formula for consuming it (also with Basic Syntax):

shared variavel as string

variavel = variavel + " de variavel compartilhada"

formula = variavel

To make the first formula not appear, just mark it as Suppress .

The result within your subreport should be "shared variable test."

    
19.02.2014 / 20:35