Crystal Reports 2013 - Running Total with Weekly Data - crystal-reports

I'm a beginner with Crystal Reports. I'm using Crystal Reports 2013, and I've made a report with a structure like:
<Person>
<date>
<sale amount>
<sale amount>
<sale amount>
So I'm grouping by Person, and then by date. (And sorting by time). Now, Crystal Reports decided to also group my data by the week. That's perfectly okay by me. But how do I calculate the weekly total sales?
More specifically, I don't know "why/how" the report is automatically grouping by week.
So here's what I've tried: I created a running total field for the sale field. But:
If I set it to group on the date field, it groups daily. (Fair enough, except it's inconvenient)
If I set it to group on the person field, it keeps a running total of all sales through that week.
Here's the thing though: I'd like the report to group the data into weeks by default, and keep a weekly total. But I'd also like to include the option to group the data into months, and have the running total know that it should be a monthly running total. So far, I've only seen a way to keep a daily running total.
So, I guess specific my question is what group is Crystal Reports grouping by when it automatically groups by week? If this is the wrong question, any other advice to achieving my goal would be helpful, though.
Thanks!

Its your running total that's probably doing it.
Have you tried using the sales amount field straight away and then insert Summation of the field on the group footers? YOu may not need to use running totals.

Related

Financial formulation in Crystal Reports

I need help with creating a trial balance report for a specific tenure, from beginning of fiscal year to a selected period. I need this in Crystal Reports.
I am unable to formulate how can I get debit and credit amounts totalling from beginning of the fiscal year till the end of selected period (not YTD).
For example, I want to get a trial balance report till period 6 (June), I am able to get the balance at the end of period 6, but unable to formulate total credits and total debits for selected number of periods/months. Instead, it is either debit/credit amounts for June or it's for total debit/credits till date.
Can anyone help me please?
Create a formula that returns, for each record, it's dollar amount if it's within the target date range, otherwise, zero.
Sum that formula to get the total for that time period.
I'm a user of the DelmiaWorks/IQMS ERP solution as well. IQMS uses a stored procedure to populate a database table named "C_TRIAL_BALANCE_AS_OF". When you publish a report into IQMS, there is a field named "Execute Before Print" on the Edit Report Definition window that opens when edit a report. To run this stored procedure in conjunction with another report, you will want to choose "POP_C_TRIAL_BALANCE_AS_OF" in the drop-down box control for this field. This will ensure the procedure is run prior to the report so you have the account balances you need as of a specified date. When the report is executed, IQMS will present the user with a Date Picker for the As Of Date. Almost all of the data you need to do a Trial Balance report can be found on this calculated table. The only joins needed should be "V_GLYEAR_PERIODS", "V_GLACCT", and "EPLANT".
There is a built-in report that may do what you want already though. If you begin the Trial Balance module and then click "Reports" > "Print" to bring up the list of all reports, then look for one named "Trial Balance As Of". Even if this report is lacking some information you need, it will likely be much easier to edit this existing report than it would be to create one from scratch.
If you don't have this built-in report, you may be able to get a copy of the RPT file from their support department. As long as you have the Trial Balance module, you should have this report. Its a standard report that is included in every version of IQMS I've worked with. However, my experience is limited to the 15.3 and 2020 versions.

Crystal Reports 2008- How do I get the median of a summarized field?

I need a way to work around Crystal's inability to summarize a summary.
Data Sample:
Shipment Number and Sum of $ Paid:
shipment #1 $1089.34; shipment#2 $985.22; and shipment #3 $1002.87
I have grouped my data by Shipment Number and summed the $ Paid for each shipment. Different deliveries were on each shipment so I had to sum the $ Paid to get the total amount paid on each shipment. Out of this list of sums, I need to find the median. I know this would be easy to do if I exported to excel, but I need to have it built into the Crystal Report.
I know writing a simple formula such as median(sum($paid)) does not work. The error message "this field cannot be summarized" confirms that Crystal does not have the ability to summarize a summary.
Please help! Any work-arounds are greatly appreciated.
You can achive this by using Running total.
Take running total for paid and another running total for count then use both in a formula to find the median.

Crystal Reports Record Selection and Summary Field conflict

I am really new to Crystal Reports and I am looking for any suggestions on how to approach the following issue:
I currently have a report that uses a record selection to limit the results by date. I would like to include in this same report a summary a total count of all the records (ignoring the record restriction). Unfortunately (although somewhat expected), the summary calculates the total after the record restriction is applied. Is there any way to get around this? In case my question is a bit unclear I've included a generic example below:
I have a report that pulls info from a database with a total of 10 records.
I select a specific date range, and it only returns 3 records
I would like to include in the report footer that 3/10 records are getting returned.
This is bit tricky to perform in crystal reports as record selection is compulsory applied. However you can overcome this by using sub report.
Calculate the report footer using report.
This will surely work

Create a chart using the records of certain type grouped by month, with a moving balance

I am trying to create a chart (bar or line) in crystal from one table in my database (Sage CRM).
The records are as follows
CustomerId Date Invoice Amount
1234 3/4/2013 Cust Invoice 3322.00
1234 3/4/2013 Payment 2445.00
1234 4/5/2013 A/c transaction 322.00
1234 5/6/2013 interest 32.00
1234 6/6/2013 payment 643.00
So I would like to have a report that meets the following criteria
Only records for the last 12 months grouped in month
Only invoice types of payment, invoice and interest
A moving balance that calculates all the invoice amounts ie
(when displaying the information for July 2012, the moving balance will be the total of all invoices prior to this date.
Without this field I can create the chart no problem using select expert but I am not sure now what to do)
Should I use a cross tab? if so how will I do the selection to only show the invoices I want and the the date range I want?
After spending almost a week on this problem, with a lot of help from an expert I have finally got a solution.
In order to create a amount that is the sum of all records for a company, month and invoice type since the beginning of time, while only displaying records for the last year, I have created a SQL command
Select
//All of the fields for the report,
movingBalance.Amount
from myInvoiceTable as mit
<join to any other tables for the report>
left join (
select customerID, sum(amount) as Amount
from myInvoiceTable
where Record_Type in ('Payment', 'Invoice','Interest')
and Date < {?Report Start Date}
group by customerID) movingBalance
on mit.customerID = movingBalance.customerID
where mit.RecordType in ('Payment', 'Invoice','Interest')
and mit.Date >= {?Report Start Date}
and mit.Date <= {?Report End Date}
There are a couple of tricks to using commands:
For performance reasons you generally want to include ALL of the data for the report in a single command. Avoid joining multiple commands or joining one or more tables to a command.
Filter the data in the command, NOT in the Select Expert in the report.
Create any parameters in the Command Editor, not in the main report. Parameters created in the report won't work in the Command Editor.
This has done the trick.
Create Date Parameters in the report to filter out the records at the time of fetching now when you run the report you have left with the data you need.
Now you can manuplate the data inside report using formula fields.
Accoding to me writing stored procedures is a bit hectic task as you can manuplate the data inside the report. I don't have any intentions to disrespect anyone opinions but frankly its my opinion.
In that case Rachsherry I would recommend the following.
For criteria parts 1 & 2 I think instead of using stored procs, it may be easier for you to use a formula.
For invoices right click the invoice field, then "Format Field" in the common tab next to the Suppress option there is a formula button, enter the following...
IF {YourInvoiceField} IN ["Payment", "Invoice", "Interest] THEN FALSE ELSE TRUE
For your date requirement you need to use a selection formula... The code for that should look something like this
{YourDateHere} > DateAdd ("yyyy", -1, CurrentDate) AND {YourDateHere} < CurrentDate
The above code basically looks at dates between the day the report is run, and exactly a year before.
For your moving balance, you should be able to achive that with the guide here
Edit - An alternative to this is to use parameter fields (Which I don't personally like) it just means having to input the parameters every time the report is refreshed, they are self explanatory but you can find a guide here

Backward looking back log report

I'm trying to write a backlog report in Crystal Reports XI attached to Fluke Met/Track database (Sybase back-end)
I have it running between a start & end date, then grouped by Month and then Day.
I need it to show all of the units that were in the lab on the days between the start & end dates
October Units
2
22525
22526
3
22525
22526
22527
4
22526
22527
22530
The order of the units doesn't matter, just that the units are showing up.
Maybe I'm just having a rough day, but I'm not seeing how this can be accomplished.
You can accomplish this by adding a group for your date, opening up the Group Expert, click your Group click Options, then you should see something along the lines of "The section will be printed:" and you can select: for each day.. This should allow grouping for each day.