Click here to Skip to main content
15,887,392 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
If you don't understand what I say, please download and resolve.
In Report, I have issue with Opening Balance

Query is...
SQL
SELECT [5 VoucherDetail].vDate, [4 sub].sub_description, [5 VoucherDetail].Txtnarration, [5 VoucherDetail].Debit, [5 VoucherDetail].Credit, [debit]-[credit] AS Balance, [4 sub].s_code
FROM [4 sub] INNER JOIN [5 VoucherDetail] ON [4 sub].s_code = [5 VoucherDetail].s_code
WHERE ((([5 VoucherDetail].vDate) Between [forms]![frmLedger]![stdate] And [forms]![frmLedger]![enddate]) AND (([4 sub].s_code)=[forms]![frmLedger]![AccId]));


Kindly resolve this,

Here is File Link To Download
http://www.4shared.com/document/khZrBg5E/aamir_JV.html[^]

or
https://sites.google.com/site/ksenow/research-reports/JournalVoucher.mdb?attredirects=0[^]

or
VB
www.muhammad.aamir.net.tc
in Downloads (Journal Voucher.mdb) u Got That
Posted
Updated 25-Mar-11 1:50am
v11
Comments
Dylan Morley 24-Mar-11 8:03am    
What does 'Not working' mean? Does it error? If so, is there an error message?

Or does it just not do anything? Or does it do something, but not what you expected?!
[no name] 25-Mar-11 7:15am    
Hello
Dylan Morley 25-Mar-11 7:19am    
Hai
[no name] 25-Mar-11 7:48am    
www.muhammad.aamir.net.tc
in Downloads (Journal Voucher.mdb) u Got That Plz Resolved This a simple issue is The ledger Report i Define i Want Opening Balance on That its..
Dylan Morley 25-Mar-11 8:08am    
OK see my answer

A few issues here.

1) Your balance is wrong. Within the report details, you're just subtracting [debit]-[credit]. You need to create a running balance.

calculate-a-running-sum-cumulative-total[^]

That's easy in Access 2007, just put a text box on the report and set it's 'RunningSum' property

2) In the 'Opening Balance' DSUM, replace with the following

=DSum("[debit]-(credit)","5 VoucherDetail","[vnum] = " & [Forms]![frmLedger]![Accid] & " AND [vDate] <= #" & [Forms]![frmLedger]![stdate] & "#")
 
Share this answer
 
v3
Comments
[no name] 25-Mar-11 8:11am    
Iam Trying That u Said
[no name] 25-Mar-11 8:15am    
But Sir I Still UnClear that Plz u Have My Attachment Resolve This and send to Muhammad.aamir835@gmail.com it may help to me Better understand Plz Sir
[no name] 25-Mar-11 8:38am    
=DSum("[debit]-(credit)","Ledger") not working i try
[no name] 25-Mar-11 8:46am    
Report is Joint With Frmledger Form in frmledger Form Two Ubound Text for STDate And EndinDate and one ComboBox For AccountType = accid , So give That parameter Than My Report Open and Than The Opening Balance Displayed.. Consider
Dylan Morley 25-Mar-11 8:52am    
Yes it is, try it for Account Type 'Cash in hand'

* Open form frmLedger.
* Set starting date 01-Jan-11, ending Date 23-Feb-11
* Set account type 'Cash In Hand'


Now open your report. The balance will be -95,500

Are you looking for some with case

CASE WHEN "something" THEN [debit]-[credit] END AS Balance, 


MSDN[^]

*thrown a wild guess
 
Share this answer
 
v2
Comments
[no name] 25-Mar-11 6:59am    
Not The Solution u Answer that
Ankur\m/ 25-Mar-11 7:03am    
Then why have you accepted the solution?
[no name] 25-Mar-11 7:07am    
Yar App Dekho to sahi Sab Log Comment Pass kar rahey Hain App bhi Comment's dey detey

Ankur\m/ 25-Mar-11 7:23am    
[Hindi]Bina logic samjhe isko solve karna muskil hai. Ish query ko humlog run kar ke bhi nahi dekh sakte. aur toh aur 4shared most logo ke office mein block rehta hai. tumne problem bhi detail mein mention nahi kiya hai. ish tarah ki query ko part part kar ke solve kate hai. koshish karo aur agar nahi hota hai toh niche diye link par post karo. Hum aapko yaha acche se post karne me madad karenge
http://www.codeproject.com/Forums/1580229/General-Indian-Topics.aspx
[/Hindi]
English Translation: It's difficult to solve this without understanding the logic. We cannot even run this query. Moreover 4shared is blocked for most of us at work. You haven't also mentioned the problem in detail.
Bigger query are made/solved by dividing it into smaller parts. Try using the technique and if you are still not able to solve it, post it in the below link. We will help you post the question in a better way.
[no name] 25-Mar-11 7:36am    
Now Here is the Link Now Donload
https://sites.google.com/site/ksenow/research-reports/JournalVoucher.mdb?attredirects=0

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900