Print Page | Close Window

inserting column to the database

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=714
Printed Date: 14 May 2024 at 3:23am


Topic: inserting column to the database
Posted By: annu
Subject: inserting column to the database
Date Posted: 21 May 2007 at 11:53pm

Hi!

    I am working on asp.net 2.0 with sql server 2005 as the backend.i am using crystal report for my application.in this i have got a column(by name Rtotal01) which makes use of the running total field to summarise two other columns.now i want to insert the values of this column into the database.i gave this command:
 

insertCmd.Parameters.Add(new SqlParameter("@ABC",RTotal01.Text));

where ABC is the column name in my database where i want to insert the RTotal01 values.
 
i got the following error:The name RTotal01 does not exist in the current context.so how do i insert the column values into the database?is there any way out.kindly help.thanking in advance.



Replies:
Posted By: BrianBischof
Date Posted: 22 May 2007 at 10:28am
I don't have the details on how to to do this with me right now, but the idea is that you need to use a SQL Command object in the report. It uses the INSERT statement and follows SQL syntax. Then pass the running total to the SQL parameter (that is the part I can't remember and would have to research). You can search the support site for updateable SQL and see if you can get more details there.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>



Print Page | Close Window