Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shared variables in the record selection formula editor

Status
Not open for further replies.

DataHog

Programmer
Sep 17, 2002
3
US
Can you use shared variables in the record selection formula editor?

I have a Amount in the main report and a Paid in the subreport and want to print out only the ones that are not equal sorted by a Code.

In the record selection editor I used the following formula:
{EMCHD.HD_EMC_CD} = {?Code}
and
WhilePrintingRecords;
Shared NumberVar DiffAmount <> Shared DiffPrice
ClaimsPrice

Phillip
 
You can't use a while printing records in the record selection criteria, but hopefully you don't need it.

If you want to show in the subreport only those rows where DiffAmount <> Shared DiffPrice, perhaps you can just use this as the suppression criteria within the subreport sections as opposed to the record selection criteria.

-k kai@informeddatadecisions.com
 
The other choice is if you can get the same value in a regular formula (default is WhileReadingRecords) and pass that via &quot;Sub Report Links&quot; to the subreport. Then you can use it in a subreport record selection.

An example in CR8 where you couldn't pass a multi value string parameter to a subreport.

Formula in main report
Join({?region},&quot;|&quot;)

Link formula to a parameter in the subreport
Then in the report use a record selection formula of
{table.field} = split({?linkedparm},&quot;|&quot;)
Editor and Publisher of Crystal Clear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top