Issue with total using Matrix
I am using Designer of FastReport.Net and as source I use an xsd where the columns that I added to the matrix are defined as decimal type just like this:
<xs:element name="Importo_x0020_capitale_x0020_2" type="xs:decimal" id="T8-14" nillable="true"/>
and yet the total by column is just a concatenation between 2 string as you can see in the pic attached here.
(200 + 300 = 200300 and not 500)
I had the same issue with total by row but here I solved doing a convert to Int32 as Anatoly suggested but here I do not know how to solve this.
Thanks in advance.
Comments
Can you send your data? I will check it and try to solve your problem.
Hi Anatoly,
In this xsd all field are typed, some as string and some as decimal.
From this xsd I created an xml file with dummy values just to create the datasource XML database.
In a console app in c#, I injected the data into the report in this way:
// "Garanzia" "T8"
var drGaranzia = ds.Tables[8].NewRow();
drGaranzia[4] = "MORTE";
// "Importo capitale 1" type="xs:decimal" "T8-13"
drGaranzia[13] = 150000D;
// "Importo capitale 2" type="xs:decimal" "T8-14"
drGaranzia[14] = 20000D;
// "Importo tasse annuo" type="xs:decimal" "T8-11"
drGaranzia[11] = 400D;
ds.Tables[8].Rows.Add(drGaranzia);
var drGaranzia2 = ds.Tables[8].NewRow();
drGaranzia2[4] = "INVALIDITA' PERMAMENTE";
// "Importo capitale 1" type="xs:decimal" "T8-13"
drGaranzia2[13] = 350000D;
// "Importo capitale 2" type="xs:decimal" "T8-14"
drGaranzia2[14] = 40000D;
// "Importo tasse annuo" type="xs:decimal" "T8-11"
drGaranzia2[11] = 600D;
ds.Tables[8].Rows.Add(drGaranzia2);
rep.Load(@"C:\Prove su FastReport\ModuliContraentePolizza.frx");
rep.RegisterData(ds);
rep.Prepare();
simpleExport.Export(rep, @"c:\Prove su FastReport\ModuliContraentePolizza.pdf");
This works as you've seen in the previous email (attached pic where is showed the matrix with the values)
As attachment you will find xsd and xml file.
I thank you for your help.
Hi, Anatoly
did you have had some chance to take a look at data I sent you, yet?
Thanks.
Sorry, I can't deal with your problem.
ok, thanks Anatoly.
์๋ , ์ ํ์ด ๊ธฐ์ฌ์ ๋ด์ฉ์ ๊ด๋ฆฌํ๋ ๋ฐฉ์๊ณผ ์น ์ฌ์ดํธ์ ๋ชจ์๊ณผ ๋๋์ ์ดํดํด์ผํฉ๋๋ค. ๋น์ ์ ์ ๋ง๋ก ์๋ํ ์ผ์ํ๊ณ ์์ต๋๋ค
์ปค๋คํฐ์ปท ์ด๋ฏผ ๋ณํธ์ฌ