Solved

Crosstab-Multiple Selected values in powerscript variable

Posted on 2004-04-08
7
310 Views
Last Modified: 2013-12-26
Hi All,

How do I do multiple selection in a Crosstab object ? And depending on selection i want to do some processing. Consider following scenario:-

      Column1      Column2      Column3      Column4      Column5
      01/01/04      02/01/04      03/01/04      04/01/04      05/01/04
Row1                              
Row2      Selected      Selected      Selected            
Row3                              
Row4                              
Row5            Selected      Selected      Selected      
Row6                              
Row7                              
Row8      Selected      Selected      Selected      Selected      Selected
Row9                              
Row10                              

In the above crossatab object I have enabled the "Mouse Selection" property. Using control button on the keyboard I can do multiple selection within the crosstab. Now my question here is I want to store these selected values in powerscript variable like

for first row
     ls_str[1] = 'Row2'
     ld_from[1] = '01/01/04'
     ld_to[1] = '03/01/04'
next

for second row
     ls_str[2] = 'Row5'
     ld_from[2] = '02/01/04'
     ld_to[2] = '04/01/04'
next

for last row
     ls_str[3] = 'Row8'
     ld_from[3] = '01/01/04'
     ld_to[3] = '05/01/04'
next

pls. get back to me for any clarification.

awaiting for a solution...........

0
Comment
Question by:JatinVaishnav
7 Comments
 
LVL 15

Accepted Solution

by:
namasi_navaretnam earned 500 total points
Comment Utility
In the clicked event of the datawindow you can use ObjectAtpointer function to obtain row/column info. row is a predefined parameter in the clicked event.


In clicked event:
String dwobjectname

dwobjectname = dw_1.GetObjectAtPointer()
messagebox("debug", dwobjectname + '||' + string(row) )

Also try:
long ll_row, ll_col
ll_col = dw_1.getclickedcolumn()
ll_row = dw_1.GetClickedRow()

MessageBox("debug", string(ll_col) + '|' + string(ll_row))

long ll_data[1000, 1000]
ll_data[ll_row, ll_col] = dw_1.GetItemNumber(ll_row, ll_col)

MessageBox("data",  string(ll_data[ll_row, ll_col]))

regards-

0
 
LVL 15

Expert Comment

by:namasi_navaretnam
Comment Utility
Please close open questions.

Regards :)
0
 
LVL 14

Expert Comment

by:sandeep_patel
Comment Utility
namasi,
i think it will not fulfil jatin's requirement b'coz he wants the value of column heading in crosstab. not the value at cross-section of row and column.

so if in a cross-tab,
emp_code is as row and hire_date is as column and pay_amt is as value then your solution gives 'pay_amt' i.e. value.
but jatin wants hire_date i.e. column and rownumber

rownumber is not the problem only column heading value is the problem..

m i right ?
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 8

Expert Comment

by:Vikas_Dixit
Comment Utility
Have you tried this :

ls_selected_data = This.Object.DataWindow.Selected.Data)

--VIkas
0
 
LVL 8

Expert Comment

by:Vikas_Dixit
Comment Utility
Ignore the bracket......... :)
0
 
LVL 8

Expert Comment

by:Vikas_Dixit
Comment Utility
Also see :
dw_control.Object.DataWindow.Selected
This will return you the list of selected columns in the format :
startrow1/endrow1/startobj1/endobj1;startrow2/endrow2/startobj2/endobj2;...
Map this to wnat you got from This.Object.DataWindow.Selected.Data

Regards,
VIkas
0
 

Author Comment

by:JatinVaishnav
Comment Utility
Hi All,

Thanks for your reply.

I can't accept namasi's answer the same reason what sandeep has explained.

I have tried Vikas's solution also but i can't accept as it is giving the data within the column and not the column header.

I got the column header values from dw_1.Describe("t_2"+String(mid(ls_col,14))+".Text").

I owe half the points to namasi.

Bye


Thanks
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now