dbTalk Databases Forums  

Passing Btrieve OwnerName to Crystal Reports

comp.databases.btrieve comp.databases.btrieve


Discuss Passing Btrieve OwnerName to Crystal Reports in the comp.databases.btrieve forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
himilecyclist@yahoo.com
 
Posts: n/a

Default Passing Btrieve OwnerName to Crystal Reports - 01-17-2006 , 03:33 PM






We call a Crystal Report (V8) from a Visual Basic 6 program. The
Crystal Report access a Pervasive (V8) file. We have recently
password-protected the file. Opening the file using the Pervasive
ActiveX Controls and the "OwnerName" statement works fine. However,
our Crystal Report now does not work, since it needs the password.
This is how we currently call the report from VB:

'Clear the Crystal Report buffer
485 frmDataEntry.crwPaternity.Reset

' Define the Crystal Report file
486 frmDataEntry.crwPaternity.ReportFileName = App.Path & "\Paternity
Dobrman 2003 Pg 1.rpt"

' Define the data file
487 frmDataEntry.crwPaternity.DataFiles(0) = Replace(UCase$(App.Path),
"DOBRMAN", "Data") & "\bthmast.mkd"

' Define the selection formula
488 frmDataEntry.crwPaternity.SelectionFormula = "{Birth Master.State
File Number} = '" & frmVAccess.vacBirthMaster.FieldValue("State File
Number") & "'"

' Set the default printer as the destination
489 frmDataEntry.crwPaternity.Destination = crptToPrinter

' Print the report
490 Stat% = frmDataEntry.crwPaternity.PrintReport

491 If Stat% <> 0 Then
492 MsgBox crwPaternity.LastErrorString
493 End If

This worked fine until the introduction of the OwnerName on
bthmast.mkd.

How do we pass the OwnerName to Crystal? We tried:

frmDataEntry.crwPaternity.Password = "password"

That does not work. Any help greatly appreciated!


Reply With Quote
  #2  
Old   
Bill Bach
 
Posts: n/a

Default Re: Passing Btrieve OwnerName to Crystal Reports - 01-18-2006 , 01:42 PM






May be a silly question, but have you tried contacting Crystal to see
how it should be done?

If you use the newer Pervasive.SQL ODBC driver (PSQLV8.6 or higher),
you can specify the owner name in the SQL rights, but this requires
security at the SQL layer as well. May not be a good solution, but it
might be what you need.

Optionally, you can change the owner name "type" to one that allows
data reading without the owner name. This would eliminate the need for
Crystal to have it, since Crystal doesn't try to write to the file.
Goldstar Software Inc.
Building on Btrieve(R) for the Future(SM)
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Sydney: Pervasive.SQL Service & Support Class - 02/27-03/02/2006
***
*** Chicago: Pervasive.SQL Service & Support Class - 03/27-03/30/2006
***

himilecyclist (AT) yahoo (DOT) com wrote:

Quote:
We call a Crystal Report (V8) from a Visual Basic 6 program. The
Crystal Report access a Pervasive (V8) file. We have recently
password-protected the file. Opening the file using the Pervasive
ActiveX Controls and the "OwnerName" statement works fine. However,
our Crystal Report now does not work, since it needs the password.
This is how we currently call the report from VB:

'Clear the Crystal Report buffer
485 frmDataEntry.crwPaternity.Reset

' Define the Crystal Report file
486 frmDataEntry.crwPaternity.ReportFileName = App.Path & "\Paternity
Dobrman 2003 Pg 1.rpt"

' Define the data file
487 frmDataEntry.crwPaternity.DataFiles(0) =
Replace(UCase$(App.Path), "DOBRMAN", "Data") & "\bthmast.mkd"

' Define the selection formula
488 frmDataEntry.crwPaternity.SelectionFormula = "{Birth Master.State
File Number} = '" & frmVAccess.vacBirthMaster.FieldValue("State File
Number") & "'"

' Set the default printer as the destination
489 frmDataEntry.crwPaternity.Destination = crptToPrinter

' Print the report
490 Stat% = frmDataEntry.crwPaternity.PrintReport

491 If Stat% <> 0 Then
492 MsgBox crwPaternity.LastErrorString
493 End If

This worked fine until the introduction of the OwnerName on
bthmast.mkd.

How do we pass the OwnerName to Crystal? We tried:

frmDataEntry.crwPaternity.Password = "password"

That does not work. Any help greatly appreciated!


Reply With Quote
  #3  
Old   
himilecyclist@yahoo.com
 
Posts: n/a

Default Re: Passing Btrieve OwnerName to Crystal Reports - 01-19-2006 , 10:28 AM



Thanks, Bill!

We opted for your idea of changing the password to only be required for
write access. That works great for Crystal. Thanks again!


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.