473,396 Members | 1,996 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,396 software developers and data experts.

Add formula to Data Report

3
Hi Guys, I'm newbie in this forum,.. and i'm having trouble with Data Report.

I've been read about How to Create Dynamic Report (thanks to Creative1).
But now i have some other trouble (sorry about my English).

Here's the case:
1. I create a report for sales inventory, from two table Master_head an Mst_inv, heres the query
Expand|Select|Wrap|Line Numbers
  1.  SELECT I.`TANGGAL`, I.`PLU`, I.`Q_FIRST_I`, I.`Q_REC_I`, I.`Q_RET_I`, (I.`Q_KRP_I` - I.`Q_KRM_I`) As Koreksi, I.`Q_TRS_I`, I.`Q_STK_I`, MH.`DESCP` FROM `M_MST_INV` I INNER JOIN `MASTER_HEAD` MH ON I.`KD_STORE` =  MH.`KD_STORE` AND I.`PLU` = MH.`PLU` WHERE VAL(FORMAT(I.Tanggal,'YYYYMMDD')) >= & Val(Format(DTPicker1.Value, "yyyymmdd")) &  AND VAL(FORMAT(I.Tanggal,'YYYYMMDD'))<= & Val(Format(DTPicker2.Value, "yyyymmdd")) Order By I.`TANGGAL`, I.`PLU`
  2.  
2. Now I want to count differenc stock between first record and the second record, here's some algorithm:
Expand|Select|Wrap|Line Numbers
  1. If I.Q_FIRST_I <> I.Q_STK_I THEN
  2.        Difference_Stock=I.Q_STK_I - I.Q_FIRST_I
  3. ELSE
  4.        Difference_Stock=0
  5. Endif
  6.  
but i'm having trouble to use this formula in Data Report.
Could Some one help me? I know it's possible if use Template table, but this two table Contains Huge records, and i think it took A long time to get the result.

I hope some one could help me ASAP, or can send me and email to dsugihatna@gmail.com
Nov 23 '07 #1
1 2081
lotus18
866 512MB
Hi Guys, I'm newbie in this forum,.. and i'm having trouble with Data Report.

I've been read about How to Create Dynamic Report (thanks to Creative1).
But now i have some other trouble (sorry about my English).

Here's the case:
1. I create a report for sales inventory, from two table Master_head an Mst_inv, heres the query


Expand|Select|Wrap|Line Numbers
  1.  SELECT I.`TANGGAL`, I.`PLU`, I.`Q_FIRST_I`, I.`Q_REC_I`, I.`Q_RET_I`, (I.`Q_KRP_I` - I.`Q_KRM_I`) As Koreksi, I.`Q_TRS_I`, I.`Q_STK_I`, MH.`DESCP` FROM `M_MST_INV` I INNER JOIN `MASTER_HEAD` MH ON I.`KD_STORE` =  MH.`KD_STORE` AND I.`PLU` = MH.`PLU` WHERE VAL(FORMAT(I.Tanggal,'YYYYMMDD')) >= & Val(Format(DTPicker1.Value, "yyyymmdd")) &  AND VAL(FORMAT(I.Tanggal,'YYYYMMDD'))<= & Val(Format(DTPicker2.Value, "yyyymmdd")) Order By I.`TANGGAL`, I.`PLU`
  2.  
2. Now I want to count differenc stock between first record and the second record, here's some algorithm:
Expand|Select|Wrap|Line Numbers
  1. If I.Q_FIRST_I <> I.Q_STK_I THEN
  2.        Difference_Stock=I.Q_STK_I - I.Q_FIRST_I
  3. ELSE
  4.        Difference_Stock=0
  5. Endif
  6.  
but i'm having trouble to use this formula in Data Report.
Could Some one help me? I know it's possible if use Template table, but this two table Contains Huge records, and i think it took A long time to get the result.

I hope some one could help me ASAP, or can send me and email to dsugihatna@gmail.com
What probably will be the result if you use that formula? Are you using your formula during on the run time? Or it is defined on query on the database and retrieve it during run time?
Nov 23 '07 #2

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

Similar topics

1
by: RedZebra | last post by:
Hi I am calling and viewing Crystal Reports in internet explorer(using ASP pages) by passing them the selection formula for the main report. Its working fine. The problem is when the report has...
0
by: Michelle Stone | last post by:
I have bound a Crystal Report to a dataset that contains two fields "var1" and "var2" both of which are of DOUBLE type. I want to display the sum of the two on my report. So i created a...
0
by: Srijith Augustine | last post by:
Hi, Record selection Formaula is not working while exporting the report to Excel There is absolutely no problem while using a crystal report viewer but if i export it to a excel the selection...
1
by: Roy | last post by:
Ok, here's my problem and I'm a first year webbie, so you'll have to bear with me. I'm converting some Access reports over to a .NET website. It's your typical Access cluster$#@$ (pardon my...
0
by: RJN | last post by:
Hi I have a main report and a sub report. I have a formula field on the main report and one on the sub report. I want the formula in the subreport to be evaluated after the formula in the main...
0
by: RJN | last post by:
Hi Sorry for posting this message again. I have a main report and a sub report. I have a formula field on the main report and one on the sub report. I want the formula in the subreport to be...
0
by: rjn | last post by:
Hi I have a main report in which I have inserted a sub report. I have a formula field on the main report and one on the sub report. I want the formula in the subreport to be evaluated after the...
7
by: Bobh | last post by:
I am trying to figure out some code for a report issue; I have an employee who has a incentive scheme. I have a report showing various income amounts and in the report footer I vae totals for...
0
denny1824
by: denny1824 | last post by:
I have a crystal report that someone else wrote and already has a Formula Field if Criteria then (Count ({FirstField},{SecondField}) / Count ({FirstField})) When the Criteria is true, this...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.