CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Crystal Reports

  1. #1
    Join Date
    Apr 2001
    Posts
    87

    Crystal Reports

    Anyone i need your help please.
    I have code using Crystal report Automation and I declared Formula Field in Crystal Designer.
    But when running the code it stops to the part of previewing and says:

    Error 20515:
    Field: 'Hotels'
    "Hello"
    This text is not part of the formula field..

    This is the part of the code:

    Set crapp = CreateObject("Crystal.CRPE.Application")
    Set crpReport = crapp.OpenReport("C:\Autocall\Reports\Rpt\percent.rpt")
    Set crpedefs = crpReport.FormulaFields
    Set crpedef = crpedefs.Item(1)
    crpedef.Text = "Hello"
    crpReport.Preview

    What's wrong with my code..pls help me.
    thanks.

    Cecile


    The more u read, the more u do not know

  2. #2
    Join Date
    Apr 1999
    Location
    VA BEACH
    Posts
    467

    Re: Crystal Reports

    Pass the value in quotes like
    ""Hello""


    Jim Hewitt
    Software Developer
    Liberty Tax Service
    www.LibertyTax.com

  3. #3
    Join Date
    Apr 2001
    Posts
    87

    Re: Crystal Reports

    I tried what u said but it tells an error:
    Expected end of statement.

    I think this is not possible

    cecile

    The more u read, the more u do not know

  4. #4
    Join Date
    Apr 2001
    Posts
    87

    Re: Crystal Reports

    Hey Thanks for the tip..
    I change it to

    cpedff.Text = "'Hello'"

    and it works :-)

    cecile

    The more u read, the more u do not know

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured