Crystal Report Not Following Original row order from Dataset - crystal-reports

Good Day!
i need a help regarding my Crystal Report, the problem is that it is not following the original order of rows in the detail section from my Query
Example:
This is my query
My Query
But here's the result in Crystal Report
Result in Crystal Report
how do i make the crystal report follow the original order of Rows in my query?

Are you grouping for something in the report ? On group expert select option on the field and choose "in original order"

Related

Crystal Reports 11: Finding where data is being filtered out

I am not a Crystal Reports developer.
In a legacy Crystal Report, I have been asked to find out why some Rows of data are being excluded from the Report Output at run time.
I copied the SQL behind the report and when I ran it in SQL Server Management Studio, those rows are not excluded. This is what leads me to conclude that there is a filter in the report itself that is excluding certain rows.
My question:
What are the different places in Crystal Reports 11 that I should look to find if any filtering is going on at run time?
I have looked at Formula fields, Selection formulas, Parameter Fields ... but though I have seen various code in those places, I have not found anything that looks like it will limit the output.
I would appreciate any pointers/suggestions.
Besides section suppression, look at:
Report, Selection Formula, Record...
Report, Selection Formula, Group...
Database joins
If the report SQL is the same as the one you checked in SSMS (including record selection formula , which will be the WHERE clause) , check report's details section suppression formula. A details row might be suppressed based on some row values

Passing result of a query as parameter in Crystal Report

I am new to crystal report, I have a report to generate which contains two queries.
I need to run the first query which returns a single column.
I need to fetch the result of the first query one by one and pass it as a parameter to the second query. And finally running the second query.
It would be helpful if anyone tell me the steps about how to do this.
I am using crystal report 2008, I hope the above mentioned information is sufficient, if not please let me know.
you need to use sub reports for this purpose...
Take query 1 in main repoirt and query 2 in sub report. Place the sub report in the section that is coming after the data in main report.
Then pass the filed of mail report to sub report using the sub report links and then apply condition on this field in sub report Record Selection Formula

Crystal Report row should change when two different field is changed

I am using crystal report 7 and the Oracle database. I have implemented the following SQL query in the crystal report:
SELECT ins.ins_name,ins.ins, SUBSTR(cardh.g_id,1,1), SUBSTR(cardh.g_id,2,2),
SUBSTR(cardh.g_id,4,2), crdi.bn,
sum(DECODE(cardh.crd_st, 'PO', 1, 0)) POCount,
sum(DECODE(cardh.crd_st, 'CN', 1, 0)) CNCount
FROM crdh, crdi, ins
WHERE crdh.crd_st IN ('PO','CN') and crdi.bn in
(select unique bn from crdh)and crdh.bn=crdi.bn and
crdi.ins=ins.ins
GROUP BY ins.ins, crdi.bn, ins.ins_name, cardh.g_id
ORDER BY ins.ins, crdi.bn;
Output of the above query:
To implement the above SQL query in Crystal Report I have made three groups on the cardh.g_id, crdi.bn, ins.ins in the same order. But Crystal report changes rows only when the cardh.g_id is changing. I want Crystal report should change rows only when the crdi.bn is also changing.
The current report is looking as follows:
The above report should be displayed as the output of the SQL query.
Screenshot for sort record expert:
ok in this case what you need to do is to group the report as the combination of fieldds you require.
Create a formula #Grouping and write the combination something like:
ToText(cardh.g_id)+ToText(crdi.bn)+ToText(ins.ins)
Now use above formula to group the report.
Edit----------------------------------------
Go to Record Sort Expert and select the required field then select asc or desc as per your requirement.

Getting sum of multiple fields in crystal reports

how to calculate {SUM} of multiple columns into a one column in In my Crystal reports.
Total=(VAT+TAX)
ok this how in general it works:
Place your data in detail section and take simmary in report footer, You can take that by right click ojn field and use insert summary option.
Now create a formula #Total
sum(Vat)+sum(tax)+sum(duty) //you can select the summary fields from report fields
Place the formula in report footer

How to get the sum of field 'discount' in crystal report

I am doing a crystal report.. In which there is a field Discount I am not getting the sum of that field while right click->Summery->Sum. I am getting other field like OrderAmount... In crystal report all data are coming.But not getting the sum for Discount.It is just showing the count of rows as Discount. Pls help...
Try using formula section of Crystal Report. Create a formula for finding the sum. Use the formula in place of Summary.
It might be look like
Formula=Sum(val({ReportField}). Change the Crystal Syntax to BasicSyntax from dropdownbox on top.