Results 1 to 9 of 9

Thread: Crystal Report to PDF with Selection

Hybrid View

  1. #1
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Crystal Report to PDF with Selection

    The only reason I can think of as to why this occurs is that the Save Data with Report option was selected. This means when there is no RecordSelection formula, the report does not need to connect to the database but once you add the formula it is trying to refresh the data.

    Try this to see if the above is the cause.

    Comment out the RecordSelectionFormula
    After the OpenReport statement add
    Rep.DiscardSavedChanges (not sure if that is the exact name of the method name)

    If you get the same error then you need to ensure a login has been set for all databases used by the report.

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    Mar 2002
    Posts
    135

    Re: Crystal Report to PDF with Selection

    Thanks for ur reply brucevde

    Since my database is password protected, it gives me that error. If I remove the password from the database then RecordSelectionFormula works fine.

    Also I am using FormulaFields in the report...
    Code:
    rep.FormulaFields(0)="VillageName='" & village_name & "'"
    BUT I am gettig this error...."Subscript out of Range"

    Any ideas as to why this error is comming.

    I tried writing it as
    Code:
    rep.FormulaFields.Add "{VillageName}",village_name
    but of no help. It dose not give me an error, but does not show the output on the report.

    pls reply....

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2002
    Posts
    135

    Re: Crystal Report to PDF with Selection

    Any help.....pls

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