Pass Parameter(s) to Report Sharp Shooter


Author
Message
Terry Bottorff
Terry Bottorff
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 448, Visits: 12K
Following the code from a sample I found on this forum, I have a simple form with a button on it that I click and want it to render my report. Of course I have a BO and BBS. I fill my BO.

The report will render correctly but now I would like to pass a parameter to my report. I know I need to use GetParameter in my report but I am not sure what I need in my form or button click. TIA

Replies
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Terry Bottorff (02/01/2010)
...What I was wanting to do is get a different value to use in the heading of the report. Such as:

Results for Bare Back or Results for Bull Riders and so forth. So what I was trying to do is say let cevt="Bare Back" and run the report and then let cevt="Bull Riders" and run the report.




Hi Terry,



Where are you getting the value for "cevt"? if this is in the database, you can simply use that field for the header or depending on how you are generating the report you can pass that value to the report before it gets render.



In this case, it would be easier to use any of the sample posted in the forums to try to reproduce your issue then re-post the sample here so we can take a look at.

Edhy Rijo

Terry Bottorff
Terry Bottorff
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 448, Visits: 12K
It is a variable defined in the code on the form. On the Strataflix sample where does one begin to look at the code? TIA
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Again this would be much easier with a sample.



Here I took a sample provided by Trent a while ago and modified to use the RSS parameter way because I believe it will be easier in your case to do this way.



I build the sample with the latest assemblies from SF and RSS if you don't have those, please change the references.



In Form1.vb pay attention to the ReportManager1_GetReportParameter method. Also you must add the parameter to the Document's parameters collection, then show the parameter using the GetParameter("ParameterName") function in the report.



Have fun!Tongue

Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Thanks for taking the time to create the sample, Edhy.  Wink
Terry Bottorff
Terry Bottorff
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 448, Visits: 12K
Oh thank you so much. Your help is over whelming......
Terry Bottorff
Terry Bottorff
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 448, Visits: 12K
Thanks Edhy, the piece I was missing was setting up the Document's parameter list. Just needed that little nudge to get me going. Thanks to all. Trent thanks for the idea to include some of the info in the data table even if it is not part of the data. That also worked..........
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Glad you got it going. This is a great community out here! Smile
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Terry, glad it is clear now, also when you have a chance take a look at the RSS Sample projects, they are really good.  I have been there in the past and I am happy to contribute as much as I can.

Trent, you are welcome.

Edhy Rijo

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Terry Bottorff - 15 Years Ago
Trent L. Taylor - 15 Years Ago
Terry Bottorff - 15 Years Ago
Trent L. Taylor - 15 Years Ago
Edhy Rijo - 15 Years Ago
Terry Bottorff - 15 Years Ago
                         Again this would be much easier with a sample.

Here I...
Edhy Rijo - 15 Years Ago
                             Thanks for taking the time to create the sample, Edhy. ;)
Trent L. Taylor - 15 Years Ago
                             Oh thank you so much. Your help is over whelming......
Terry Bottorff - 15 Years Ago
                             Thanks Edhy, the piece I was missing was setting up the Document's...
Terry Bottorff - 15 Years Ago
                                 Glad you got it going. This is a great community out here! :)
Trent L. Taylor - 15 Years Ago
                                     Terry, glad it is clear now, also when you have a chance take a look...
Edhy Rijo - 15 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search