473,395 Members | 1,938 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 1601
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: windos | last post by:
Dear all, I am a new in using Crystal Report. I'm trying to add this query in CR : SELECT
0
by: Dr. Indera | last post by:
hello, i previously posted the questions below on several crystal reports newsgroups, including the one for the company that makes crystal reports, but never got an answer, so i'm hoping that...
1
by: david risby | last post by:
I'm getting an unwanted database login form appearing when I set the Data Source of a Crystal report to a .Net dataset e.g. myReport.SetDataSource(myDataSet This only occurs on some PCs, works...
4
by: Ryan Gregg | last post by:
I've got a background service running that needs to check a database periodically and print reports whenever it finds that the data has changed. I've built a class library that scans the database...
1
by: saima ashraf | last post by:
Hi, I am trying to sort the data in my crystal report at runtime. The problem is that i can only query the database once and that is at the loading of the report. At that time i fill up my...
3
by: Brad | last post by:
I have just posted a variation of this question on the Crystal Reports board, but most times I do not get a reponse. I have a report in which I asked about yesterday and after working all day on...
3
by: Agnes | last post by:
I write the invoice by using crystal report in vb.net . I can export it into *.pdf very well, However, it can also export to word, excel also. we are afraid that the user export the invoice into...
5
by: furby | last post by:
I'm asking this on the off chance that someone out there might have seenit before. In my current application, when the user logs in, the state variable called "role" is assigned to them,...
0
by: Peter Afonin | last post by:
Hello, I'm still learning Crystal reports, and now I need to sort report programmatically. I've found a good article about it:...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.