473,503 Members | 6,385 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Crystal Report

Greetings:
Please
This is the first time i'm using crystal report i'm passing Parameters like
code belowe but what i'm getting alwayes just the last record
pleeeeeeeeeeeeeeeease any help

Dim report As New ReportDocument
Dim I As Int16
mycon.ConnectionString = "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA
SOURCE=" & Server.MapPath("App_Data/TRN.mdb") & ""
mycon.Open()

'Dim sql As String = "SELECT Users.CPR,Users.Name,
courses.CourseTitel, courses.SDate, courses.Edate, Registration.SupApp,
Registration.Status FROM Users INNER JOIN (courses INNER JOIN Registration ON
courses.Code = Registration.Code) ON Users.CPR = Registration.CPR WHERE
Users.CPR='711220956'"

Dim sql As String = "SELECT Users.CPR, Users.Name,
Users.Directorate, courses.CourseTitel, courses.SDate, courses.Edate,
courses.location, courses.fees, Registration.SupApp, Registration.Status FROM
Users INNER JOIN (courses INNER JOIN Registration ON courses.Code =
Registration.Code) ON Users.CPR = Registration.CPR"
sql = sql & " WHERE Registration.SupApp='APP' AND
Registration.Status='APP' AND Users.CPR='711220956'"


da = New OleDbDataAdapter(sql, mycon)
da.Fill(ds)
report.Load(Server.MapPath("emrpt.rpt"))

report.SetDataSource(ds)

CRV.ReportSource = report
CRV.DataBind()

For I = 0 To ds.Tables(0).Rows.Count - 1
report.SetParameterValue("CPR", ds.Tables(0).Rows(I)(0).ToString)
report.SetParameterValue("test", ds.Tables(0).Rows(I)(1).ToString)
report.SetParameterValue("dir", ds.Tables(0).Rows(I)(2).ToString)
report.SetParameterValue("CourseName",
ds.Tables(0).Rows(I)(3).ToString)
report.SetParameterValue(2, CType(ds.Tables(0).Rows(I)(4),
Date).ToShortDateString)
report.SetParameterValue(3, CType(ds.Tables(0).Rows(I)(5),
Date).ToShortDateString)
report.SetParameterValue("loc", ds.Tables(0).Rows(I)(6).ToString)
report.SetParameterValue("fee", ds.Tables(0).Rows(I)(7).ToString)
report.SetParameterValue("SupAPP",
ds.Tables(0).Rows(I)(8).ToString)
report.SetParameterValue("AdAPP",
ds.Tables(0).Rows(I)(9).ToString)

Next
May 26 '07 #1
3 3895

"drabee" <dr****@discussions.microsoft.comwrote in message
news:3C**********************************@microsof t.com...
Greetings:
Please
This is the first time i'm using crystal report i'm passing Parameters
like
code belowe but what i'm getting alwayes just the last record
pleeeeeeeeeeeeeeeease any help
>
'Dim sql As String = "SELECT Users.CPR,Users.Name,
courses.CourseTitel, courses.SDate, courses.Edate, Registration.SupApp,
Registration.Status FROM Users INNER JOIN (courses INNER JOIN Registration
ON
courses.Code = Registration.Code) ON Users.CPR = Registration.CPR WHERE
Users.CPR='711220956'"

Dim sql As String = "SELECT Users.CPR, Users.Name,
Users.Directorate, courses.CourseTitel, courses.SDate, courses.Edate,
courses.location, courses.fees, Registration.SupApp, Registration.Status
FROM
Users INNER JOIN (courses INNER JOIN Registration ON courses.Code =
Registration.Code) ON Users.CPR = Registration.CPR"
sql = sql & " WHERE Registration.SupApp='APP' AND
Registration.Status='APP' AND Users.CPR='711220956'"
Well, you need to verify that your Select statements are pulling back the
data you want.

There should be a way in Access to take those Selects and run them gainst
the database to see if they work before moving on to Crystal.
May 26 '07 #2

Thank you for your replay actually i did it is OK giving me 4 records
"Mr. Arnold" wrote:
>
"drabee" <dr****@discussions.microsoft.comwrote in message
news:3C**********************************@microsof t.com...
Greetings:
Please
This is the first time i'm using crystal report i'm passing Parameters
like
code belowe but what i'm getting alwayes just the last record
pleeeeeeeeeeeeeeeease any help

'Dim sql As String = "SELECT Users.CPR,Users.Name,
courses.CourseTitel, courses.SDate, courses.Edate, Registration.SupApp,
Registration.Status FROM Users INNER JOIN (courses INNER JOIN Registration
ON
courses.Code = Registration.Code) ON Users.CPR = Registration.CPR WHERE
Users.CPR='711220956'"

Dim sql As String = "SELECT Users.CPR, Users.Name,
Users.Directorate, courses.CourseTitel, courses.SDate, courses.Edate,
courses.location, courses.fees, Registration.SupApp, Registration.Status
FROM
Users INNER JOIN (courses INNER JOIN Registration ON courses.Code =
Registration.Code) ON Users.CPR = Registration.CPR"
sql = sql & " WHERE Registration.SupApp='APP' AND
Registration.Status='APP' AND Users.CPR='711220956'"

Well, you need to verify that your Select statements are pulling back the
data you want.

There should be a way in Access to take those Selects and run them gainst
the database to see if they work before moving on to Crystal.
May 26 '07 #3

"drabee" <dr****@discussions.microsoft.comwrote in message
news:AB**********************************@microsof t.com...
>
Thank you for your replay actually i did it is OK giving me 4 records
So, how many records are in ds.Tables(0).Rows.Count, when you use the
Immediate Pane in Dubug mode?

May 26 '07 #4

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

Similar topics

1
19127
by: Stephan | last post by:
Hi, I'm using Visual Studio 2003 (C#) with the integrated Crystal Report software and have the following question: How can I assign a value (string) to an unbound (string) field in Crystal...
13
15110
by: kristoff plasun | last post by:
I have a problem with a C++ DCOM application that prints Crystal Reports with data from Oracle. The SQL query is relatively complex but when the report is printed from the Crystal Reports...
0
4460
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...
2
4903
by: Mythran | last post by:
In .Net, how can I go about and set a Crystal Reports namespace? Right now they use the Root Namespace (VB) from the project. How can I extend the namespace for a single report (which will be set...
1
12138
by: Karthic | last post by:
When i right click on the .rpt file in the VS 2003, i see a property printer setting. It says "No printer" on the top and there is option to select printer and paper settings etc.. I want to...
1
3059
by: bthomas71chevy | last post by:
I have just setup a WebServer and all the applications work fine, but when every any of the applications try to generate a Crystal Report the page errors out. "File or assembly name...
0
2248
by: Chris | last post by:
I have the following situation in a VB.Net App I am working on: 1.)A report created in VS.Net 2003 using the CR.Net component of VS 2003. 2.)The datasource for the report is a Stored Proc in a...
9
8228
by: Altman | last post by:
I am currently using ASP.Net 2003 and will be upgrading to 2005 sometime in the near future. I have been having issues with using Crystal Reports that were included with .Net to handle my...
0
2943
by: John Smith | last post by:
Hello, I am developing a VB.NET 2003 application that will use lots of Crystal Reports. Sometimes the users will preview a report in a Crystal report viewer, and sometimes they will send the...
11
9663
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
How can I stop receiving this message while calling a crystal report? "The report you requested requires further information." Thanks
0
7194
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
7267
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
7316
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...
1
6976
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
7449
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...
0
5566
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,...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3160
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...
0
372
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...

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.