×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

CRW32 4.6.1 doesnot clear the Formulas(x) array.

CRW32 4.6.1 doesnot clear the Formulas(x) array.

CRW32 4.6.1 doesnot clear the Formulas(x) array.

(OP)
Helo.

I made 2 reports for a visual basic 5.0 aplication. Let say
report 'A' and 'B'. Report 'A' does not have any formula, but report 'B' does. I run both reports using code with only one crystal.ocx objet in my form. The first time  I call report 'A' and print it to a window the report works right then i print report 'B' (with the formulas) and works fine too. But if try to print report 'A' again i have a runtime error (20510) "Invalid Formula Name". I'm thinking that thing is when i pass from report 'B' to 'A' Crystal Report is searching for formulas from report 'B' that were not cleared. I'm right?. is there other solution rather than put another Crystalreport object in my form?.

Thanks for any help that may come from you.    

RE: CRW32 4.6.1 doesnot clear the Formulas(x) array.

Dear Vimatogo,

Here's how I normally do it,
1. create i CReport object at main screen,
2. do a global function at module as follow :

Function PrintReport() As Boolean
   mMain.MousePointer = vbHourglass
   mMain.CReport.ReportFileName = RptPath + RptName ' report name
   mMain.CReport.SelectionFormula = gString
   mMain.CReport.Formulas(0) = gFormula0
   mMain.CReport.Formulas(1) = gFormula1
   mMain.CReport.PrintReport
   If mMain.CReport.LastErrorNumber <> 0 Then
      PrintReport = False
      mMain.MousePointer = vbDefault
      MsgBox mMain.CReport.LastErrorNumber &

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close