473,569 Members | 2,704 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting to grips with Crystal

I have a Crystal report within VB.Net. I have defined some fields using the
Field Explorer (which is where I think I am going wrong)

I have the following code:

Private Sub Form1_Load(ByVa l sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
Dim cn As New OleDbConnection
Dim cmd As New OleDbCommand
Dim myDA As New OleDbDataAdapte r
Dim myDS As New Dataset1
Dim rpt As New CrystalReport1
cn.ConnectionSt ring = "Provider=Micro soft.Jet.OLEDB. 4.0;Data
Source=" & MyDatabase
cn.Open()

cmd.Connection = cn
cmd.CommandText = "Select * from People where cardNo = '00001'"
cmd.CommandType = CommandType.Tex t
myDA.SelectComm and = cmd
myDA.Fill(myDS, "People")
rpt.SetDataSour ce(myDS)
CRViewer1.Repor tSource = rpt

End Sub

The problem is that the report is not taking any notice of the code at all.
In fact if I comment out the whole lot, the report still runs and gives me
the whole table. I think my error was in dragging fields from the table onto
the form, but I don't know how else to do it. Could someone give me a nudge
in the right direction please?

thanks

- Jerry
Nov 21 '05 #1
0 694

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

80
5205
by: Bibby | last post by:
Hi, I'm interested in getting started in the programming world. I've dabbled in C, C++ and VB6. Which would be the best language to focus my attention to regarding the following considerations: Hireability Portability Flexibility The likely candidates seem to be Java, VB.Net, C, C++, C#.
3
2563
by: Fabian | last post by:
Hello, Iam searching for a way to design a letter with Crystal Report. Now I want to imlement a table. I have the Data in a ArrayList, but it will not be able to make a Database, so I need a way to insert all the data from my ArrayList into this Table in the Crystal Report. How can I do that ? Another Problem is, that I must save the...
7
4989
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying. I created the websetup and built the MSI, have the bundled version. Copied to webserver and ran Websetup.msi. Said I had to remove old version,...
3
2278
by: Rod | last post by:
I've got a Crystal Reports for Visual Studio.NET 2003 that I wrote. Up until now, I have been able to run it just fine, however, I had to change the access method to use Active Directory. (It uses forms authentication but authenticates against Active Directory.) Now, it no longer can run the Crystal Report. (Within the ASP.NET page I would...
0
943
by: jhcorey | last post by:
I'm working with a white paper off the Crystal site trying to create a simple report based on a recordset (altho eventually I want to use a stored procedure). The instruction is to create a dataset in VS, so I did that. Next is to add a Crystal Report and to use the Report Expert wizard. I do that, but when I select my double-click the...
1
1793
by: aaaaaa | last post by:
running a crystal (v10) reporting app on a virtual web server and getting the "Validation of viewstate MAC failed...." error when opening the crystal viewer. Any help please!!!
0
1336
by: neeraj | last post by:
Hi people's I developed One Windows application with some crystal Report I used my predefined crystal reports files for my application. I just take one crystal report viewer on form and set report source = location of my crystal report file. The version of crystal report software is 8.0 When I execute my application and open report from...
3
14950
by: Mudcat | last post by:
I am not that familiar with Crystal Reports, but having read some other posts I know that the way to integrate the API with Python is through the COM interface provide by win32all. However, I have been unable to find any other information on how to get started. I've used the COM interface before in integrating Excel and a couple of other...
1
1472
by: jimjim | last post by:
Hi, When I try t run an aspx page which has crystal reports code in one section of the .vb code behind page, it gives following error. "A Crystal Reports job failed because a free license could not be obtained in the time allocated. More licenses can be purchased direct from Crystal Decisions or through the Crystal Decisions Online Store. "...
0
7698
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7970
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1213
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.