|
-
May 23rd, 2007, 10:01 AM
#1
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.
-
May 23rd, 2007, 11:51 PM
#2
Thread Starter
Addicted Member
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....
-
May 24th, 2007, 08:32 AM
#3
Thread Starter
Addicted Member
Re: Crystal Report to PDF with Selection
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|