We help IT Professionals succeed at work.
Get Started

shared formula in crystal report

PNKJ asked
Last Modified: 2008-07-14
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.

Watch Question
Senior Consultant
Most Valuable Expert 2011
Top Expert 2013
This problem has been solved!
Unlock 1 Answer and 4 Comments.
See Answer
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

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

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

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE