Skip Specific rows from CSV file for the CSV Datasource report generation with JasperReports - csv

I want to create JasperReports reports based on dynamically generated CSV files.
Generated CSV file contain two different column headers. I want to omit the first header details and only need to read values from second header.
Refer the attached image.
I want to skip the first 3 rows and need to read csv from 4th or 5th row onwards.
Please note that I unable to delete first header. How can we perform this requirement to generate such report?
'AMOUNT' datatype is BigDecimal and Based on 'AMOUNT', perform several calculations also.
How can we view reports with iReport with this requirement?

Related

SSRS Report - Create CSV file from query that already returns CSV string

I am evaluation solutions to a relatively unique problem or use case of SSRS Reports. I would like to be able to use the scheduling component of SSRS Reporting to create a CSV file from a query that already returns the data in CSV format. The reason behind this idea is that I am looking to have dynamic columns (both which columns are selected as well as the order they are in). From a decent amount of research doing this is a table/tablix format didn't seem viable. Not to mention the columns that are hidden with an expression end up showing up in the CSV anyway.
So the main requirements are:
Use of SSRS for scheduling
Allowing for dynamic column return (number of columns and order).

Flat File Destination has multiple Inputs from custom data flow task

I have an SSIS Package setup with the following Data Flow Tasks in order:
Flat File Source
Derived Column
Custom Task
Flat File Destination
The Flat File source contains fixed-width rows of data (282 characters per row).
The Derived Column splits each row into columns using the SUBSTRING() method.
The Custom Task performs some Regular Expression validation and creates two new output columns: RowIsValid (a DT_BOOL) and InvalidReason (a DT_WSTR of 200). There is no Custom UI for this Task.
The Flat File Destination is the validated data in delimited column format. Eventually, this would be a
database destination.
I know that this can be done using a Script Task. In fact, I am currently doing so in my solution. However, what I am trying to accomplish is building a Custom Task so that code changes are done in a single-spot instead of having to change multiple Script Tasks.
I have a couple of issues I'm trying to overcome and am hoping for some help/guidance:
(Major) Currently, when I review the mappings of the Flat File Destination, the Available Input columns are coming from the Flat File Source, the Derived Column Task, and the Custom Task. Only one column is coming from the Flat File Source (because there is only one column), while the Derived Column and Custom Task each have all of the columns created in the Derived Column.
My expectation is that the Available Input Columns would/should only display the Custom Validator.[column name] columns (with only the column name) from the Custom Validator. Debugging, I don't see where I can manipulate and suppress the Derived Column.[column name] columns.
(Minor) Getting the input columns from the Derived Column Task to automatically be selected or used when the Input is attached.
Currently, after hooking up the input and output of the Custom Validator, I have to go to the Inputs tab on the Advanced Edit and select the columns I want. I'm selecting all, because I want all columns to go through the task, even though only some will be validated by the task.

SSRS export tab delimited with line breaks

I've created a table in SSRS 2008 with multiple rows. Meaning, 1 row of information from the database displays as multiple rows in the the table. Until I export, then it gets flattened into a single row. I'm exporting to a custom CSV that uses tab delimitation.
Is there any way I can force the export to do a line break at the end of my SSRS table rows, as opposed to the database rows? I want the end of my SSRS table rows to produce an <CR><LF> when exported like each field produces a <Tab>.
It's hard to explain. Please let me know if I can clarify anything. Thanks.

SSIS - Writing to Excel After Skipping Rows

Is there a way to write data to an excel spreadsheet after skipping x number of rows...excel is my destination and a sql query would be my source?
My scenario is one where i have a lot of header rows that i need to skip before data insertion. I would like to do this in an SSIS package. I am using SQL 2008 and Excel 2010.
Thanks
if you right click on the excel connection manager at the bottom of the page than click options , there is a setting called FirstRowHasColumnName set it to FALSE .let me know if it helps , didn't really understand if you just want to skip the first row that is the name of the columns from SQL query or more , there are other ways
Easiest way would be to modify your SQL query to exclude the header rows. If you can't do that then you need some logic to determine if the row is a header row (like checking if a certain field is a number):
If you can do that then you can do this:
read all columns in as text
Put in a derived column where you generate a new column IsHeader using your logic
Use Conditional Output to filter out the rows where your IsHeader is true
Use Data Conversion or Derived column to convert the columns to correct datatype
Output to Excel as usual

SSIS to import data from excel into multiple tables

I have an Excel sheet (input) where each row needs to be saved in one of three SQL server tables based on the Record type (column 1) of the row.
Example:
If the Record type is EMP, the whole row should go to the Employee table.
If the Record type is CUS, the whole row should go to the Customer table
I am trying to use a multicast and not sure how to split the data from multicast to the destination table. Do I need any other control in between?
Any idea would be appreciated.
A Conditional Split Component sounds like just want you need. A Conditional Split uses expressions you define to route each input row to one output. In your case, your Conditional Split would define three outputs, each of which would be attached to a SQL destination.
In comparison, the Multicast Component you're currently using sends each input row to all outputs. This component would be useful if you were trying to save a copy of each row to all three SQL destinations.