Within Crystal Reports I am attempting to consolidate data into a single row for Billing purposes, rather than one row for each billable charge listed on the Master Invoice. Below is the example:
ORDER# ORDERID SHIPTO CARRIER SHIP SM PACKAGE HANDLING LABELING TOTAL
1234 54321 Customer1 UPS GROUND $5.00 $5.00
1234 54321 Customer1 UPS GROUND $0.60 $0.60
1234 54321 Customer1 UPS GROUND $0.50 $0.50
ORDER# ORDERID SHIPTO CARRIER SHIP SM PACKAGE HANDLING LABELING TOTAL
1234 54321 Customer1 UPS GROUND $5.00 $0.60 $0.50 $6.10
In the report, you will have to group by order#, orderID, shipto, carrier.
Click on Insert --> Summary.
Choose the field to the summarize from the dropdown.
Under "Calculate this summary" choose "Sum" from dropdown.
Change the "Summary location" to Group #4 footer. Hit Okay.
Hide the Details section.
Drag the order#, orderID, shipto, carrier in the Group#4 footer section.
Related
I have data like this
Type Buy Sell
Car1 23000 15000
Car2 24000
Car3 25000
I used sum(#buy) for total buy field and sum(#sell) for total sell field.
Can I sum all or grand total that like sum(#buy) + sum(#sell) ?
because when I run in VB6 for preview that report, Grand total not show on, please help me master.
For this there are 2 approach.
Via Formula :- add a formula field and in that add give above condition in formula field editor. put this field in your desired location, but ideally put in report footer or group footer(if any).
Use running total or summary total.
Check this links
Crystal Report Sum of a Column data
https://forums.asp.net/t/1971464.aspx?Sum+of+Total+in+Crystal+Report+
I have fields for customer names, customer account numbers, date of previous orders, and order values. I want an alert to show which customers have ordered at least three times over the reporting period. We can have more than one invoice for a given delivery. The main report looks like:
Account Number Acct Name Order Date Order Total
1001 Fred Smith 1/2/2016 £1.06
1001 Fred Smith 1/2/2016 £2.34
1001 Fred Smith 8/2/2016 £5.42
2001 Aled Jones 1/2/2016 £2.90
2001 Aled Jones 8/2/2016 £3.45
I've tried concatenating the account number and order date in a column via function and running an alert based on its distinct count. (After converting the date to a string.) But it still doesn't generate a list of distinct items.
What I currently have in the final column is a function that concatenates the date and account number to give a unique field with {ORDR.CardCode} + Cstr({ORDR.DocDate}) - Which returns:
1001 1/2/2016
1001 1/2/2016
1001 8/2/2016
2001 1/2/2016
2001 8/2/2016
I want to generate alert based on this field via the distinct count function and a report of any customer who ordered at least twice in the report period.
DistinctCount ({#Concat code and date}) >2
Even after this I still don't get what I need. How can I get a list of every customer who has ordered in the report period for at least two times?
You have travelled half way... to achive continue from here.
USe the created formula {ORDR.CardCode} + Cstr({ORDR.DocDate}) to create a group.
place same formula in details and take count of the records in group footer
Now create a alert on group footer summation to get the desired result
Edit........
Since you need customer then add customer in concat fornula and then create group.
acctnamr+{ORDR.CardCode} + Cstr({ORDR.DocDate})
Now place the customer name in group header and follow process as explained above
Here is what my data looks like
Name Profession City Amount
Steve Student Vancouver 1000
Steve Student Vancouver 1500
Steve Student Vancouver 500
Ryan Sales Vancouver 900
Ryan Sales Vancouver 700
What I need it to look like:
After
Name Profession City Amount
Steve Student Vancouver 3000
Ryan Sales Vancouver 1600
How would I go about doing this?
TIA
Insert group based on Name
Drag Profession and City from the Detail section into the group you just created
Right-click on Amount and select 'Insert > Summary'
Change 'Summary location' to the group you created above, and press 'Okay'
Drag the sum of amount to the group header (instead of the footer)
Suppress the 'Details' section (and the 'Group footer' if you wish)
Is it possible to transpose data for a select column in Crystal? Here is my issue... I am using ttx file to get data fields for the Crystal Report...
I want only the tax_type and the tax_rate and tax amount to show up in the same row as the product sold. The tax_rate is stored in a separate table that needs to be pulled in as a column as well. I need to group and sum on product, buy, sell, tax_type, and then net the whole amount to come up with net total which I kinda know how... but I am stuck at transposing a row. Basically I only want to show row as column where tax type, amount, and rate matches transaction number and YN_tax == 1. The tax rate is stored in a totally separate table... Mind you that tax will not be applicable to each transaction... Here are the table Details
Details Table
Transaction Sales_Date buy_sell Product location ProductType price amount YN_tax tax_type
123456 11/9/2014 Sell DEF Brazil trinkets 5 703.08
123457 11/9/2014 Sell ABC Canada widget 10 213.5
123458 11/9/2014 Buy DEF Brazil trinkets 2 630
123459 11/9/2014 Buy DEF Brazil trinkets 3 34.41
123457 11/9/2014 Sell ABC Canada SalesTax 3 688.2 1 SalesTax
123458 11/9/2014 Buy DEF Brazil FederalTax 2 132 1 FedTax
Tax Rates Table
title rate
SalesTax 8.25
FedTax 9.75
You can do it follow below process.
Before proceeding link the table so that you get title and rate.
Create a formula for every column as you want in the report and write formula as below.
if YN_tax =1
then tax_type
Above formula is for column tax_type in the similar way create individual formulas for all columns.
I have seen several examples that say you can create a running total, but that doesn't work for me either. Here is my data from Oracle:
Select 19000 as sales, 'Ted' as teammember from dual
union select 150000, 'Bob' from dual
union select 80000, 'Sally' from dual
union select 8000, 'Sally' from dual
My formula for commission:
If sum({Command.SALES}, {Command.TEAMMEMBER}) *.2 < 20000
then sum({Command.SALES}, {Command.TEAMMEMBER}) *.2
else 20000
My formula for sumval:
whileprintingrecords;
global numbervar sumval;
sumval :=sumval + {#Commission};
I put teammember and sales in the Detail section. I put Commission and sumval in the Group Footer. I want total sales and total commission in the report footer.
It won't let me create a summary, so I put commission and sumval in total. The value 41,400 would be correct. The existence of Commission in the Footer does not affect the value of sumval.
My report is like this:
Bob 150,000 20,000 20,000
Sally 8,000
sally 80,000
88,000 17,600 37,600
ted 19,000 3,800 41,400
total 257,000 3,800 45,200
You can create another new formula, let's call it SumvalTotal, and do this:
whileprintingrecords;
global numbervar sumval;
sumval;
And place this in your report footer. You can use this for both your Comission and Sumval columns, since they should be the same.
That should get you:
Bob 150,000 20,000 20,000
Sally 8,000
sally 80,000
88,000 17,600 37,600
ted 19,000 3,800 41,400
total 257,000 41,400 41,400