adding a column to a cross tab report

Stimulsoft Reports.WEB discussion
Post Reply
erikbrandvig
Posts: 25
Joined: Tue Apr 26, 2011 1:01 pm
Location: Vista, CA

adding a column to a cross tab report

Post by erikbrandvig »

how can I add a column to a cross tab report?

the cross tab portion is calculating correctly, but we need to add a column directly from the sql result to the cross tab.

also, is it possible to have the "line numbers" displayed on the cross tab? {line} did not work... it displayed "1" for the entire report.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: adding a column to a cross tab report

Post by HighAley »

Hello.
erikbrandvig wrote:the cross tab portion is calculating correctly, but we need to add a column directly from the sql result to the cross tab.
Could you describe this issue more detailed? The cross-tab is rendered
erikbrandvig wrote:also, is it possible to have the "line numbers" displayed on the cross tab? {line} did not work... it displayed "1" for the entire report.
You could get the Column and Row in the Process Cell event:

Code: Select all

e.Cell
e.Column
Thank you.
erikbrandvig
Posts: 25
Joined: Tue Apr 26, 2011 1:01 pm
Location: Vista, CA

Re: adding a column to a cross tab report

Post by erikbrandvig »

are you suggesting that "e.Cell" would return the row number?

do you think that I should use a variable to count rows in the "process cell" event? is that available in the properties window of the cross-tab report?

another column in the cross-tab... I want to add another column in the cross-tab. I understand that the cross-tab results are grouped... there is only one value per "grouped value" that I want to add.

Code: Select all

     grouping value   added column   cross-tab columns
1    value 1              string1               1    4
2    value 2              string 2              2    5
3    value 3              string 3              3    6
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: adding a column to a cross tab report

Post by HighAley »

Hello.
erikbrandvig wrote:are you suggesting that "e.Cell" would return the row number?
Sorry, the e.Row will show the Row number.
erikbrandvig wrote:do you think that I should use a variable to count rows in the "process cell" event? is that available in the properties window of the cross-tab report?

another column in the cross-tab... I want to add another column in the cross-tab. I understand that the cross-tab results are grouped... there is only one value per "grouped value" that I want to add.

Code: Select all

     grouping value   added column   cross-tab columns
1    value 1              string1               1    4
2    value 2              string 2              2    5
3    value 3              string 3              3    6
You could add 2 cross-rows with one value and change Display Value of one of them or use ProcessCell event if you need to add row number. You should know that the row number counts from first row of the whole cross-tab and starts from zero.

Please, look at the attached report template.
Report.mrt
(25.47 KiB) Downloaded 409 times
Thank you.
erikbrandvig
Posts: 25
Joined: Tue Apr 26, 2011 1:01 pm
Location: Vista, CA

Re: adding a column to a cross tab report

Post by erikbrandvig »

i have the line numbers. thanks!

now i'm trying to get another column into the cross tab... but i get a "total" or summary cell that i don't want... how can i get rid of that?

Image
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: adding a column to a cross tab report

Post by HighAley »

Hello.

You should just set the Show Total property of the second row to False.
ShowTotal.png
ShowTotal.png (60.08 KiB) Viewed 3468 times
Thank you.
Post Reply