Solved

Crosstab-Multiple Selected values in powerscript variable

Posted on 2004-04-08
7
329 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 15

Accepted Solution

by:
namasi_navaretnam earned 500 total points
ID: 10782866
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
ID: 10782870
Please close open questions.

Regards :)
0
 
LVL 14

Expert Comment

by:sandeep_patel
ID: 10784333
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Expert Comment

by:Vikas_Dixit
ID: 10785213
Have you tried this :

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

--VIkas
0
 
LVL 8

Expert Comment

by:Vikas_Dixit
ID: 10785221
Ignore the bracket......... :)
0
 
LVL 8

Expert Comment

by:Vikas_Dixit
ID: 10785358
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
ID: 10796988
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
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.

719 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