Crystal Reports Conditional Grouping on Unrelated DB Field - crystal-reports

I have some data in table SSTemp like this ("..." indicates data omitted for readability):
Month Year Number Gross Net
1 2013 1 1,000 500
2 2013 1 1,000 500
...
12 2013 1 1,000 500
1 2014 1 1,000 500
2 2014 1 1,000 500
...
12 2014 1 1,000 500
1 2015 1 1,000 500
...
12 2015 1 1,000 500
I am new to Crystal Reports and am using version 8 (no, we can't upgrade). I want to roll up the totals for all line items in years past and leave the data as-is for the current year in the same report. Database field {CONTROLFILE.CURRENTYEAR} contains the current bookkeeping year for our system which is vital to determine the rollup groups. The CONTROLFILE table contains general settings for the system and has no data in it useful for JOINing, however I need to consider CURRENTYEAR for the grouping. The MONTH column should be blank on the summary lines, and indicate month on the current year lines. The end result data should look like this:
Month Year Number Gross Net
2013 12 12,000 6,000
2014 12 12,000 6,000
1 2015 1 1,000 500
2 2015 1 1,000 500
...
12 2015 1 1,000 500
Any suggestions would be most appreciated!

Use sub report concept.
In main report calculate for previous years in sub report calculate for current year.
In main report group by year And suppress details show summary in group footer in another group footer section place sub report and just place data in detail part don't group

Related

Inventory transaction sum for each month

i have a table with detail transaction for lot. Lot are harvest and store before being ship.
Date lot transaction qty
5 sept 3 store 300
8 sept 3 ship -50
10 oct 3 ship -20
15 nov 3 ship -20
...
If i want the inventory for a specific moment, i simply sum between to date
I would like a query that can give me a sum from store to a specific month throught the entirr year like:
Lot sept to oct to nov ...
3 250 230 210 ...
Select lot, sum(qty) from ... where (date > 1 sept and date < 1 oct) as sept, (date > 1 sept and date < 1 nov)... group by lot
I did'nt find anything or figure out how to do it i a simple query.
Regards
Obtain one table with a query where is see the evolution of quantity over the year.

Flutter datatable with splited rows

Hi every one Flutter Guru,
I am trying to create a data table in which I will put the daily collected eggs of the farm. I collect the eggs sometimes 3 times a day, sometimes more than 3 times. The table will contain the date of the collecte, the number of collected eggs for each time and the total number of eggs collected for each date.
The layout should be like below:
Date of collecte
Hour of collecte
Number of eggs
Total
April 16, 2022
08H10
10
14H25
23
41
18H05
8
-------------------------------------------------------------
April 17, 2022
09H00
19
13H45
23
42
-------------------------------------------------------------
Howto do that in Flutter datatable?
Thanks for all.
A.KOTE

Crystal Report that has group summary only

I have a crystal report that uses two groups for counting sales by year & month. I would like to know how to display the summaries across the page rather than down.
2009
jan 15
feb 5
etc,
2010
jan 30
feb 18
I would like the report to be as follows:
2009 2010
Jan 15 30
Feb 5 18
Thank You
You can use Cross Tab like this:
right click to your report white space > Insert > Cross-Tab...
Select columns, Rows, Fields to Summarized whatever fields you want.
Then move it to Section 4. Good Luck!

Hide Total Row in Rep[orting services

I have a report with total lines after a show is being reported.
A show may run a week or several weeks. I want to hide the total line when there is only 1 week for the show but display the total line when there are more than one week. The example below should hide the Total row for "An American In Paris" but show for the other shows because they run for more than 1 week.I group by performance, week, start date.
I have tried:
=IIF(SUM(Fields!week_performance.Value)<=1,True,False)
and
=IIF((Fields!week_performance.Value)<=1,True,False)
neither seems to work, even if week = 1 the total line still shows
Performance week sales
A Gentlemens guide to Love & Murder 1 1500
2 2000
Total 3500
An American in Paris 1 1800
Total 1800
First Date 1 1900
2 2100
3 1800
Total 58000
I think what you need is the CountRows() function. In this case, using it as follows will default to the current scope (i.e., the group of the showing, in this case) and should count just 1.
=IIF(CountRows() = 1,true,false)
In addition to CountRows(), if you had some unique value per showing, you could use the following:
=IIF(CountDistinct(Fields!UniqueID.Value) = 1,true,false)
If this doesn't work, reply as a comment and I'll do my best to help.

LOD Workaround with Tableau 8.3

I'm new to Tableau. I have a customer-event table to show which customers attended which events (like webinars, etc). One of fields is sales - which is the sales for that customer 30 days from the date of the event.
custid eventid eventdt 30daysales
1 aa jan 1 $100
1 ab jan 1 $100
2 aa jan 2 $150
Note that customer 1 attended 2 events on the same day. So the sales number is duplicated. If I were building a report for a single event, it's no problem. But when I build a monthly report, I want sum(Sales) = $250 and not $350.
My report sample:
Month eventcount customercount 30daysales
Jan 2 2 $250
With tableau 9, I read that using an LOD formula would allow me to sum sales on a per customer basis. But I'm on Tableau 8.3 and I'm wondering what the manual workaround is.
How do I write the calculated field to compute the 30daysales without duplicating?