473,465 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Create 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 3885

"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
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
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
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
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
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
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
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
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
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
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
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,...
1
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,...
0
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...
0
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.