Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. Crystal Reports and CSV files

Crystal Reports and CSV files

Scheduled Pinned Locked Moved Visual Basic
csharphelpquestionworkspace
4 Posts 2 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    KreativeKai
    wrote on last edited by
    #1

    I'm trying to setup a CSV file to report data on a Crystal Report from within .NET using Visual Basic. I'm setting the data source up under the "More data sources", "Access/Excel" section. I can pull the fields and place them on the report and the project builds without any errors, but when executed it asks for the login id and password. There is no login id or password on a csv file. Is it possible to pull data into a crystal report via a csv file? If it is possible, does someone have a solution or sample code? Thanks in advance for any help! :confused: :( Lost in the vast sea of .NET

    K 1 Reply Last reply
    0
    • K KreativeKai

      I'm trying to setup a CSV file to report data on a Crystal Report from within .NET using Visual Basic. I'm setting the data source up under the "More data sources", "Access/Excel" section. I can pull the fields and place them on the report and the project builds without any errors, but when executed it asks for the login id and password. There is no login id or password on a csv file. Is it possible to pull data into a crystal report via a csv file? If it is possible, does someone have a solution or sample code? Thanks in advance for any help! :confused: :( Lost in the vast sea of .NET

      K Offline
      K Offline
      KreativeKai
      wrote on last edited by
      #2

      I didn't receive any replies at CodeProject to this thread, but I did want to share the solution that I was given on GotDotNet.com. Hopefully this will help someone in the future with the same problem. Here is the link: http://www.gotdotnet.com/Community/MessageBoard/Thread.aspx?id=264311&Page=1#265396 :-O Lost in the vast sea of .NET

      N 1 Reply Last reply
      0
      • K KreativeKai

        I didn't receive any replies at CodeProject to this thread, but I did want to share the solution that I was given on GotDotNet.com. Hopefully this will help someone in the future with the same problem. Here is the link: http://www.gotdotnet.com/Community/MessageBoard/Thread.aspx?id=264311&Page=1#265396 :-O Lost in the vast sea of .NET

        N Offline
        N Offline
        NarendraSinghJTV
        wrote on last edited by
        #3

        hey i have the same problem but your given link is down can you provide any new link or provide any example thanks in advance waiting for rply

        Regards Narendra Singh (Jindal Tech Ventures)

        K 1 Reply Last reply
        0
        • N NarendraSinghJTV

          hey i have the same problem but your given link is down can you provide any new link or provide any example thanks in advance waiting for rply

          Regards Narendra Singh (Jindal Tech Ventures)

          K Offline
          K Offline
          KreativeKai
          wrote on last edited by
          #4

          Hi Narendra, Sorry for the delay in response. I was on vacation last week when you posted. The Microsoft GotDotNet.com website is no longer maintained so the link I posted in 2004 no longer works. I dug back through the e-mails I kept and here were the 4 suggestions I received on that forum. Not sure which one I used or even which project I was working on at that time to even check, but hopefully posting the actual responses that they gave me will help you in some way. :) 1st answer: You could write the schema of the dataset created out to an xmlfile, and then add the xml file to crystal reports using More Data Sources, ADO.Net(XML). Public Sub CreateXmlFile(ByVal XmlFilename As String, ByVal XmldataSet As DataSet) Dim XmlFile As System.IO.FileStream Dim XmlFileStream As New System.IO.FileStream _ (XmlFilename, System.IO.FileMode.Create) Dim XmlOutput As New System.Xml.XmlTextWriter _ (XmlFileStream, System.Text.Encoding.Unicode) XmldataSet.WriteXmlSchema(XmlOutput) End Sub 2nd answer: Can't you just connect to the CSV file with an OleDb.OleDbConnection, and fill a DataSet with an OleDb.OleDbDataAdpater? I fill datasets in this way all the time. ------------------------------------------- Dim txtConn as New OleDb.OleDbConnection txtConn.ConnectionString = "Provider=miscrosoft.jet.oledb.4.0;Data Source=Directory Name;Extended Properties=Text;" Dim txtCmd as New OleDb.OleDbCommand txtCmd.Connection = txtConn txtCmd.CommandText = "SELECT * FROM [filename.csv];" Dim txtAdpt as New OleDb.OleDbDataAdpater txtAdpt.SelectCommand = txtCmd Dim ds as New Dataset txtAdpt.Fill(ds) ------------------------------------------------ Now you have a disposable dataset that should be able to interact with Crystal Reports. 3rd answer: There is a workaround for this problem on page 262 of the book at this site: http://www.crystalreportsbook.com/?cpgn=ngcr\_021803 This is a very good .Net Crystal Reports book. It states to connect to the Excel file using DAO, then design the report, and since the DAO connection prompts for login, password, switch the connection to ODBC after the report is designed. 4th answer: I think crystal made a fix to this problem, you might check their support site.

          Lost in the vast sea of .NET

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups