Iron Speed Technical Forums
Register Latest Topics
 
 
 


Reply
  Author   Comment  
rawales2

Registered:
Posts: 96
Reply with quote  #1 
okay, struggling with this for the better part of the afternoon.

Have a show table page.

user should be able to select multiple rows and then pass those row ids into a crystal report.  I know the report works properly but I can't seem to come up with the code to get the selected rows.

The CCW is for manipulating one row at a time.  I need to basically build a string value (comma separated) when the user checks the recordrowselection checkbox.

I only want to process this at the time the report is generated so it needs to loop through the records at that point.



__________________
Rob
You can code your own way...
echo4sos

Avatar / Picture

MVP Developer
Registered:
Posts: 172
Reply with quote  #2 
Hey Rob,

Some time ago I wrote an article that sort of hits on what you are looking to do. I believe there is a built-in GetSelectedRecords() function within Iron Speed that you could use to populate your string builder and then pass that to your Crystal Reports parameter.

The section in my article you'll want to look for is like this:

Code:
Dim i As Integer 
Dim chkbx As CheckBoxList = Me.cblEmployees
Dim sb As StringBuilder = New StringBuilder()
For i = 0 To chkbx.Items.Count - 1
If chkbx.Items(i).Selected Then
sb.Append(chkbx.Items(i).Value & ",")
End If
Next


Have a look and see if this helps any...

http://sjc.ironspeed.com/post/Article-Advanced-Page-Customization-5065382


__________________
-Bill
rawales2

Registered:
Posts: 96
Reply with quote  #3 
Heya, Bill.

Looks like you were dropping a checkbox on the rows or had a field already set to a checkbox control?  I am trying to use the built in row selection "checkbox" but I may have to resort to a workaround.

Found this http://sjc.ironspeed.com/post?id=2310533 and was able to sort make my way through it as well as using the CCW.  Haven't been able to test but it's getting me somewhere.  The biggest hang up here so far was that the op said to put the sub in the tablecontrolrow class which was spinning me for a loop.  I am pretty sure it has to be in the tablecontrol class.

I'll do some more testing this weekend but I think I am on the good foot now.  We'll see.  Right now my brain hurts.  My have to resort to beer coding.

__________________
Rob
You can code your own way...
rawales2

Registered:
Posts: 96
Reply with quote  #4 
Heya, Bill.

Looks like you were dropping a checkbox on the rows or had a field already set to a checkbox control?  I am trying to use the built in row selection "checkbox" but I may have to resort to a workaround.

Found this http://sjc.ironspeed.com/post?id=2310533 and was able to sort make my way through it as well as using the CCW.  Haven't been able to test but it's getting me somewhere.  The biggest hang up here so far was that the op said to put the sub in the tablecontrolrow class which was spinning me for a loop.  I am pretty sure it has to be in the tablecontrol class.

I'll do some more testing this weekend but I think I am on the good foot now.  We'll see.  Right now my brain hurts.  My have to resort to beer coding.

__________________
Rob
You can code your own way...
rawales2

Registered:
Posts: 96
Reply with quote  #5 
hmm... weird.  I just double posted.  Maybe already beer coding... 
__________________
Rob
You can code your own way...
echo4sos

Avatar / Picture

MVP Developer
Registered:
Posts: 172
Reply with quote  #6 
I'm pretty sure it would be in the tablecontrolrow class. I believe the GetSelectedRecords function has it's own looping routine within the table control, which would need to be within the tablecontrolrow to actually pick up what records are selected via checkbox.

Post if you have any issues.

And, imho, there is nothing wrong with beer coding...as long as it functions properly.

__________________
-Bill
aa0708198

Registered:
Posts: 11
Reply with quote  #7 
Can you help me to print the record on Cr from search in search box.
__________________
AK

Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Download Iron Speed Designer

Terms of Service Privacy Statement