Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with Crystal Designer in VB

Status
Not open for further replies.

ts04

Technical User
Jun 14, 2004
69
NL
Hi!
Visual Basic 6.0
Database: Btrieve
Using: CR 9

Problem 1:
when I open my Report (as Crystal Designer) in VB to edit it and I want to save after this, VB returns the error: " Permission denied" And after trying to save a cecond time it terminates. The report is already included in the application and works if I run the program .. It just won't let me edit it and save afterwoods. ?????

Problem 2:
If I run my Report I fill a record selection formula but the report shows the same data with each record selection formula I use. (Proberly the saved data)

I create it like this:

StrSelectionFormula = "{@R@D} in ['0'"

If A1.Value = 1 Then
StrSelectionFormula = StrSelectionFormula + ",'A1'"
End If
If AB1.Value = 1 Then
StrSelectionFormula = StrSelectionFormula + ",'AB1'"
End If
If AC1.Value = 1 Then
StrSelectionFormula = StrSelectionFormula + ",'AC1'"
End If
If ACB1.Value = 1 Then
StrSelectionFormula = StrSelectionFormula + ",'ACB1'" End If
If AG1.Value = 1 Then
StrSelectionFormula = StrSelectionFormula + ",'AG1'"
End If

StrSelectionFormula = StrSelectionFormula + "]"

CrystalReport1.RecordSelectionFormula = StrSelectionFormula

I am using Checkboxes to Create the selection string.

On my form.activate I give the following command:

CrystalReport1.DiscardSavedData

What is wrong?? I have debugged the syntax and the Selectionstring gets filled correctly but it wont excecute in the report.

Any suggestions are very welcome!

Tanja
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top