Crystal Report Group Count - count

Lets say that I have this records in a dataset:
name1 XXXXX XXXXXX
name1 XXXXX XXXXXX
name1 XXXXX XXXXXX
name2 XXXXX XXXXXX
name2 XXXXX XXXXXX
name2 XXXXX XXXXXX
name2 XXXXX XXXXXX
I want to create a report where i can see the sum/count of records in each names:
name1 3
name2 4
How can I achieve this output? Additionally, is it possible to assign a bound field in a crystal report from a query? For example:
select name, count(name) as [Count] from tbname group by name
How can I get the Count field? (if it's really not a field in a table)?

If you go to insert -> summary. From there you can select which field you want a sum for. Then under "Calculate Field" select count. The "Summary Location" is up to you, I prefer to put it under the group (if I have one). When you see your details page, you will see a new "field" or box that will contain your information. If you would like to also have a grand total, you can copy and paste that box into the report footer and CR will automatically add them all up for you.
Also, say you want to just see the total, you don't want to see all the other stuff: right click the field you don't want to see -> Format Field -> Common -> click Suppress. That way you wont see the information, but its still there for CR to calculate.
As for putting a parameter for that box, it may populate as a choice as the fields do. I'm not sure, never tried it. Hope this was helpful!

u try insert goup for (table.name) and then insert summary and choose the field to summarize, and then choose Distinct Count to calculate this summary in the footer.

Related

access 2010 use only part of text field in calculated field expression

Creating a database for an online booking system. Relatively new to access but have worked out how to automatically combine two fields in a table to fill another field. Here is what I have:
There are currently three fields in question, these are:
firstName
Surname
hostName
hostName is the calculated field and the expression is as follows:
[firstName] & " " & [Surname]
So if the value of firstName is "Dave" and the value of Surname is "Smith", the current result in hostName is "Dave Smith". This is fine but I want it to only combine the value of firstName and the first letter of Surname to produce something like "Dave S".
I have looked around for a way to do this and have tried some things that I thought might work based on my coding experience but it all just threw an error. Any useful links or possible solutions would be appreciated.
Thanks, Zack
Left ( Surname, 1 )
More information here
.
Also:
Calculated fields belong in queries, not tables.
More information from Allen Browne here

Netsuite - Saved Search - String All True Results of Case Formula

Hoping someone can help me out with a NetSuite question, and I apologize in advance if i’m misusing some lingo.
I am creating a item based saved search and one of my formula (text) result fields can have multiple true values when I apply my case formula. I’m look to combine all the true results of this formula into one comma separated string, instead of a new item row for each true value.
sku contact type
123 John S Owner
123 Jane S Clerk
123 Jack S Clerk
Formula (text) - Custom Label Field Name = Contact Name
Case when {type} = ‘Clerk’ then {contact} end
Currently my results generate a item (sku) row for each case of clerk:
Sku Contact Name
123 Jane S
123 Jack S
I’m looking for my results to be a single string
Sku Contact Name
123 Jane S, Jack S
I know the case function noted above will not string the results by itself; I originally intended to use the group by and max summary types, but I only get one Contact Name result.
Any solutions or work arounds?
Thanks
There are certain grouping functionality available for saved search results, but I don't think what you are trying to do is possible.
If you group your results by Sku, you will get one line per Sku but concenating the contact names from different line results I don't think is possible.
In your SaveSearch's Filter look for mainline and try to set either true(Yes) Or false(No).
There is an undocumented Netsuite function NS_CONCAT() (similar to Oracle's undocumented WM_CONCAT()) that does exactly this. You would group your results by the SKU column, and add formula field with the formula NS_CONCAT({contact}) and the summary type set to Minimum or Maximum.
According to some Netsuite employees on the Netsuite User Group, the LISTAGG function should also work now, and offers more flexibility (if you wanted a delimiter other than a comma for example).

Categorizing MailMerge on ONE Page - Directory/Catalogue

I am trying to get the mail merge work with directory as the source that would help me categorize the records in my current template.
I am using this field code: {QUOTE{IF{MERGESEQ}=1{SET Key ""}}"{IF{MERGEFIELD Description}<> {KEY}"{IF{MERGESEQ}>1"
"}
Values for {MERGEFIELD Description}{SET Key{MERGEFIELD Description}}
Input
"}{MERGEFIELD ColDesc}
"}
Now the output I get is fine for a new fresh document, but when I try this code with an existing template, what it outputs is a document for each record it merges.
What I would like to have is a kind of this output on one page:
Details for the record selected from the file provided:
Values for 'Subjects'
Input
Study ID
Class ID
Subject Name
Student ID
Values for 'Visits'
Input
Visit ID
Visit date
Room No.
Summary
etc.....
But what my output is the following:
Details for the record selected from the file provided:
Values for 'Subjects'
Input
Study ID
Class ID
Subject Name
Student ID
Details for the record selected from the file provided:
Values for 'Visits'
Input
Visit ID
Visit date
Room No.
Summary
All suggestions are appreciated.
Best
Yes,
I was able to figure out my problem.
I followed this link http://windowssecrets.com/forums/showthread.php/111149-Mailmerge-Tutorial-Create-Sorted-Listings-(2000-2010)
and in that
The tutorial shows how to do the categorisation. From what I've described, it seems the field under the topic 'Merge Records By Category' would serve as the basis for the project. If you want to output some content only when the first record is merged, simply modify this part of the field:
{IF{MERGESEQ}= 1 {SET Key " "}}
to, for example:
{IF{MERGESEQ}= 1 "{SET Key " "}Record 1"}
Cool, SO far so good.

On row click column value has to be changed in jqgrid

I have a jqGrid with four columns and in which i get the rows from the database. Now i want some thing like this. On row selection the cell value of row has to be changed.
i.e.
SNo SName Update Roll No
1 Steve Rename 1001
2 Jack Rename 1002
I want to update the SName when the user selects Rename from jqGrid row for example if the user selectes rename from first row then first row should be like the following
i.e.
SNo SName Update Roll No
1 Steve Update/Cancel 1001
2 Jack Rename 1002
Can any one suggest me how to obtain the same
It seems to me that you try to make things more complex as it is. Why do you not use the standard behavior of the jqGrid "inline editing"?
If user double-click (or click depend on your requirements) on the row the "editable" columns of the row can be modified (see old answer for more information). If the user end the row editing with pressing of "Enter" key the changed will be saved. If the user press "Esc" key or select another row the changes will be discarded. So the standard inline editing supports rename/update/cancel without additional "update" column.
If you want have a buttons in an additional column you can use formatter:"actions" or use "custom editing" technique which you can see on the jqGrid demo if you select "Row Editing" / "Custom Edit".

Submitting form custom module

I have a question regarding drupal 6 forms.
I have 4 tables:
location[locationid, name];
package[packageid, name],
person[personid, name, locationid, address, etc...]
pickup[pickupid, personid, packageid, locationid, _pickup_day_,...].
I've made forms and form_submit for the three tables: location, package, person (simple CRUD as usual).
Now, I want to make a form to submit data into the "pickup" table. The twist is, the only
data the user needs to input is the "pickup_day" field, which can be 1 or 0 (monday or tuesday).
So I imagine when I go to the pickups url, I'll see a list of output fields:
firstname | lastname | location | pickup day | package type
first1 last1 church1 select box (monday/tuesday) select box (type1/type2/type3)
first2 last2 church1 select box (monday/tuesday) select box (type1/type2/type3)
first3 last3 church1 select box (monday/tuesday) select box (type1/type2/type3)
[submit button]
When its submitted, the data goes into "pickup" table.
I'm trying to figure how to render the select boxes while outputting person's information.
(Just an aside, would it be possible to have a search before seeing the form...for example I search for
location to be church1, then I'll see all the users at that location in a form as above)
All help is very much appreciated...even pointing to a module that does something similar to this is fine...
I just need to get some hints on how people have approached this. Much thanks!
End goal:
So, basically, I have a number of people in my database. Each person is assigned a location where they can go and pickup food. I want to record each pickup for each week for each person. So I have a pickups table to do that. So I'm trying to make a single form (pickups), where I can go to and update who picked up what...on what day (Monday or Tuesday). But so in this form, I need to show all the people registered for a particular location. So lets say a person is registered for a church called Church 1...I want to search for the Church 1 location, then all the people who are registered for that location comes up row by row. Then I can select which day each person picked up food and what type of food they picked up...and click submit. Then I'll run a query against my database to add this information.
The big deal I guess is that instead of making a form for each person (for each row), I just make one form and when the form is submitted everyone will be added to the "pickup" table with the appropriate day and item they picked up.
I would suggest you look at the form API's built-in AHAH support. You can find more information here: http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/6#ahah. Assuming I understand your question correctly, this is a fairly typical ajax/ahah form situation; an element in your form triggers the creation of new form elements.
For example, you can create a select box of locations. Once a location is selected (#ahah['event'] => 'change'), you can make a callback to a menu location (#ahah['path'] => path/to/callback) which can generate the new form elements to add, in this case select boxes for the persons and/or packages associated with that location.
You could also do something similar using search instead of a select element.

Resources