Skip to main content
Home
Live to Learn!

Main navigation

  • Home
  • Learn
    • FoxPro
    • MS-DOS
    • C PRG
    • Java
    • ASP
    • Ruby on Rails
    • ASP.NET
    • E-Books
    • Exam Preparation
    • Tools
  • Blog
  • Forums
  • Contact
User account menu
  • Log in

Breadcrumb

  1. Home
  2. FoxPro Programming

Trial Balance Program

Book navigation

  • FoxPro Commands - Part 1
  • Foxpro commands - Part 2
  • Data Types in FoxPro
  • Numeric Functions in FoxPro
  • Creating a Program
  • Input and Output Statements in Foxpro
  • Control Structures in Foxpro
  • Creating menu in Foxpro for DOS
  • Simple Journal Entry program
  • Simple Ledger creation & Posting Program
  • Trial Balance Program
  • Balance Sheet Program
  • Simple Weekly Calendar Generation
  • How to install FoxPro 2.6 in Windows 10 / Windows 8 / Windows 7?
  • How to install FoxPro 2.6 on Linux OS (Ubuntu 20.04 | 20.10 | 21.04)?
  • How to install FoxPro in Windows 10 64 bit using VDosPlus?
By Karthikeyan , 28 September, 2009

clear
clear all
set talk off
store space(1) to reply
@3,5 say "Do you continue?" get reply
read
use trial.dbf
store space(20) to p
store 0 to cr, db, sno
do while upper(reply)="Y"
	clear
	@4,10 say [SlNo] get sno
	@6,10 say [Particular] get p
	@8,10 say [Debit] get db
	@10,10 say [Credit] get cr
	read
	append blank
	repl slno with sno
	repl part with p
	repl debit with db
	repl credit with cr
	@18,10 say [Do continue?] get reply
	read
	clear
enddo
	set print on
	set print to trial.out
	@2,30 say "Trial Balance"
	@3,2 say replicate("-",75)
	@4,2 say "S.No."
	@4,13 say "A/c Name"
	@4,28 say "Debit Rs"
	@4,42 say "Credit Rs"
	@5,1 say repl("-",75)

store 0 to cs, ds, sus, l
l = 6
do while .not. eof()
@l,2 say SLNO
@l,7 say part
@l,22 say debit
@l,35 say credit
if l >18
wait ""
@6,0 clear
l = 6
else
 l = l + 1
endif
cs = cs + credit
ds = ds + debit
skip
enddo
if cs > ds
 sus = cs - ds
 @l,7 say "Suspense A/c"
 @l,22 say sus
else
 if ds > cs
 sus = ds - cs
 cs = ds
 @l,7 say "Suspense A/c"
 @l,35 say sus
 endif
endif

@l+1,21 say "---------------"
@l+1,34 say "---------------"
@l+3,21 say "---------------"
@l+3,34 say "---------------"
@l+2,22 say cs
@l+2,35 say cs

set print off
set print to
return

Comments4

NAVRANG (not verified)

9 years 1 month ago

CAN U SEND ME ANY DATA ENRY FORM IN VISUAL FOXPRO I WANTS TO NEED IT MY OFFICE PLEASE IF U HAVE ANY PROGRAMME IN VISUAL FOXPRO PLEASE SEND ME AT [email protected] THANX

NAVRANG (not verified)

9 years 1 month ago

In reply to by Vuchurumadhu Reddy (not verified)

SEND your foxpro dos programming problem at [email protected] i will try my 100% to solve your problem thanx navrang from punjab

Profile picture for user Karthikeyan

Karthikeyan

9 years 1 month ago

In reply to by Vuchurumadhu Reddy (not verified)

Pls explain your issue briefly here or create a forum thread.

Vuchurumadhu Reddy (not verified)

9 years 1 month ago

sir this is madhu frm hyderabad iam using foxprod dos vertion i have small problum here no one rectification of foxpro pleasse give suggition hpw to my problum solve

Featured Blog Posts

Convert Currency in Number to Words (Indian Rupees) - MS Excel
Foxpro Tutorial and Programs
Convert Currency in Number to Words in MS Word
Convert Currency in Number to Words (Indian Rupees) - Version 2
Best way to Use Rupee Symbol in Windows – Easy steps
Convert Currency in Number to Words - MS Access
Creating All in One Windows XP DVD with all Important Applications
RSS feed

© 2009-2025 Live to Learn.In

Terms of Use | Privacy Policy