some of the data that im getting come whit duplicated fields.... i want a warning window or screen that tell me "some data is duplicated" is there any step to achieve this?
i tried to search for some step but nothing
what i need is a warning alert that say
"there are two duplicated rows"
i tried to do it whit javaScript but it doesn´t work
i expect to have when i execute the tranformation an alert window that say
'there are 2 duplicated records'
In your flow of steps, before the end, or in the spot of your choice, add the following sequence of steps.
In the sort rows, add keys your table should be sorted on, Use these same columns, in the same order in the 'Unique Rows' step. For the Unique Rows step you need to configure 2 things:
Inside the step check 'Redirect duplicate row' and add your desired description message.
Right click your Unique Rows step, and click on 'Error handling...'. In this window, add the name of the new column that's going to contain the message from the Description you set.
This way your 'Dump file' will receive an additional Column, whenever there are Duplicate rows, and these rows will have the disered message.
Also in the Excel Writer window, you can use both 'Include data in filename' and 'Include time in filename', this will create several files, but in case you need a timestamp of when these duplicate rows passed in the flow, this is a good choice. These 2 options are present in most, if not all, Output steps.
Related
I have a problem with SSRS report builder. Basically what I want to do is to delete a column. I have a report that someone else made and there is 1 column (xxx) that no longer exists in data source tables so I need to delete it.
When I go to query designer and delete this column from the code and run it there, it works. I close query designer window and see that list of columns (fields) is updated now and xxx column is not there. Then, I delete this column manually in designer (default screen) and when I try to run the report, It doesn't work:
"The Value expression for the text box ‘XXXDataField’ refers to the field ‘xxx’. Report item expressions can only refer to fields within the current dataset scope or, if inside an aggregate, the specified dataset scope. Letters in the names of fields must use the correct case."
But that field should be already deleted. So I don't know what else I can do, or what it can be linked to. I just want to delete it. Any Idea?
Thank you
If your dataset does not contain xxx but your DataTable has this error is normal
You either delete that column from your table or at lease delete DataSet Binding from table so that SSRS does not try to retrieve that column from DataSet
It will be a reference to the field in another field. For example, if you deleted a column that showed an OrderShipped status, then you might have another text box highlighted based on this.
The error is telling you which textbox is in error. So, click somewhere on the designer, then in the properties window, right at the top, click the dropdown which allows you to choose specific report items, choose XXXDataField (the one named in the error message) and then check the value expression. In there you will find the reference to the column you deleted.
Objective
I have an excel sheet that has 10 rows. Now, I want to select rows 5 and 6 only.
What I tried
I am getting the rows to set limit in the Excel Input -> Container, but using limit I am only getting rows smaller than input limit. So please anyone tell me how can I get the above condition.
Updated
specified start row = 5 in Sheets Tab
Without specified start row
First of all in content section you can specify the filter and it is working perfectly fine, I have checked.
For achieving your output you can simply use filter rows step, specify the values you want to in values condition.
With the Excel input step, on the Sheet tab you can specify a range. Tell you want to start on row 5, col 1. Tell also on the Content tab, that you do not want a header, and a limit 2.
This should work. However, the answer is a bit academic, and I would suggest #Working Hard's answer. Read every thing, then use a Filter step. In this step you can put more than conditions, like row=5 or row=6, or like row>=5 and row<=6. To do this, put the first condition, then click on the small green + on top right and put the second condition. Afterwards, you can click on the AND to change it in OR (among others).
I'm trying to process some data and store it in a datawarehouse. For doing it, I wanted to store dimensions in one transformation and fact (only have one) in another transformation. So I can use a job for execute the first one, copy rows to result and get them into the second transformation.
In the first transformation, I read some Excel file and separate this data into some streams. It is data from a baptism, so I have one stream for the person, another one for parents, another one for sponsors, and so on... At the end of each stream, I insert data into database and return PK autogenerated (it is an id autoincrement).
In the second one, I only have Get rows from result and want to set them into a txt file (just for see it is been done correctly). The problem is that the file is created but it is empty. I suppose that if I let fields in Get rows from result empty, it gets all fields.
What am I doing wrong?
At the end what I want is to have one Copy rows to result at the end of each stream in the first transformation and get all this data in the second one.
In "Insert Pare Padrina" I return id_pare_padrina which is autogenerated, and the same with "Insert Mare Padrina" (I have more streams which I also have to include them into result). This transformation is not executed per row because I need values of other rows.
Thank you!
In order to pass the data from the first transformation to the second transformation, you need to set certain parameters like:
1. First of all, in the transformation settings of the second transformation (at the Job Level), check on the items as image below:
Copy Previous results to parameters will ensure that all the results/data in the "Copy Rows to Result" step is getting properly passed to the next level.
Execute for every input row : will execute the second transformation for every rows in the first transformation file. This is optional based on your requirement.
2. In the same transformation settings, define the "Parameters" in the Parameters tabs. Check the image below:
Here, NAME is the parameter i have defined. So when you are using the "Get rows from result", you can define these parameter names.
3. Instead of using "Get rows from result", you can alternately use "Get Variables" step to fetch all the variables coming from the previous step. All you need to do is to define the parameter names inside the ktr file (CTRL + T). (Actually i have practically implemented in that fashion and it worked for me.)
4. Since "copy rows to result" step uses heap memory, defining multiple instances of this step might exhaust the memory space quickly and your code might fall in trouble. Ideally use a single instance of this step.
But if your data interation is only one row, best option would be to use "set variables" step.
I assume you might have missed some of these sections in the job.
You can read more on copy rows to result in here.
Hope it helps :)
I'm doing an project and there is an requirment that i haven't come up with the solution yet.
I'm asked to create a result storing system for a long jump competion. I have to create three listboxes to store attempt numbers, results (in metters) and the corresponding points to each results. However, i can only give them one textbox to enter the results, attempt numbers and points must be calculated automatically and each athlete must have 4 results.
There are two things i would like to ask you guys:
If the user has entered something wrong, he/she should be allowed to delete one or all results. And when a result is deleted, all attempt number and point related to that result should be deleted as well. Clearing all is fine with me but only delete one from the list is not really. So how can i solve this problem.
The listbox containing attempt numbers should be in order (1, 2, 3, and 4). I can make the listbox to generate those numbers if the user enters all results in numerical order. HOwever, the problem is that he/she can delete ramdomly selected item. If he/she deleted attempt number 3 for instance, the next result added should have the attempt 3 back instead of attempt 5. And the new added result should move to position between 2 and 4 rather staying at the bottom.
I hope you can understand what i'm trying to say. Sorry about my explaination, English is not my native language.
All of your ansers are appreciated
You could select the item to delete with the listbox, and then remove as Farhan Sabir has said. You could then force the user to re-enter the distance for the attempt they have just deleted as the next value.
If you only have one textbox to enter the results, you could use a label to indicate which attempt they are entering (set it to automatically change to the number of items in the list +1 after entering a ditance). This would Indicate to the user that they have to re-enter a deleted distance straight after they have deleted one. A messagebox could help prompt this as well.
I am not sure how you would change competitor, but you have not mentioned that at all within your question.
something like this ?
ListBox1.Items.Remove(ListBox1.SelectedItem)
I think when you got the index of the selected item (as Farhan Sabir suggestion above), you can delete the item of the other 2 listbox base on that index. Then you may try the listbox1.Items.Insert to insert the item to specific index of the listbox. however, i think you would have to ask the user the input of the attempt number along with the attempt result in order to add it back to the list with right order
Is it possible to generated a "Print When Expression" that detects the last element in an XML datasource file?
Basically I have a report with a column break inserted after a sub-report in a detail band so I can clearly define new pages for the beginning of a new record. But it always leaves me with a blank last page. So I am hoping that I can prevent this if I have a print when condition that prevents the column break if it is the last record element in the XML datasource.
Is this even possible?
The problem is that you don't know it's the last element until after you look for the next element. I don't think there is a simple way.
In principle it should be fine to do something like this:
Create a super-report around the entire report. Run the same query in the super-report. Count the rows. Then pass the number of rows to the original report (which is now a subreport) and re-run the query again. Clearly, running the query twice is another drawback.
If the data source were SQL, then I would suggest modifying the SQL to return the number of rows as part of the result set. But for non-SQL data sources, you need some way of knowing the number of rows (well... some way of identifying the last row) before you reach the last row.
Many years late...
if you sure your datasource is a JRBeanCollectionDataSource, you could use:
$V{REPORT_COUNT} == ((net.sf.jasperreports.engine.data.JRBeanCollectionDataSource)ORIGINAL_DATA_SOURCE( )).getData().size()