Cross table Sum

Stimulsoft Reports.NET discussion
Post Reply
kevin163
Posts: 27
Joined: Fri Oct 17, 2014 9:18 am

Cross table Sum

Post by kevin163 »

Hello Support:
I Have a problem about Cross table,You can see the attachment of the Cross table that I want it.
First. The total position that I just want to give it a style to the total text,but the style use to the list range.
Second. I want to get the price which is divide by the sum amount and the sum qty. but it give me the sum of price
third . you give me the expression e.Value=Cells[1,0]/Cells[-1,0]。if Cells[-1,0]==0, it can get error.
Can I alter it like this?

Code: Select all

       if(Cells[-1,0]!=0)
      {
         e.Value=Cells[1,0]/Cells[-1,0];
      }
     else
      {
         e.Value=0;
      }       
How can i do?
Thank You!
Attachments
book.xls
(16 KiB) Downloaded 136 times
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Cross table Sum

Post by HighAley »

Hello.

You could use next expression:

Code: Select all

e.Value=Cells[-1,0]==0?0:Cells[1,0]/Cells[-1,0];
Let us know if you need any additional help.

Thank you.
kevin163
Posts: 27
Joined: Fri Oct 17, 2014 9:18 am

Re: Cross table Sum

Post by kevin163 »

Thanks,Had You saw my attachments?I want to get attachments's report.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Cross table Sum

Post by HighAley »

Hello.

Sorry, I missed this question.
You could set the value of Cross-Column Total in the Process Cell event too.
Please, look at the attached report template.

Thank you.
Attachments
Report(1).mrt
(15.1 KiB) Downloaded 156 times
kevin163
Posts: 27
Joined: Fri Oct 17, 2014 9:18 am

Re: Cross table Sum

Post by kevin163 »

Thank you for your reply.it works well. Have a nice day!
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Cross table Sum

Post by HighAley »

Hello.

We are always glad to help you.
Let us know if you need any additional help.

Thank you.
Post Reply