How to generate to real max length of Header&Footer or delete white space at the end of line in Jasper text files - jasper-reports

How to generate to real max length of Header&Footer or delete white space at the end of line in Jasper text files
My report has 3 Bands which are..
Header -> Max length of this line is 50 CHAR
Detail -> Max length of this line is 200 CHAR
Footer -> Max length of this line is 70 CHAR
When I generate the report. The 3 bands have the same max length which is 200 CHAR.
But I need to edit/change them to real max length of themselves(Header=50 CHAR, Detail=200 CHAR and Footer=70 CHAR)
Is there any solutions to solve this problem?
PS. I set character.width as
<property name="net.sf.jasperreports.export.text.character.width" value="7.5"/>
The value use the syntax: Report width/MAX LENGTH -> 1500/200= 7.5
Jasper Report TXT File1

Related

Information on XXX.cnt obtained by an RSEM analysis

I obtained a "XXX.cnt" in a newly created "XXX.stat" directory after an RSEM-1.3.3 analysis.
Shown below is the content of the XXX.cnt.
0 2726098 0 2726098
1534055 1192043 1993977
9793897 1
0 0
1 732121
2 410181
3 513309
4 610475
5 90206
6 81551
7 63620
8 44947
9 33029
10 21745
11 22282
12 21545
13 13324
14 17247
.
.
.
What do these numbers mean?
Thank you in advance for your kindness.
The format and meanings of each field are described in "cnt_file_description.txt" under RSEM directory.
http://deweylab.github.io/RSEM/rsem-calculate-expression.html#OUTPUT
https://github.com/bli25broad/RSEM_tutorial
Here is the transcript.
# '#' marks the start of comments (till the end of the line)
# *.cnt file contains alignment statistics based purely on the alignment results obtained from aligners
N0 N1 N2 N_tot
# N0, number of unalignable reads; N1, number of alignable reads; N2, number of filtered reads due to too many alignments; N_tot = N0 + N1 + N2
nUnique nMulti nUncertain
# nUnique, number of reads aligned uniquely to a gene; nMulti, number of reads aligned to multiple genes; nUnique + nMulti = N1;
# nUncertain, number of reads aligned to multiple locations in the given reference sequences, which include isoform-level multi-mapping reads
nHits read_type
# nHits, number of total alignments.
# read_type: 0, single-end read, no quality score; 1, single-end read, with quality score; 2, paired-end read, no quality score; 3, paired-end read, with quality score
# The next section counts reads by the number of alignments they have. Each line contains two values separated by a TAB character. The first value is number of alignments. 'Inf' refers to reads filtered due to too many alignments. The second value is the number of reads that contain such many alignments
0 N0
...
number_of_alignments number_of_reads_with_that_many_alignments
...
Inf N2

How do I store each detail section value in a separate Variable?

Please check this image for details
Formula - #B
If {Command.Dept} in ["AAA","BBB","CCC","DDD"] and {#TOT}>0
Then
{#TOT}
So this should give me only values as follow
190
170
190
220
Formula - #C
If {Command.Dept} in ["AAA-Bud","BBB-Bud","CCC-Bud","DDD-Bud"] and {#TOT}>0
Then
{#TOT}
So this should give me only values as follow
150
200
230
260
Now I created another formula
#Percent
If ({#B} <> 0 AND {#C}<>0)
Then
({#B}/{#C})* 100
When I plug #Percent formula on my repot I am getting error
"Division By Zero" error.
So if I plug formula #B
I'm getting correct values for 1st 4 rows, but next 4rows (AAA-Bud","BBB-Bud","CCC-Bud","DDD-Bud") I'm getting 0.
For formula #C 1st 4 rows gives me 0 and next 4 rows (AAA-Bud","BBB-Bud","CCC-Bud","DDD-Bud") gives me correct values.
So how do I avoid those zeros so I can calulate correct percent values?
try
If {#C} >0
Then
({#B}/{#C})* 100

Sum value without summing the strikeout value

I need to calculate the overall sum without strikeout value
invoice values
--------------------------------
VI 320
VI 260
VI 72
VI 72
-VI- -72-
Just imagine the last value with - symbol is the strikeout value
the total sum should be 724.
i tried doing like the following formula but it return 0 value
IF {Command.void_flg} = 0 THEN
Sum ({Command.Vessel_amt})
First create a new formula #Vessel amt
if ({Command.void_flg}) = 0 THEN
{Command.Vessel_amt}
else 0
Then create another formula #Sum amt.
SUM({#Vessel amt})
Then drag #Sum amtto the place you want.

Splitting up number by certain amount

I'm trying to split up numbers by a given value (4000) and have the numbers placed in an array
Example:
max value given is: 8202
So the split_array should be split by 4000 unless it gets to the end and it's less than 4000
in which case it just goes to the end.
start_pos, end_pos
0,4000
4001,8001
8002,8202
so the first row in the array would be
[0 4000]
second row would be
[4001 8001]
third row would be
[8002 8202]
please note that the max value can change from (8202) to be any other number like (16034) but never a decimal
How can I go about doing this using matlab / octave
This should produce what you want
n = 8202;
a = [0:4001:n; [4000:4001:n-1 n]]'
returns
a =
0 4000
4001 8001
8002 8202

format of read file in fortran

What should be the read format of the of following dataset in fortran. there are 6 spaces between column 1 and 2 with no space of column 1 from margin.
1911.01.01 2.42873702403226
1911.01.02 3.5057043827303
1911.01.03 2.73602527398387
1911.01.04 6.07213767208333
1911.01.05 6.94818901068145
1911.01.06 3.66986589769583
1911.01.07 1.94565994542339
1911.01.08 2.39384275272177
1911.01.09 3.05526130775417
1911.01.10 2.69990836499194
1911.01.11 6.08406263835833
1911.01.12 7.34200241064516
1911.01.13 2.42873702403226
1911.01.14 3.5057043827303
1911.01.15 2.73602527398387
1911.01.16 6.07213767208333
1911.01.17 6.94818901068145
1911.01.18 3.66986589769583
1911.01.19 1.94565994542339
1911.01.20 2.39384275272177
1911.01.21 3.05526130775417
1911.01.22 2.69990836499194
1911.01.23 6.08406263835833
1911.01.24 7.34200241064516
1911.01.25 2.42873702403226
1911.01.26 3.5057043827303
1911.01.27 2.73602527398387
1911.01.28 6.07213767208333
1911.01.29 6.94818901068145
1911.01.30 3.66986589769583
1911.01.31 1.94565994542339
I tried.....
format (i4,i2,i2,6x,d9.14)
but it didnt work
thanks in advance
elisa
So try
(i4,a1,i2,a1,i2,6x,d16.14)
I think you've made two mistakes:
Not accounting for the . characters in the dates, I don't think that they will automatically be treated as field separators (as , or spaces would be). Obviously you'll want to ignore them.
In your d edit descriptor the number of decimal digits, that is the number after the . ought to be no greater than the total field width, ie the number before the ..