DATABASE query

This is a discussion on DATABASE query within the C# Programming forums, part of the General Programming Boards category; hi i am working on a database connected with c# code, i want to show crystal report, i have made ...

  1. #1
    Registered User
    Join Date
    Sep 2010
    Posts
    41

    Lightbulb DATABASE query

    hi i am working on a database connected with c# code, i want to show crystal report, i have made a connection with SQLite database file,now my "report1.rdlc" looks like
    Code:
    NAME  ADDRESS  CONTACT  AMOUNT
    now i want to add all the amounts in the AMOUNT column but confused how to do that....
    kindly help me out

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,761
    Perhaps write a loop to read each row of the DB, then total the AMOUNT column?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User
    Join Date
    Sep 2010
    Posts
    41

    Lightbulb

    this is my form1 code
    Code:
     private void Form1_Load(object sender, EventArgs e)
            {
                // TODO: This line of code loads data into the 'DataBDataSet.Accounts' table. You can move, or remove it, as needed.
                this.AccountsTableAdapter.Fill(this.DataBDataSet.Accounts);
                this.reportViewer1.RefreshReport();
            }
    i am going to save the result in textbox in report viewer,if i access database here in this event i cannot access the textbox in which i have to show the result...
    and i just want that amount having certain criteria means the amount of year 2010 by deploying a check then the results i get,want to show that amount having year 2010 so i have to search through the fields of report viewer
    Last edited by rafay_07; 12-26-2011 at 07:23 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Database to Database Transfer?
    By draggy in forum C++ Programming
    Replies: 4
    Last Post: 01-17-2007, 10:50 AM
  2. i++ query
    By PING in forum C Programming
    Replies: 29
    Last Post: 11-21-2004, 01:40 PM
  3. r/w query
    By ozzy34 in forum C++ Programming
    Replies: 2
    Last Post: 10-02-2004, 09:18 AM
  4. SQL Query
    By vasanth in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 12-24-2003, 09:06 AM
  5. Replies: 1
    Last Post: 10-09-2001, 11:20 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21