|
-
Nov 3rd, 2007, 02:26 AM
#1
2005 Exp - Crystal Report Source
Hi Guys,
I have created a CR Report that I use in an app (frontend to an Access DB).
As is well except the data that I used to create the CR Report is showing up in the VB.Net app although I have:
1. saved the Report without data (option within CR)
2. in my app, I specify the data source (see below)
Code:
Report.Load(Application.StartupPath & "\Dependancies\Blank.rpt")
Report.SetDataSource(Me.LogbookDataSet.tbl_Logbook)
CrystalReportViewer.ReportSource = Report
Me.PanelReport.Controls.Add(CrystalReportViewer)
??
-
Nov 5th, 2007, 07:57 AM
#2
Re: 2005 Exp - Crystal Report Source
-
Nov 5th, 2007, 08:24 AM
#3
Re: 2005 Exp - Crystal Report Source
does it throw any exceptions? do you have any subreports in the report? if you do the datasource needs to be set in the subreports as well.
-
Nov 5th, 2007, 08:50 AM
#4
Re: 2005 Exp - Crystal Report Source
HI vbdotnetboy,
No exceptions - works as stated, but with the development data showing.
The following seems related; in that the development DB cannot be changed (although I have implicity set the Data Source...):
http://forums.microsoft.com/MSDN/Sho...72482&SiteID=1
-
Nov 5th, 2007, 08:58 AM
#5
Re: 2005 Exp - Crystal Report Source
does your access DB require login credentials?
-
Nov 5th, 2007, 09:31 AM
#6
Re: 2005 Exp - Crystal Report Source
Yup - that's why Crystal Reports has so much developer community love :-)
Maybe try:
Code:
Me.CrystalReportViewer1.LogOnInfo.Clear()
If Me.CrystalReportViewer1.LogOnInfo.Count = 0 Then
Me.CrystalReportViewer1.LogOnInfo.Add(New CrystalDecisions.Shared.TableLogOnInfo())
End If
Me.CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.ServerName = _ServerName
Me.CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.DatabaseName = _DatabaseName
Me.CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.UserID = _UserId
Me.CrystalReportViewer1.LogOnInfo.Item(0).ConnectionInfo.Password = _Password
?
-
Nov 5th, 2007, 09:37 AM
#7
Re: 2005 Exp - Crystal Report Source
 Originally Posted by vbdotnetboy
does your access DB require login credentials?
No, but suspect that may be an issue - why who the h*** knows - seems to be a problem tho. 
Hi Merrion,
I was onto that (from the link I posted) but couldn't get the syntax right for the ServerName (have had a few cold ones....) will give it a shot
-
Nov 5th, 2007, 09:58 AM
#8
Re: 2005 Exp - Crystal Report Source
Bugger, it didn't work... looked promising tho.
I do (and always did get) a dialog to select the DB path - as it's trying to use the development DB.

-
Nov 6th, 2007, 05:41 AM
#9
Re: 2005 Exp - Crystal Report Source
It may be that the report template wasn't saved with the data source logged off?
Try logging off and then moving a label around to make CR think the report has changed then save it.
-
Nov 6th, 2007, 03:40 PM
#10
Re: 2005 Exp - Crystal Report Source
I will try that - thanks.
(My dev .mdb was connected using OLE DB (ADO))
-
Nov 8th, 2007, 06:41 AM
#11
Re: 2005 Exp - Crystal Report Source
I have now tried a few other 'Logon' methods to no avail (following Merrions approach).
Does any one else have a successful snippet used to 'Logon' / (re) connect to an mdb; similar to post #7?
-
Nov 8th, 2007, 07:09 AM
#12
Frenzied Member
Re: 2005 Exp - Crystal Report Source
Hi Bruce,
Try calling the CR Viewer's Refresh Method and see whether that makes any difference:
Code:
Report.Load(Application.StartupPath & "\Dependancies\Blank.rpt")
Report.SetDataSource(Me.LogbookDataSet.tbl_Logbook)
CrystalReportViewer.ReportSource = Report
Me.PanelReport.Controls.Add(CrystalReportViewer)
CrystalReportViewer.Refresh
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
|