|
Re: How to pass the value of one data set into the another dataset? [message #997510 is a reply to message #997418] |
Mon, 07 January 2013 21:53 |
|
If you're setting up a report parameter for the combo box for the name, you can use the value of this report parameter to limit any dataSet. In SQL, you could use a dataSet parameter marker '?' in your query to mark where you want to use the parameter, in your where statement and link the dataSet parameter to your report parameter in the dataSet editor. Otherwise, you can use the parameter in a filter to limit your dataSet. Let me know if I'm misunderstanding something.
Michael
Developer Evangelist, Silanis
|
|
|
|
|
|
|
|
|
|
|
Re: How to pass the value of one data set into the another dataset? [message #1000958 is a reply to message #997418] |
Tue, 15 January 2013 19:25 |
|
This can probably be cleaned up some, but take a look at this example. It fills a select list box using the values from a parameter ds. I use a computed column in that dataSet to concatenate the values for use in the html list box. The current parameter value is always the default, in the list box. All is the report parameter default, so All starts out selected. If the value changes, the report is ran again by calling a javascript function you can see in the text box at the top of the report. Hope this helps. Let me know if you have questions. Again, this is a quick, messy example, so you could probably clean it up some.
Michael
Developer Evangelist, Silanis
[Updated on: Tue, 15 January 2013 19:26] Report message to a moderator
|
|
|
|
|
|
|
|
Re: How to pass the value of one data set into the another dataset? [message #1004915 is a reply to message #1004418] |
Thu, 24 January 2013 05:48 |
|
I tested this a little bit. I just replaced the this.queryText in the beforeOpen. When doing this, I got errors until I removed the parameter markers '?' from the query in the dataset editor. After removing those, a script like the following allowed me to pass my parameters as expected, where cnum, startDate, and endDate are my correctly formatted parameter strings:
this.queryText = "{call getPaymentsByCustomerAndDate('" + cnum + "','" + startDate + "','" + endDate + "')}";
Michael
Developer Evangelist, Silanis
|
|
|
|
|
Re: How to pass the value of one data set into the another dataset? [message #1005209 is a reply to message #1005047] |
Thu, 24 January 2013 16:37 |
|
In the example I provided earlier, the only reason I passed the parameters in the beforeOpen was because I used an SQL query with no where statement for the original run of the report and then only limited the returns based on what was selected in the html form in the report. If you limit the initial query results to certain values, which you'd likely have to do with a stored procedure, there should be no real reason for you to use the beforeOpen script. You should just be able to link your report parameters to your dataSet parameters in the dataSet editor.
Michael
Developer Evangelist, Silanis
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05404 seconds