Crystal Report: Comparing 2 Years item performance based on QTY sold - crystal-reports

I am new to crystal.
I have to show the top 217 items based on the quantities shipped in 2014 and side by side 2013.
Is there way to put in one report the data.
Item1 in 2103 may not be the same as 2014.
I get the data from invoice history detail table, and add the qty shipped from all item and then sort the top 217 items on basis of the sum.
I can have them in 2 reports or the previous year data from sub-report,but then the sub report data will appear as row after the current year. however how can I put them in 1 report side by side for a better comparison.
Thanks for your help

Steps:
Create a report that does what you want for a single year (say 2013)--you'll probably want to use a top-N grouping.
Create a second report, without a datasource
import the first report into the second one (call it 'year N-1'); don't link the sub-report to the main
import the first report into the second report a second time (call it 'year N'); don't link the sub-report to the main
edit the second sub-report and set the date to 2014
If you want the report to be more flexible, create a parameter in the main report (named 'year'). Link this parameter to each of the sub-reports, changing the respective, record-selection formulas to use the value to calculate the correct date ranges.

Related

Crystal Reports: How to Use a Main Report Parameter within the Select Expert of the Subreport

Thanks for any ideas. The goal here is to show, within a subreport, YTD Sales figures. I'm struggling to successfully create the formula that will allow me to do this.
The user will input 2 values to the main report:
Fiscal Period
Fiscal Year
In the main report, I show sales for the matching fiscal period & fiscal year. That's working fine. But in the subreport, I want to show the sales for the SAME Fiscal year as given in the main report parameter, but for any fiscal period <= the Fiscal Period provided in the main report.
I've attempted to create a parameter in the subreport (YTDSalesFP) and then reference that within the select expert (eg {vSalesTYLY.Fiscal Period} <= {?YTDSalesFP} ) . After I do that, I'm struggling with the "Change Subreport links" dialog on the Main report. After all, I don't want to pass an existing column value to the subreport parameter ?YTDSalesFP} - I just want to use whatever value the user provided, and silently pass it through to the subreport parameter.
Is this possible?
What other routes would you try?

Crystal reports - Can't filter on custom formula number field

Crystal reports don't let me use a custom count formula field to filter which transactions to show in a manager report.
I'm creating a Crystal report that team leaders are supposed to take out to see on how many occasions their employees have reported in sick. A record is only supposed to show if that person has reported in sick 6 or more times the last 12 months.
The report shows a record (a page) for each employee belonging to the managers organisational unit. Below the employee information is a subreport where I show the transactions from the salary/time system. Using select expert, I have filtered out the transactions that is supposed to show. I have then created a database field that count which day was 12 months back from today, and filtered so that only the transactions falling into this period shows.
My last problem is that I only want to show the record that has a minimum of 6 such transactions during the period. I created a formula field named #Antal ("amount" in Swedish) that simply counts the distinct number of dates in the "from"-date for the salary transactions I'm showing (since a change of law 2019-01-01 we needed to create a new transaction type, so some of the occasions after 2019 may have two transactions referring to one sick leave, thus I'm counting the first day of the period instead), DistinctCount ({P_LSTAT.P_SXXX06})
Now, the subreport has a new column with Antal (amount) that counts the amount of the desired salary transaction. I then try to use the selection formula to only show records where {#Antal} >= 6 but I get the following error:
This formula cannot be used because it must be evaluated later
Is there any other (better) way of doing this, or am I simply missing something?
For your selection based on {#Antal} >= 6 you need to use the group selection formula, not the record selection formula. Record selection is used to select records which meet the criteria before reading in the data. Group selection is used to filter out entire groups of records based on summarised values, after the records have been read in and the summaries calculated - which sounds like exactly what you need here.
The value of a Formula Field is out of scope when the Select Expert is evaluated.
There is no process for calculating the value of a Formula Field before it is printed within the section of the report it is placed. The Select Expert is evaluated prior to any section of the report being printed, so at this time all Formula Fields are effectively Nothing.

Crystal Reports 11 - New page after each parameter

I am running Crystal Reports 11 and I have a report that has 7 subreports that it pulls and when done, is multiple pages long. I have three parameters I ask for. I want to change one of the parameters to allow multiple fields so I don't have to keep refreshing it but I want the report to repeat for each field value I add.
Example, the report asks for month. I want to put in January, February and March into the field value. The report then should run for each of those months and give me one large report where January and all January data is back to back and then goes to February, etc.
Is this possible?
Thanks.
Jayson
Group the report at level one by Month.
In the Group Options tab (or in the GF1 section), turn on the 'New Page After' option.

Crystal Reports: get access to linked elements in selection formula

I'm making a report using Crystal Reports 2008 and Peachtree database. Report should display customers who didn't place orders in a last 30 days. I already figured out how to link two tables in CR with left outer join. But I wasn't able to find how that linking can be used in formulas, such as selection formula. What I am trying to achieve is to get date of last placed order for current customer and use this information to determine if customer should be displayed or not.
What is the right approach to solving this problem?
Assuming your data is setup properly and adding 'customer' and 'last order date' to the details section shows you everything, then you can just add conditional formatting formula for the suppress property of the section when 'data date - last order date < 30', leaving you only showing records where last order date is more than 30 days.

how to pass formula which is in group of main report to sub report (crystal report)

This question about crystal report.
I have crystal report, which has a formula in Group Section. I want to show all the generated group names in bottom of the crystal report.
So I have insert subreport to Main report footer. Then created a formula and link it to main report
formula.
But When running, in sub report, only show last generated group name only.
How to print all the generated group names in bottom of the report.
Thank you.
If I understand what you intend to do, you have a few options:
add a Cross-tab to the Report-Footer section - this will summarized the report's data without a second trip to the database
add a sub-report to the Report-Footer section - you will have more control of the formatting, but it will require a second trip to the database
create a formula that executes at print time (WhileReadingRecords) to store the group names in an array (note: arrays hold a maximum of 1000 entries), then create a second formula (also print time), that joins the array, adding it to the Report-Footer section.