Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
I am running a vb program that from a view will produce a list of records. I want these records displayed ont a Crystal Report.
 
How is this done as my crystal report will not be connected to anything?
 
Here is an example of a query I want the data onto a crystal report
 
adoCmd.Connection = adoConnection
adoCmd.CommandType = CommandType.Text
adoCmd.CommandText = "SELECT * FROM viewOfNames where department = "Accounts""
adoRdr = adoCmd.ExecuteReader()
 
While adoRdr.Read()
    sTest = adoRdr(Surname)
    sTest2 = adoRdr(Forename)
    sTest3 = adoRdr(Department)
End While
 
The connection is where the view is. I could just use the view but I will be doing all sorts of data manipulation before putting the final results onto crystal reports.
Posted 11-Jan-13 5:38am
Edited 11-Jan-13 5:43am
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

If I understood the question correctly, you can store the result in a datatable, make the necessary modifications and then use the datatable as a data source for Crystal.
 
For example, have a look at:
- Creating Crystal Reports using C# with Datasets[^]
- Crystal Report with DataSet and DataTable using C#[^]
- Crystal Reports Without Database[^]
  Permalink  
Comments
Maciej Los at 11-Jan-13 13:02pm
   
+5!
Mika Wendelius at 11-Jan-13 13:20pm
   
Thanks :-D

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 503
1 George Jonsson 311
2 CPallini 290
3 OriginalGriff 139
4 Prasad Khandekar 135
0 OriginalGriff 4,623
1 CPallini 3,410
2 Sergey Alexandrovich Kryukov 2,929
3 George Jonsson 2,319
4 Gihan Liyanage 2,077


Advertise | Privacy | Mobile
Web03 | 2.8.140905.1 | Last Updated 11 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100