Add group and sub group in one group in crystal report - crystal-reports-2010

I have 2 fields Cluster and saales organization.
like
Cluster Sales organization
_______ ___________________
CL1 ORG1
CL1 ORG2
CL2 ORG3
CL2 ORG4
I need to create a formula to display the values in following way
ORG1
ORG2
CL1
ORG3
ORG4
CL2
Can any one help me to produce this.

You need to create groups and specify field from datasource (CL1,CL2 containing as value).
Then simply place the field which has ORG type value just beneath this group.
And grouping will be done automatically.

Related

I would like to create an efficient Bigtable row key

I would like to create an optimal row key in Bigtable. I have a table channel_data with 3 columns: channel_id,date,fan_count.
channel_id
date
fan_count
1
2022-03-01
5000
1
2022-03-02
6000
2
2022-03-01
200
2
2022-03-02
300
3
2022-03-03
1000
Users of our application can set up brands/buckets by adding multiple channels. Users can choose any random channel_id.
I want to design an efficient row key to fetch aggregated fan_count in a date range for a brand.
Let's say the user creates a brand with channel_id 1 and 3 and wish to see sum of all fans for the time period 2022-03-01 to 2022-03-03
The result should be 5000+6000+1000=12000
You have a few options here. Because you're looking to do queries based on date, you should probably make that the end part of your rowkey so you can scope down by brand first. You could also use timestamped cells to store multiple values for each channel. Perhaps a week or month of data, so it is grouped together in that way, but this isn't necessary.
Perhaps a rowkey like channel_id/yyyy-mm-dd is what you'd want. You can choose to store the date and channel info in the table, but it isn't necessary since you'd have it in your ids. You can just treat Bigtable like a key/value store in this instance which might be more optimal depending on your scenario.
If you choose to store a month of data per row, you would just make the rowkey something like channel_id/yyyy-mm and just timestamp each value for the day.
Either way for your queries, if you need multiple channels, then you could just do multiple reads or a multi-prefix scan. Let me know if this helps clarify the schema design and if you have more questions.

Create complex Oracle report

I have a sale table with the following columns:
name, city, area, target, date, sale
I want to show 8 different area data on a page. Please guide me what I need write 8 queries or we have any other solution. To create a report in Oracle like I show in image please help me how I do this. Thanks waiting your kind response..
You'll need to organize your result set into groups. Groups indicate result set records that have something in common (such as all areas of New York).
In general, this structure will suit for your needs:
Group 1: City, Name -> Group 2: Area, Target -> Group 3: Date, Sale
For all groups declared, a repeating frame is created. You'll need to use a grid layout for the repeating frame of Group 2, in order to get the desired output.

Google Sheets For Filtered Drop Down

I have two sheets: CONTACTS and UPDATES.
On the CONTACTS sheet there are 2 columns: COMPANY and NAME. If I have 10 contacts at a company, then there will be 10 rows with the same company in column 1, and the names of the 10 people in column 2. Now of course there's a lot of companies and names on this list.
On the UPDATES page, column 1 is a drop down that lets me select the name of the company. In column 2 I want to have a pull down that filters and shows me only the people in the company that's in column 1.
I've searched quite a bit and while I have found things that are similar, none of the tips are quite right / work for my use case.
Is there an easy way to do this?
Thanks for your help!
You can use UNIQUE + FILTER to filter the results, but that won't give you the a dropdown. For a filtered dropdown, you can use the formula to get the filtered list and then use that as your range.
For example, in your CONTACTS tab, add a new column FilteredList, with this formula in the first row:
=unique(filter(B:B,A:A=E1))
where B:B is the NAME column, A:A is the COMPANY column and E1 is where you select the company name on the UPDATES page.
Now, instead of making the NAMES list as your valid entries, set it to FilteredList.

Ms Access 2007 - Can sort or group report but not both, can't figure out why

I'm stuck and confused and hopefully can get some help here. I have a query that pulls info from two tables and a report that reads it. My two tables are as such: One of the is a Contact list with phone numbers, names, and addresses. The other table is a paid history. The PhoneNumber field is how they're tied together. There are no duplicate entries in the Contact table but there are multiple paid instances per phone number in the other table.
My report groups them on the phone number, but I also need it to sort by date. My date field is marked as time/date, and it is in the paid table. The issue I'm running into is that I can either Group on PhoneNumber OR sort on the Date field but not both. When I set the Group as the top level, it ignores the Sort that I have set below it. If I take the sort and drag it up so that it becomes the top level, it won't group. When it doesn't group I'm left with multiple instances of the same Contact info... as in I get a new listing for every date that it has ever paid, whereas I need one a single Contact listing with each paid instance to be grouped underneath it.
Here's my query SQL:
SELECT
tblContributorsLead.FirstName,
tblContributorsLead.LastName,
tblContributorsLead.Address1,
tblContributorsLead.ZipCode,
tblContributorsLead.CityName,
tblPledgesLead.PledgeAmountRecd,
tblPledgesLead.DateRecd,
tblPledgesLead.PhoneNumber,
tblPledgesLead.DispositionTime,
tblPledgesLead.Agent,
tblPledgesLead.CampaignName,
tblPledgesLead.Custom20
FROM
tblContributorsLead
INNER JOIN
tblPledgesLead
ON tblContributorsLead.PhoneNumber = tblPledgesLead.PhoneNumber
WHERE
(((tblPledgesLead.PledgeAmountRecd)>0)
AND ((tblPledgesLead.DateRecd) Is Not Null));
Why would I only be able to either group OR sort but not both at the same time?
Edit: http://icloudbackups.com/stripped.zip is a copy of my database stripped down.
I think I understand now what you wanted - to have the phone number groups with the most recent dates show up at the top. To do this you need to identify the Last (or First if you need it the other way around) DateRecd for each PhoneNumber.
SELECT SortingAndGrouping.LastDate, SortingAndGrouping.PhoneNumber, tblPledgesLead.DateRecd
FROM (tblContributorsLead INNER JOIN tblPledgesLead ON
tblContributorsLead.PhoneNumber = tblPledgesLead.PhoneNumber) INNER JOIN
(SELECT CDate(Format(tblPledgesLead.DateRecd,"MM/DD/YYYY")) As LastDate, tblPledgesLead.PhoneNumber
FROM tblContributorsLead INNER JOIN tblPledgesLead ON
tblContributorsLead.PhoneNumber = tblPledgesLead.PhoneNumber
ORDER BY tblPledgesLead.DateRecd DESC) AS SortingAndGrouping ON
tblContributorsLead.PhoneNumber = SortingAndGrouping.PhoneNumber
ORDER BY SortingAndGrouping.LastDate DESC , SortingAndGrouping.PhoneNumber, tblPledgesLead.DateRecd DESC;
You will need to add the additional fields you want to display (I removed them here for clarity), and have the report enforce the same sorting I have here - Create a group for the LastDate column, then a group for the PhoneNumber column, then have the sorting specified.

Get statistic of record counts from FileMaker using AppleScript

Can somebody advise whether there's a good built-in way (= AppleScript command) to pull out statistics for a DB:
I need to count the number of occurrences of a string in a particular field over all records.
E.g. for a record that has
Name
Phone
Town
the script would return how many records exist with identical towns.
Step 1 - Create a relationship.
- File > Manage Database > Define Database
- Relationships tab
- Duplicate your table occurance and name it (I used related_towns)
- Drag a relationship between the two from town to town
- Click OK.
Step 2 - Create a calculated field that counts the instances of the related (duplicative) town name.
File > Manage Database > Define Database
Fields Tab
Type in the name of your new field (I used number_of_related_towns) at the bottom of the screen
Select "Calculation" from the field type list
Count the times that the town appears in your relationship with this calcuation:
Be sure that "Evaluate this calculation in the context of" is set to the name of your base table (what your layout is based on). Replace related_towns with whatever you named your new table occurance.
Step 3 - Write a script to display your data.
Scripts > Manage Scripts
New button (bottom left)
Rebuild the screenshot below. I added comments, which hopefully explain?
Let me know if you have any questions.
I would do this in FileMaker. It is built for exactly this. Do you know how to do it in FM?

Resources