Showing posts with label push. Show all posts
Showing posts with label push. Show all posts

Monday, March 19, 2012

Crystal Report Viewer "Error, Not Implemented"

I have reports to display using Crystal Report 10.

To print it, the user has to push a button on vb which open a vb form called
CrViewer.

Since the source of the CR could be in a different location, im trying to make it load a db from a path that is saved into the db.

Private Sub Form_Load()
Dim lsSql As String
Dim lstr As String
Dim lDateDebut As Date
Dim lDateFin As Date
Dim lcFormulas As String
Dim liListcount As Integer
Dim lsPathBD As String
Dim lvRapportId As Variant
Dim llPeriodePaye As Long

Dim lCrxApplication As CRAXDRT.application
Dim lRapportCrystal As CRAXDRT.Report
Dim lCrxDatabaseField As CRAXDRT.DatabaseFieldDefinition
Dim i As Long

Set lCrxApplication = New CRAXDRT.application

Set lRapportCrystal = lCrxApplication.OpenReport(ObtenirRepertoireRapport() & "RapportAdmRemboursementCumul.rpt", crOpenReportByTempCopy) ' OptenirRepertoirRapport() is a function that return the path to the report directory that is saved in the database.
' Finds the path from the registry...
lsPathBD = GetSetting("GTS", "Demarrage", "RepertoireBD", "")
lRapportCrystal.DiscardSavedData

For i = 1 To lRapportCrystal.Database.Tables.Count
lRapportCrystal.Database.Tables(i).Location = lsPathBD
Next i


frmCRViewer.CRViewer.ReportSource = lRapportCrystal
CRViewer.ViewReport
Set frmCRViewer = Nothing

Set lCrxDatabaseField = Nothing
Set lRapportCrystal = Nothing
Set lCrxApplication = Nothing
End Sub

The problem is encounter when the Crystal Report is opening. it Open but then I get the Error "Erreur, Non Implment" with "Crystal Report Viewer" as title for the errmsg.

Im using Visual Basic 6.0 (SP6)
Windows XP Home, French (SP2)
Crystal Report 10.0.5.1025 Dev. Full, French

Any Help would be Appreciated.the properties of the Database are:

OLE DB (ADO)
Microsoft.Jet.OLEDB.4.0
C:\Projet\Simoneau\DB\DB.mdb

Access
1033
-6
Admin

When using the Crystal Report Tool, no error are popping up but when calling the command
CRViewer.ViewReport The Error pop's up.

I have download a sample from Planet Source

http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=59818&lngWId=1

It also work fine using the Access/Excel(DAO) database source but if I change it to Microsoft.Jet.OLEDB.4.0 it keep giving me that same error.

Is there anyway to go around this error msg and display my report using Microsoft.Jet or do i have to use Access/Excel DAO absolutely ?

Thursday, February 16, 2012

Cross owner table replication

Hello,
We have a number of tables for which we need to setup a push type
replication. In the source db, the owner of those tables is dbo, but in the
subscriber dbs, all tables must belong to a different owner (our
application requirement). As I followed replication wizard, I could not
find any option to set it up this way (I got dbo owned tables in the
subscriber dbs).
TIA,
Vitaliy
When you get to the specify article dialog box, click on the browse button
to the right of the tables and in the general tab enter the name of the user
you wish to own the tables on the subscriber in the destination owner text
box.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Vitalik" <address@.domain.com> wrote in message
news:%23NbuNnu7FHA.4012@.TK2MSFTNGP14.phx.gbl...
> Hello,
> We have a number of tables for which we need to setup a push type
> replication. In the source db, the owner of those tables is dbo, but in
> the
> subscriber dbs, all tables must belong to a different owner (our
> application requirement). As I followed replication wizard, I could not
> find any option to set it up this way (I got dbo owned tables in the
> subscriber dbs).
> TIA,
> Vitaliy
>