How to share variables in Crystal Reports

Asked

Viewed 3,126 times

-1

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

How do I do this?

  • 1

    Try to give more details of your problem...

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 on a hierarchical level higher than the sub-report.

Then, inside your sub-report, create another formula to consume it (also with Basic Sintax):

shared variavel as string

variavel = variavel + " de variavel compartilhada"

formula = variavel

For the first formula not to appear just mark as Suppress.

The result within your sub-report should be "shared variable test".

Browser other questions tagged

You are not signed in. Login or sign up in order to post.