Creating Statement Report

  • I am a newbie to database and part of my project is to create a billing system, because I am not familiar with SQL I start using Access just to create a database. I got this table relations, a customer table, payment table, meter table, meter rate table, meter reading tables and a customermovement table or tenant table (this is for rental houses or non-permanent owners).

    To get the customer bill, is to check customer id at the customermovement, get meter serial and the date he/she moved in the house and the initial reading then get the present reading from the reading table according to that meter serial times the rate and that his or her bill.

    But I got a problem on how to generate or create a report statement that is going to list his/her monthly bill and his/her payment according to the date of payment and his/her brought forward balance.

    Has anyone knows how to do this kind of statement, I really need help on this please.

    Thank you

  • Hi and welcome to SSC!!! Before anybody has a chance at helping you, you need to provide a mountain of more information. We need ddl, sample data and desired output based on your sample data. Take a look at the first link in my signature for best practices when posting questions.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • You'll need to build a query to return that data. Best thing to do is take your requirements and then start putting together the SELECT statement. Once you have the query correct, building the report is just work.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply