Pass Parameter(s) to Report Sharp Shooter


Author
Message
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 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

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Terry,

Actually you are better off using the CustomBBS.  I can give you some long explanations here, but you need to build the data source and deal with the criteria and parms there.  If you download the StrataFlix sample it will show you how to do this very thing.

Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
Trent, I'm sorry but I did use the Custom BBS. What I have is a simple report that will fit for many different kinds of people. I am able to use the same BO but just a different Select to get the data. 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. I am not sure how to do it your way. Any help would be appreciated. TIA. Maybe the Stratflix sample will have that in there and I will look at that this afternoon to see if I can find it.
Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Yeah, this is the same thing that we do in our medical app as well as StrataFlix. There are a number of ways to handle this, either by pulling or setting this value in your data source or to include it in your criteria which is also exposed. If you look at the StrataFlix sample, you will be able to see how we handle it there versus me give a long-winded explanation here. Let me know if you need some help or explanation once you get the StrataFlix loaded. Wink
Edhy Rijo
E
StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K 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
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 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 (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K reputation)StrataFrame VIP (4.6K 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 (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Thanks for taking the time to create the sample, Edhy.  Wink
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)
Group: Forum Members
Posts: 448, Visits: 12K
Oh thank you so much. Your help is over whelming......
Terry Bottorff
Terry Bottorff
Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 reputation)Advanced StrataFrame User (770 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..........
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search