Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How can i return the Formula name from crystal Report 9 into VB6

Posted on 2006-03-29
3
Medium Priority
?
303 Views
Last Modified: 2010-04-17
Dear All,

I am passing a text value to a formula in Cry report 9.

   Mireport.FormulaFields.Item(3).Text = frmLogin.MUsername

It works Fine.

The problem is i have many reports. The index for the formula (LUserName ) does not have the
same index in all the reports.

I wish to send the formula value using the name of the formula and not the item(?).

Pl.:)
0
Comment
Question by:Gururagguru
1 Comment
 
LVL 2

Accepted Solution

by:
zeus40 earned 1000 total points
ID: 16322788
In my limited knowledge of Crystal 9 and reading your dilemma, I assume that Crystal 9 does not have strongly typed formula indexes to names.
Therefore, you will have to use the exact index of the formula you are needing.

You have a choice of leaving it as is or to solidify the interface contract by using an enum.

'Declare an enum

Public/Private/Friend Enum iFormula
  Formula0Name = 0
  Formula1 = 1
  Formula2 = 2
  LoginName = 3
  Formula4 = 4
End Enum

So in your procedure

You could write:

   Mireport.FormulaFields.Item(iFormula.LoginName).Text = frmLogin.MUsername


You can also use subs or functions to increase the contract coupling.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
Six Sigma Control Plans

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question