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.

  • 안녕, 잘 했어 기사의 내용을 관리하는 방식과 웹 사이트의 모양과 느낌을 이해해야합니다. 당신은 정말로 위대한 일을하고 있습니다

    커네티컷 이민 변호사

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.