I am attempting to achieve the top result (4 rows) through a Crystal report, but can't figure out the group bys in Crystal. The bottom table is wrong since it adds freight to each subtotal. the freight should only be added once since its the same order.
I've attempted the below group bys through Group Expert but only one row shows up.
Thanks
Group by Customer# and on GroupExpert instead of -A ( in asceding order) choose -O (Original Order)
Related
I am attempting to group by order #, and display this as one row.However since the same order #, the 'Total' should only add 47.66 once.
I've attempted to use the group expert to no avail. I can do this in SQL but can't design it Crystal reports.
Create a new group by Order # and move all items from the detail section to the header of the Order # group. This should do the trick of displaying it as a single row.
Good people of stack overflow.
I am stuck on this one.my crystal report is using a joined query
str = "SELECT invoices.voucher,
invoices.customer_name,invoice_details.item_name,
invoice_details.Amount FROM invoices
LEFT OUTER JOIN invoice_details
ON invoices.voucher =invoice_details.voucher "
The crystal report is grouped by voucher and the details are placed on detail section of group details to display item name and item amount.
It is working perfectly in design.
However at run time in VBNET when i select exactly the same query i get repeating line items. Example if the invoice items in invoice_details table were three in my report the three items will be repeated three times.
I have checked all over the internet for the same complain. No luck.
Someone suggested "suppress if duplicate" on an item with unique number such as voucher number. I did not get success.
Has someone met this difficulty and can you suggest how to resolve this?
If it can be of help to someone else...
My difficulty in duplicating line items was coming from using two tables, invoices and invoice_details when designing the crystal report.
And then using the link feature at crystal report design.
I had not realized i ought to have designed crystal report using a stored view (access query from the database). While using the stored view i did not do any linking at designing report but used grouping expert to group by invoice numbers.
So the report finally worked well after much frustration.
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.
So I have a simple crosstab report that calculates number of sales in the columns, and the rows are each office. The last column on the right is a total column, which contains a summary field (via a count of the identity field) that adds up the total number of sales per office.
How can I sort the crosstab data so the office with the most sales is the top row, and the rest in order under it?
Try this: Right-click on the crosstab. Go into the Group Sort Expert menu. There you will see options to display the top N rows, Sort All by the aggregate of a field of your choice, etc.
(I'm using Crystal XI. If your version is different, this may not work exactly)
I'm trying to show employees at a company grouped by worked and still working (in vs2005 crystal reports).
The user can pass by parameter a list of companies they want to show.
Tables: VRP-COMPANY, VRP-COMPANY-OPPORTUNITY, VRP-OPPORTUNITY-PRODUCT
The record selection formula: {VRP-COMPANY.COMPANY company} in {?companies}
Grouping is done on: VRP-COMPANY.COMPANY company, then formula to decide its working or worked and then on productname.
Now when I run the report I only get to see the companies who have got entries in the VRP-COMPANY-OPPORTUNITY. I want to see the company name (group) even if there are no entries in the opportunity table. How to do this in Crystal Reports? I tried Left join between company and company-opportunity tabel but no effect.
I found the problem. Left join was correct but I had an additional select formula (on opportunity status to be closed-won. Therefore it let out the record. The record can also be null when there are no opportunities.
Should the question be deleted?