Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Datable insert into dataset Post Reply Post New Topic
Author Message
voxxo
Newbie
Newbie


Joined: 03 Jun 2009
Online Status: Offline
Posts: 4
Quote voxxo Replybullet Topic: Datable insert into dataset
    Posted: 03 Jun 2009 at 5:03pm
How can datatable to be insert into the Crystal Report?

Now I am using SqlDataAdapter, this "adpt.Fill(dataSet, "UploadMsg");" is important so it know the name of the dataset:

SqlDataAdapter adpt = new SqlDataAdapter();
            SqlCommand cmd = new SqlCommand(uploadSql, conn);
            adpt.SelectCommand = cmd;
            // Add parameters and set values.
            cmd.Parameters.Add("@dntAccountCode", SqlDbType.NVarChar, 13).Value = dntAccountCode;

            adpt.Fill(dataSet, "UploadMsg");

            customerReport.SetDataSource(dataSet);

I created a dynamic datatable, but don't know how to put them into the cystal report dataset.

Could not find any clue about this problem.
IP IP Logged
voxxo
Newbie
Newbie


Joined: 03 Jun 2009
Online Status: Offline
Posts: 4
Quote voxxo Replybullet Posted: 03 Jun 2009 at 7:12pm
Get it.... uploadDt.TableName = "UploadMsg";             dataSet.Tables.Add(uploadDt)
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.