We help IT Professionals succeed at work.

# shared formula in crystal report

on
548 Views
Hi, I am struggling with formula to pass information from sub report to main report's footer section
In my main report I display all regions and world total and in the sub report all leading 35 countries along with world total which is suppressed.  I used the Rank formula to rank the main and sub report seperatly using function rank1 for main report and rRank2 for the subreport
Global RowNumber As Number
RowNumber = RowNumber + 1
Formula = iif(RowNumber -1 = 0, "-", StrReverse(mid(StrReverse (Cstr(RowNumber -1)),4)))
so for the world total it displays - and for the rest of the section 1234 and so on

Now at the end of my report I want to add market ratio
first line should be :    first row of the subreport displayed (canada here) where rank is 1 divided by world total which can be first line from main report  with rank - or partnerCode = WT for each year displayed

World total is also the first row in subreport before canada but is suppressed
2nd line :    sum 0f top 4 lines from subreport /world total * 100
3rd line sum of top 8 lines/world total * 100

I keep getting error when I try to write the formula with shared variable
crystal or basic syntax both are fine.

Comment
Watch Question
Senior Consultant
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2013
Commented:
This problem has been solved!
###### Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

Deciding to stick with EE.

Mohamed Asif

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant