469,319 Members | 2,390 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,319 developers. It's quick & easy.

Crystal Report sort of problem

Hey Group,

Sorry to be a pain yet again. I problem that i don`t know how to get
around:(

I use the following connection class on my project:

Private Shared mConnectionsstring As String =
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
Private Shared mLocation As String
Private Shared connArray As ArrayList
Public Shared Sub setString(ByVal ind As Integer)
Dim connArray As New ArrayList()
connArray.Add("J:\Excellence.Net\LiveNetDB.mdb")
connArray.Add("J:\Excellence.Net\DevNetDB.mdb")
connArray.Add("C:\Program Files\Excellence.Net\LiveLocalDB.mdb")
mLocation = connArray(ind).ToString
End Sub
Public Shared ReadOnly Property [String]() As String
Get
Return "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & mLocation & ";"
End Get
End Property

and then I use:
Connection.setString(Me.cboSelectDB.SelectedIndex) on my Login form and
<WhateverDataConnect>.ConnectionString = Connection.String
on the load event of every other form.

And the following to print my Crystal Reports:

rptForm.Text = "Excellence.Net - Fax Meter Reading Report" 'Set the form's
titlebar
rptForm.CRVReportPrint.ReportSource = New FaxMeterReadings() 'Tell the
viewer which report to display
rptForm.CRVReportPrint.RefreshReport() 'Refresh the viewer
rptForm.ShowDialog() 'Show the report

How do I get my report Print to determin which database it using? I.E -
Network or Local? All I can find on my Crystal report is the Set Location,
to which I have to choose a databse.

Many Thanks again for any help

Regards
MCN
Nov 21 '05 #1
2 1436
Hey i`ve found this but im so confused, i ain`t got a clue what it means, is
this what I should be looking into?

http://support.businessobjects.com/l...s/c2011464.asp

Any help would be much appriciated

Thanks
MCN

"MadCrazyNewbie" <te**@nospam.com> wrote in message
news:4D********************@karoo.co.uk...
Hey Group,

Sorry to be a pain yet again. I problem that i don`t know how to get
around:(

I use the following connection class on my project:

Private Shared mConnectionsstring As String =
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
Private Shared mLocation As String
Private Shared connArray As ArrayList
Public Shared Sub setString(ByVal ind As Integer)
Dim connArray As New ArrayList()
connArray.Add("J:\Excellence.Net\LiveNetDB.mdb")
connArray.Add("J:\Excellence.Net\DevNetDB.mdb")
connArray.Add("C:\Program Files\Excellence.Net\LiveLocalDB.mdb")
mLocation = connArray(ind).ToString
End Sub
Public Shared ReadOnly Property [String]() As String
Get
Return "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & mLocation & ";" End Get
End Property

and then I use:
Connection.setString(Me.cboSelectDB.SelectedIndex) on my Login form and
<WhateverDataConnect>.ConnectionString = Connection.String
on the load event of every other form.

And the following to print my Crystal Reports:

rptForm.Text = "Excellence.Net - Fax Meter Reading Report" 'Set the form's
titlebar
rptForm.CRVReportPrint.ReportSource = New FaxMeterReadings() 'Tell the
viewer which report to display
rptForm.CRVReportPrint.RefreshReport() 'Refresh the viewer
rptForm.ShowDialog() 'Show the report

How do I get my report Print to determin which database it using? I.E -
Network or Local? All I can find on my Crystal report is the Set Location,
to which I have to choose a databse.

Many Thanks again for any help

Regards
MCN

Nov 21 '05 #2
This may be of no help but may I suggest... connect to your DB by way of a
Web Service / Stored Poc.

Then changing DB is a snap.

just a thought

B
"MadCrazyNewbie" <te**@nospam.com> wrote in message
news:y_********************@karoo.co.uk...
Hey i`ve found this but im so confused, i ain`t got a clue what it means, is this what I should be looking into?

http://support.businessobjects.com/l...s/c2011464.asp

Any help would be much appriciated

Thanks
MCN

"MadCrazyNewbie" <te**@nospam.com> wrote in message
news:4D********************@karoo.co.uk...
Hey Group,

Sorry to be a pain yet again. I problem that i don`t know how to get
around:(

I use the following connection class on my project:

Private Shared mConnectionsstring As String =
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
Private Shared mLocation As String
Private Shared connArray As ArrayList
Public Shared Sub setString(ByVal ind As Integer)
Dim connArray As New ArrayList()
connArray.Add("J:\Excellence.Net\LiveNetDB.mdb")
connArray.Add("J:\Excellence.Net\DevNetDB.mdb")
connArray.Add("C:\Program Files\Excellence.Net\LiveLocalDB.mdb")
mLocation = connArray(ind).ToString
End Sub
Public Shared ReadOnly Property [String]() As String
Get
Return "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & mLocation &

";"
End Get
End Property

and then I use:
Connection.setString(Me.cboSelectDB.SelectedIndex) on my Login form and
<WhateverDataConnect>.ConnectionString = Connection.String
on the load event of every other form.

And the following to print my Crystal Reports:

rptForm.Text = "Excellence.Net - Fax Meter Reading Report" 'Set the form's titlebar
rptForm.CRVReportPrint.ReportSource = New FaxMeterReadings() 'Tell the
viewer which report to display
rptForm.CRVReportPrint.RefreshReport() 'Refresh the viewer
rptForm.ShowDialog() 'Show the report

How do I get my report Print to determin which database it using? I.E -
Network or Local? All I can find on my Crystal report is the Set Location, to which I have to choose a databse.

Many Thanks again for any help

Regards
MCN


Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Dr. Indera | last post: by
4 posts views Thread by Ryan Gregg | last post: by
3 posts views Thread by Brad | last post: by
3 posts views Thread by Agnes | last post: by
reply views Thread by Peter Afonin | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by mdpf | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.