Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > Crystal Reports
|
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 3rd, 2006, 04:07 AM
Authorized User
 
Join Date: Jun 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Displaying the previous days balance in report

Hi Guys,

I want to display a report like this

     Date Balance on Date Credit Debit Current Balance
   02/05/06 0 1200 0 1200
   05/05/06 1200 500 0 1700
   10/05/06 1700 0 200 1500
   15/05/06 1500 200 0 1700

I mean for the new date the balnace of the previous day transaction should be displayed.
How can it be done?
Any help is greately appreciated.
Thanks in advance

 
Old June 5th, 2006, 06:44 AM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 221
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,

There are two phases in your work

1. Direct Table
2. Custom Stored Procedure.

If you have the data in the table as you want to show, then you can
use the table directly #1 and drag the fields on the report as needed.
(This case , as of my knowledge, no one stores the data like this.)

OR

2nd method is the best to create the Stored Procedure and create #table
or declare table datatype and add all fields as you need to show the data
on the report. Then using SQL queries get the data, change the data as needed
through SQL programming tech and insert them to temp table or table varible.
Loop to all records, that depends how you execute the SQL select statement
with the CURSOR.

Finally, refer this SP, in the report. And there you will see all those
fields that you declared in SP (#table or table datatype). Align the fields
as needed on report.

So you get the data as you wanted.

In such case of reports, its better to write SP and use them. I always prefer
SP rather than tables. This is my way. I am happy with the flow which i use.

Just give a try on this, might you get end with satisfaction of the output.

Hope this helps.


With Regards,
Raghavendra Mudugal





Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying Matrix Report Ahmed-Deq Classic ASP Basics 3 February 19th, 2008 11:56 PM
Compute Balance zone Excel VBA 2 August 17th, 2007 09:16 AM
Problem in displaying image in report hthakkar BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 2 March 1st, 2006 10:26 PM
DB CR Balance in Form mateenmohd Access 4 October 12th, 2004 11:32 PM
Which is Best For Balance tables alyeng2000 SQL Server 2000 1 March 9th, 2004 09:28 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.