?
Solved

Crosstab-Multiple Selected values in powerscript variable

Posted on 2004-04-08
7
Medium Priority
?
336 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 1000 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

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!

Question has a verified solution.

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

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deletiā€¦
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.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses

801 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