[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.8

Getting data from a qry into a report.

Asked by indy500fan in Crystal Reports Software

Tags: mod

Friends,

I have my report working, but there has to be a better way.  Right now, in my VB.net code, I perform a select statement to get the data I want, and then I insert that data into a table.  After doing so, I run the report which has the database assigned, and pulls that data from that table and then builds the report.

It seems like there should be an easier way, but I don't know how.  I want to eliminate that extra step of inserting into a table for one other reason.  The report has that table hard mapped; which creates problems.

I'd like to just do the select statement, and while I reading the rows, insert those rows into the report instead of the table. Is that possible?

Here is the vb code where I take the selected data and insert into the table:

If dr.HasRows Then
                'loop through the records
                While dr.Read()

                    i = (i + 1)

                    li = lvRaceStartOrder.Items.Add(i)

                    If i Mod 2 = 0 Then
                        li.BackColor = Color.White
                    Else
                        li.BackColor = Color.Gainsboro
                    End If

                    li.SubItems.Add(dr("StartPosition"))
                    intPrintStartPosition = (dr("StartPosition")) <-- a field that is used in the report
                    li.SubItems.Add(dr("No"))
                    strPrintCarNumber = (dr("No"))
                    li.SubItems.Add(dr("Driver"))

                    strPrintPassingTimeHours = (dr("Hours"))
                    strPrintPassingTimeMinutes = (dr("Minutes"))
                    strPrintPassingTimeSeconds = (dr("Seconds"))

                    'li.SubItems.Add(dr("Passing Time"))
                    strPrintPassingTime = (strPrintPassingTimeHours & ":" & strPrintPassingTimeMinutes & ":" & strPrintPassingTimeSeconds) <-- a field that is used in the report
                    li.SubItems.Add(strPrintPassingTime)

                    li.SubItems.Add(dr("Flag"))
                    strDecoderID = (dr("TimeLine"))

                    If strDecoderID = "100" Then
                        strDecoderID = "Start/Finish" <-- a field that is used in the report
                    Else
                        strDecoderID = "Warning: Not Start/Finish" <-- a field that is used in the report
                    End If

                    li.SubItems.Add(strDecoderID)

                    Dim InsertRecord As New SqlClient.SqlConnection(dsn)
                    'fill in the data for a lap ...
                    InsertData = New DataSet
                    Dim DataReader As SqlClient.SqlDataReader
                    InsertRecord = New SqlClient.SqlConnection(dsn)
                    InsertRecord.Open()
                    Dim Command As New SqlClient.SqlCommand("Insert Into PrintRaceStart Values (" & intPrintStartPosition & ", '" & strPrintCarNumber & "', '" & strPrintPassingTime & "')",          InsertRecord)
                    DataReader = Command.ExecuteReader(CommandBehavior.SingleResult)

                    InsertRecord.Close()
                    InsertRecord = Nothing

                End While

            End If


[+][-]08/09/05 11:15 AM, ID: 14635398Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Crystal Reports Software
Tags: mod
Sign Up Now!
Solution Provided By: frodoman
Participating Experts: 1
Solution Grade: A
 
[+][-]08/09/05 07:19 AM, ID: 14632803Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/09/05 07:34 AM, ID: 14632962Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/09/05 07:57 AM, ID: 14633202Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/09/05 07:58 AM, ID: 14633216Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/09/05 08:07 AM, ID: 14633309Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/09/05 08:23 AM, ID: 14633501Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/09/05 08:32 AM, ID: 14633612Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/09/05 08:59 AM, ID: 14633923Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/09/05 10:52 AM, ID: 14635151Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/09/05 11:05 AM, ID: 14635294Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/09/05 11:08 AM, ID: 14635318Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/09/05 11:17 AM, ID: 14635422Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/09/05 11:29 AM, ID: 14635521Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/09/05 01:24 PM, ID: 14636607Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/09/05 01:32 PM, ID: 14636683Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08/09/05 01:41 PM, ID: 14636773Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08/09/05 01:44 PM, ID: 14636791Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92