VB .NET Making Reports / Printing Data


My Application generates a lot of data in CSV (& some ASCII text) format. My Goal is to post process this Data & generate printable reports. I would like some suggestions with small samples or links. It would be really good if I could do some graphs also. I am prepared to use Crystal Reports as a solution but I cannot transform my data into Access or SQL server database. The data has to be read & saved always as CSV (I am short on resources and other parts of my application use this data so I cannot change the format)


Who is Participating?
natlozConnect With a Mentor Commented:
'Variables and objects
Dim oDs As new DataSet("dsCSVReporting")
Dim oConn As OleDbConnection
Dim oComm As OleDbDataAdapter

oConn = New OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0;data source=C:\temp\file.txt; Extended Properties=Text;HDR=No;FMT=Delimited") ---> Something like this...not sure if perfect, but you probably know...;)

oComm = New OleDbDataAdapter("select * from file.txt", oConn) ---> Syntax may be slightly off...;)
oComm.TableMappings.Add("Table", "Import")

---Now you can fill the dataset
oComm.Fill(oDs, "Import")

Me.rptViewer.ReportSource = rptTest

I have not worked with CSV myself directly, but Excel....so the OleDbDataAdapter Line for oComm and the connection string you will need to figure out...basically once you have created the Dataset and filled it...you should then be able to attach it to a Crystal Report (within your Crystal Report you would need to create it based on a defined dataset)

The dataset would have to be manually created by Adding a DATASET to your project, and designing a table with elements to match the columns of your CSV file...

Hopefully you make use of this.

If you can import the data into a Dataset from the CSV file, then you can associate the dataset to a Crystal Report. I think this is totally possible.
y1381Author Commented:
Can you tell me how to do it ?


Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

That would be a lot of steps and code...maybe let me know what you are capable of?

Do you know how to design a dataset?
Do you know how to read a CSV file's contents in code?
Do you know how to fill a dataset?
Do you know how to design a crystal report?
y1381Author Commented:

Do you know how to design a dataset? NO

Do you know how to read a CSV file's contents in code? Yes

Do you know how to fill a dataset? Yes but only from a OleDbDataReader and SqlDataReader

Do you know how to design a crystal report? Yes


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.