473,382 Members | 1,367 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,382 software developers and data experts.

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 3877

"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
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.