My company has an mrp system that uses a backend server that is a pervasive database. All of the users have system dsns on their machine and there windows login information is how the connect to the reports via the mrp front end.
My boss doesnt like the interface set up for the reports especially the way the paramaters are set up so he wants me to try to create a better user interface for the report paramaters and he wants me to use MS Access.
I found a control and Im able to pass the paramaters to the report, open the report in the viewer and print the report. I didnt have to pass any user name or password to the report so Im assuming my windows credentials were passed to the report. As I said before, all of the reports are based on system dsns that use windows authentication.
I thought everything was going great so I put it on the server so other users could test it but none of the other users could open the report. They just got an error that login in information failed. I guess I need to somehow pass the user information to the report. I found several examples on how to do that but none of them work with the existing code I have. If anyone could help me out I would appreciate it.
Im using the control on an MS Access 2010 form. I dont know what version of crystal reports is being used.
Ole Class: Crystal ActiveX Report Viewer Control 10.0
the OLE class is : CrystalReports10.ActiveXReportViewer.1
I have this reference in my database
Reference. CRAXDRT in C:\Program Files\Common Files\Crystal Decisions\2.5\bin\craxdrt.dll
This is the code I have which is surprisingly simple:
MyPrm = Me.txtPart
Dim crReport As CRAXDRT.Report
Set crReport = crApp.OpenReport("\\Seamuxgs\apps\Global\busint\IV_PARTS_LIST_HTI2.rpt")
Dim crTables As CRAXDRT.DatabaseTables
Set crTables = crReport.Database.Tables
crReport.ParameterFields.GetItemByName("Parent").AddCurrentValue MyPrm
Me.Cr10.ReportSource = crReport
Cr10.ViewReport
gem1204 (BOB member since 2015-03-11)