Treelike component in JasperReports - jasper-reports

Is there any ways to generate treelike structure in JasperReport? If it exists, it would be awesome, otherwise it would be a great headache
Thank you

What exactly you want to produce?
If you have known number of "levels" you could make groups for each of these levels and print "level" name in header of the group (and hide details band) and thus simulating treelike structure.

Related

When using Virtual Documents how can a template be used with different report parameters?

I'm using a virtual document structure generated by a script to create a document from EA, and I'm trying to use the same template fragment several times with different elements and different headings.
For example, I have an element which describes the input data to one program, and the output data to another program, so I can't really store the information in the element I'm documenting.
Where it is the input, I want one heading (and similar references within the template), and where it is output I want different values for the headings.
I've tried using the ReportTitle tagged value in the individual <model document> element, but this appears to be ignored and only the <report package> value is used throughout (which makes me wonder why they are there in the first place).
While I could create multiple templates all referring to the same fragment and hard-code the different headings, but that is messy, and as I already have fragments within fragments so it could result in a lot of almost identical templates and fragments. Variables that I can set for each <model document> would be much preferable.
Has anyone got a better approach than this? Thanks!
I don't think there's an easy solution.
If there is a way to determine based on the element, package, or diagram ID whether you should use one title or the other then you could use a script or SQL fragment to return the correct title.
If that is not the case I guess the only possibility is to hardcode the different titles in your templates.
In order to avoid too much duplication you could create a template with only the title and use that on a model document. Since you are generating the modeldocuments by a script anyway that doesn't cost any user time.

Determining canonical classes with text data

I have a unique problem and I'm not aware of any algorithm that can help me. Maybe someone on here does.
I have a dataset compiled from many different sources (teams). One field in particular is called "type". Here are some example values for type:
aple, apples, appls, ornge, fruits, orange, orange z, pear,
cauliflower, colifower, brocli, brocoli, leeks, veg, vegetables.
What I would like to be able to do is to group them together into e.g. fruits, vegetables, etc.
Put another way I have multiple spellings of various permutations of a parent level variable (fruits or vegetables in this example) and I need to be able to group them as best I can.
The only other potentially relevant feature of the data is the team that entered it, assuming some consistency in the way each team enters their data.
So, I have several million records of multiple spellings and short spellings (e.g. apple, appls) and I want to group them together in some way. In this example by fruits and vegetables.
Clustering would be challenging since each entry is most often 1 or two words, making it tricky to calculate a distance between terms.
Short of creating a massive lookup table created by a human (not likely with millions of rows), is there any approach I can take with this problem?
You will need to first solve the spelling problem, unless you have Google scale data that could allow you to learn fixing spelling with Google scale statistics.
Then you will still have the problem that "Apple" could be a fruit or a computer. Apple and "Granny Smith" will be completely different. You best guess at this second stage is something like word2vec trained on massive data. Then you get high dimensional word vectors, and can finally try to solve the clustering challenge, if you ever get that far with decent results. Good luck.

Creating Dynamic Filters in Tableau

I'm working in Tableau to help my school district visualize discipline data. I want to be able to disaggregate and filter by quite a few different measures (at least 13).
In the past, if I wanted to be able to disaggregate by a number of measures, I would make a parameter with a list of possible outputs, display each output as the name of a measure, then create a calculated field that returned the value from a given measure based on that parameter. This works fine for disaggregating.
However, filtering based on these values presents a challenge. The problem is that I'm not filtering based on any given measure, I'm filtering on a calculated field that returns the value in that measure. If my parameter is set to "Day" for instance, and I filter to Tuesday, but then switch to "Race", everything vanishes, because now my calculated field is returning race. What I want to create is a dropdown menu that lets you select from a number of different measures to filter by.
Below is a link to a packaged workbook that can help illustrate the problem that I'm dealing with.
I feel like something like this should be possible in Tableau, but there's some little trick that I'm missing. When I contacted their support team, their solutions were both only viable due to the limited number of measures I was using in the dummy data. The support team felt that this was possible as well, but they didn't know how.
https://public.tableau.com/profile/publish/DynamicFiltersUsingParameters/Sheet1#!/publish-confirm
You could create an Filter Action on the Tableau dashboard which carries over the 'Day' filter to give a smaller subset of data to work with for the next filter.

Updating a field of an Access table with data from form

I am working on Access 2007. I have a table with some fields in it. I had created a form from the table and one of the fields of the table is a concatenation of 2 fields from the same table.
There are 2 fields OppNo and Material in the table. I had created a form with these (and others in the table) fields. There is another field OppMat which is blank in the table. However, I had got the data into OppMat field populated as a concatenation of OppNo and Material fields in the form. I am now looking at having the table updated with the data of OppMat from the form to the same corresponding field in the table.
Kindly advise as how I could achieve this.
Thanks and regards,
This might be possible if these cases are met:
The field OppMat ALWAYS has the same structure and you can assure that it does.
Users will not be able or very unlikely to deviate from this structure.
Notably you should use something like Left(), Right(), Mid() and so on. Whatever works best for your structure. You can use the string modifiers: https://msdn.microsoft.com/en-us/library/dd789093.aspx
On the other hand I must admit that I am sceptical if your solutions is the best. Here are my reasons:
Users are unpredictable and will continously deviate from your intended way to use the application.
Using the string functions and fixating on one structure makes your code construction inflexible, hard to maintain if changes occur and prone to errors.
The alternatives seem to be better with little drawback.
My suggestions for alternatives:
Use one textbox for each field so that you have two textboxes. You can even position them that way that it almost looks like it is continous text. But not too much otherwise the user will beconfused.
You can add a label that shows your concatenated fields. But for input you use two different textboxes.
Cheers!

Using variables to save a repetition field in FileMaker

I got a part number field that have several repetitions. I want to use a variable to save this so that I can show all the descriptions of these parts in a different layout when user click a button.
But I do not know how to use variable to save several values like that. And I do not know exactly how many repetitions for each part number.
Although FileMaker allows for repetition fields and they have some valid behind-the-scenes uses for the database developer, they should NEVER be used for data. As pointed out by others, you should rethink you data structure.
That being said, you can capture the information in repeating fields by specifying which repetition you're interested in. If you have a repeating field named "partNumber" with 10 repetitions, then you can access each of the repetitions by:
partNumber[1]
partNumber[2]
.
.
.
partNumber[9]
partNumber[10]
RepFieldToVar [calculation] =Let($$varName = List(RepeatingFieldName), "")
This puts all repetitions into a return-delimited value list in $$varName.
Incidentally, there are _exceedingly rare_ instances where repeating fields are still useful. I've used them for grid-type schedule layouts that need stored values. But 99.98% of the time the other commenters are right, you can probably do it more efficiently with related records.