473,387 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

how to calculate data at run time in crystal report 10

284 100+
how can we calculate data at run time in crystal report 10
i had made three fields in my database name
debit,credit , balance
debit and credit shows data directly from database now i want
a third field balance which is not stored in database and it has
to show the debit -credit values in report after each recodd
like
de cr balance
10 0 10
0 10 0
20 0 20
how can i do this.

second i also want previous balacne at the top which is the
sum of all the debit-sum of all the credit before that date
i know the query about this but how can i show it only one at
the beginnig of the report and add that value in first record in
the balance field

thanks in advance
Oct 22 '07 #1
8 4477
debasisdas
8,127 Expert 4TB
Try to add a SQL Expression field to the report. That can easily solve your problem.
Nov 4 '07 #2
QVeen72
1,445 Expert 1GB
Hi,

In CR Designer, Add a Formula say MyBal:

Expand|Select|Wrap|Line Numbers
  1. {MyTableName.Debit}-{MyTableName.Credit}
  2.  
And then Place it in the Detail Section of the Report , hide this formula and Add a Running Total for this Formula..

Regards
Veena
Nov 4 '07 #3
muddasirmunir
284 100+
this code only add or subtract the debit and credit field at the
current line ok
now i also want to add in it the balance of the previous line
of the report
how cant i take the value of the previous line just above any line
of recorset .
if you can explain i will be thank ful



Hi,

In CR Designer, Add a Formula say MyBal:

Expand|Select|Wrap|Line Numbers
  1. {MyTableName.Debit}-{MyTableName.Credit}
  2.  
And then Place it in the Detail Section of the Report , hide this formula and Add a Running Total for this Formula..

Regards
Veena
Nov 4 '07 #4
muddasirmunir
284 100+
thanks Veena,
for solving my problem.
Nov 4 '07 #5
muddasirmunir
284 100+
hi all

now i am facing anothe problem in it , as long as balance is concrned
running field sovle my proble now what i want to add a spcific number
it may be 0 or from query sum(debit)-sum(credit) to the firslt
record of the runnig total
Nov 5 '07 #6
QVeen72
1,445 Expert 1GB
Hi,

Write another Formula say :

Expand|Select|Wrap|Line Numbers
  1. If RecordNumber =1 Then
  2.   200
  3. Else
  4. 'Your old Formula
  5.  
Regards
Veena
Nov 6 '07 #7
muddasirmunir
284 100+
now , there is another porblem i am facing
i made a formulal field and give theme a code
Expand|Select|Wrap|Line Numbers
  1. (slaes.credit)-(sales.debit) +200
and then made a runnnig total of formula field
its work fine

but i know want not to add 200 to it but want to add the resulte
of the following querey

"select sum(credit) - sum( debit) where date < userinput"
or
the number which is is any form for this i use the following formula

(slaes.credit)-(sales.debit) + form1.text1.text
but its shows an error

i want answer of how inseted of 200 we give number given by the query
and
how to add number which is in form1.text1.text
how to solve this
thanks






Hi,

Write another Formula say :

Expand|Select|Wrap|Line Numbers
  1. If RecordNumber =1 Then
  2. 200
  3. Else
  4. 'Your old Formula
  5.  
Regards
Veena
Nov 8 '07 #8
QVeen72
1,445 Expert 1GB
Hi,

Create One more formula say F_OpBal
Initially assign Zero to this formula.
and pass the Textbox value From VB6..

and in CR, use this :

Expand|Select|Wrap|Line Numbers
  1. (slaes.credit)-(sales.debit) + {@F_OpBal}
  2.  
Regards
Veena
Nov 13 '07 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Manal/report designer | last post by:
Thank you in advance for any suggestions... I'm using crystal reports version 8 & SQL server. I've created a report that is composed of 2 parts: 1st part contains the main report which uses...
3
by: Thad | last post by:
I'm new to C# and I was trying to create a Crystal Report. I've designed a simple report and I've used several methods for attaching fields to the report at design time. I've used a DataSet that...
3
by: Diggler | last post by:
I was working on a report that is populated with three different tables in a strongly-typed dataset. The tables are populated from custom objects rather than directly from SQL Server. I loop...
6
by: Ray | last post by:
Hi all, While I use the ReportDocument of vb.net to set filter to the data to the Crystal Report, it is successful for the first time while running the program. However, for the second time while...
0
by: Ray | last post by:
Dear Bernie, Yes, if the same pfieldname is used. The same data will be filtered. But I only use the code shown you before. I have not used any dataset or datatable. How to fix the problem?...
3
by: Tyranno.Lex | last post by:
I am using Visual Studio .NET 2003 and have successfully deployed a commercial web application written in C# and ASP.NET. I am now wanting to add reporting using Crystal Reports and am having a...
1
by: sandeepjakhotya | last post by:
Hello All Enyone knows how to change DB Location for the Crystal Report in VB 6. I have created a application in vb 6 and report in crystal report 9.0 The report created is then added to vb...
11
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
How can I stop receiving this message while calling a crystal report? "The report you requested requires further information." Thanks
8
by: Brock | last post by:
I am trying to populate a Crystal Report from data in my DataGrid. The reason for this is that I want the user to be able to change values without updating the database, but still have their report...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.