This should be a common problem and easy solution. But I have tried many solutions I've seen posted online and most were for previous versions of SSRS. How can I nest one child table within a parent table? I don't want to use subreports because of its inefficiency. Instead I want to pass the parent key value to this child. I have 3 levels. This is what my structure resembles:
Employee1
Family
Child1
Child2
Weight
Eye Color
Employee2
Family
Child1
Child2
Weight
Eye Color
Employee3
Family
Child1
Child2
Weight
Eye Color
So the employee is the parent and then I want each employee to have these same attributes. Similarly for family vs. child. So I have a parent key field and a child key field in the same dataset that these link on. How do I achieve this?
One of the problems right now is that although there is a parent-child relationship, I am filtering on the same field for all groups. For example, the first level I am filtering on the "Employee" value. Second level on the "attribute" value. Third level the "Child" value. So now if I filter the Employee level on "Employee", then the levels underneath it won't appear. But if I don't filter it on anything then all records will appear in the Employee level, even if they are attributes or children.
Related
I have a NSTableView with bindings.
Each row of the table is a Core Data Entity named Entry.
An Entry can have several CustomValue. Each CustomValue should be displayed in its own column in the Table.
I had 2 choices to model this in Core Data:
Choice 1: Either model a dictionary as a Transformable, where the key is the column name & the value is the CustomValue.
Choice 2: Either use a To-Many relation ship Entry <-->> CustomValue <--> key & value where key is a Column entity.
I chose the second solution based on this: Best practice? - Array/Dictionary as a Core Data Entity Attribute
BUT my problem is : with Choice 2, how can I bind the data to the column?
With Choice 1, I could do something like this:
textField.bind(NSBindingName.value, to: cellView, withKeyPath: "objectValue.myDictionary.\(tableColumn!.identifier.rawValue).value", options: nil)
I'm currently stuck, I need to map a binding to something that would allow me to search for the proper value based on the key.
Any idea? Thanks in advance :-)
I have a customer request that I would consider common for a cloth store, however not found a way to implemented it on NopCommerce.
The problem is that we stock t-shirts, jumpers etc in various colours and sizes, possibly separate the sex as well.
The actual products for sale are the primitive products with a particular design.
So Design 1, Design 2 ... Design N all use the same stock.
My idea was to be able to associate primitive products with a particular combination.
That is not possible on nopcommerce. I can only associate a product to a particular attribute value.
Any idea/solution?
You can use product attribute combinations in nopCommerce. Note: Attribute combinations are useful only when your Manage inventory method is set to Track inventory by product attributes
Follow the below steps.
Create a Product.
Create a product attributes ex. Image Squares. 3 values. Edit a value and upload square image and product image.
Create another product attribute. Image squares. 3 values. Edit a value and upload square image and product image.
add a condition on second attribute that if a value from first attribute is selected then only second product attribute should appear.
The first attribute selection will change the product image. The second won't.
Now if you remove the product image from first attribute, then second attribute selection will work.
I have two sourcetypes:
A defines the period of activities:
_time, entity, start_time, end_time, activity, ...
B defines the 2D position of the entities:
_time, entity, x, y, ....
Now I tried to extract only those rows of all the entities in B that is within the periods defined in A, how can I do that? It seems I can't make a comparison with the command 'join' for time?
You're right, join won't be much help here. I've found that the splunk way to match up information in two indexes is to start with both indexes and manipulate the heterogeneous events as if they were a single index.
In this case, one approach uses streamstats to produce events that are denormalized to include relevant activity fields on each position event. First, make sure each event from index A considers start_time to be the _time field. Then, use streamstats to fill each event with null start_time, end_time, or activity fields (which should be coming from index B) with the latest value for that entity that was non-null (which should be coming from index A). Finally filter out any events where _time > end_time, which would be any position event that falls outside an activity window.
index=A OR index=B
| eval _time=coalesce(start_time, _time)
| streamstats latest(start_time) as activity_start_time, latest(end_time) as activity_end_time, latest(activity) as activity by entity
| where _time<=end_time
Keep in mind that this approach assumes that activities are neatly ordered, so that no activity overlaps another. This would be a bit trickier if activities can overlap.
Another method I sometimes use is to use transaction instead of streamstats. This gives much more control over the logic around when one activity starts and ends, and results in a single event per activity with multi-valued fields for the position. You'd want to start with a single "point" field for each position if you took this route.
I have two forms that are related and I would to combine them in a view control. Not that difficult. This is for a "1 to Many" type scenario.
Say I have a customer view with the columns customerID and Customer Name. Then I have a view showing the "many" documents that has the columns masterCustomerID, orderNumber, orderDate.
On the XPage I create a view control of the many documents and add the columns masterCustomerID, orderNumber, orderDate. Then I add a column in the front to do a DbLookup to pull in the actual name of the customer. Nothing too fancy really.
My question is, in this situation, where the lookup column is the FIRST column. What are the strategies to sort the view column by that column. By default it would sort by the Key Value in the order view which is likely different then the Name values.
I'm not averse to using repeat controls if that would be easier.
My first thought would be to employ TreeMaps somehow, but I don't know if that's practical in the event that there might be a LOT of documents. Maybe there's something I'm missing...
Any advice would be appreciated. Thanks
Use view with (Customer name, Customer ID) structure as main view. Then based on Customer ID populate other columns by lookup from view with structure (Customer ID, Order ID, Order date). Hence it is 1:N relationship, you can't use single view component, but two nested - repeat inside view column would do.
I hope you are aware of performance impact (orders looked up for every customer row), so don't try to show too many customers at once.
Is ExpressionEngine capable of handling HABTM (has and belongs to many) relationships, even if it's with a plugin?
Basically, I have two channels: recipes and ingredients. A user needs to be able to create a recipe by assigning entries from my Ingredients channel, but when adding an ingredient they also need to specify additional data such as quantity. Is this possible?
Your answer lies in two indispensable EE add-ons by Pixel and Tonic: Playa and Matrix.
Playa is a many-to-many relationship fieldtype and module.
Matrix is a fieldtype which allows a single field to contain multiple rows of multiple predefined columns of data, each column of which can be a different fieldtype (including Playa).
So in your case, you'd have your standard Ingredients channel, then in your Recipes channel, you'd have an Ingredients field, which would be a Matrix fieldtype. In your Matrix field, you'd have one Playa column which displayed a dropdown of entries from your Ingredients channel, and another column that was a simple text input set to Integer for the quantity.