Tuesday, March 27, 2012
Ability to Manually Enter a Parameter in a Queried Parameter
Works great. Now they want to have the ability to enter their own if they
know what value they want rather than scrolling through the list.
Any ideas on how to go about this?
ThanksAnybody?
"BillD" wrote:
> I have a queried parameter getting it's parameters from its own dataset.
> Works great. Now they want to have the ability to enter their own if they
> know what value they want rather than scrolling through the list.
> Any ideas on how to go about this?
> Thanks
>|||Chris,
Thank You for taking the time to reply. Looks like I'll be getting into some
ASP as I also like to have a calendar for date parameters...
"Chris Baldwin" wrote:
> > "BillD" wrote:
> >
> >> I have a queried parameter getting it's parameters from its own
> >> dataset. Works great. Now they want to have the ability to enter
> >> their own if they know what value they want rather than scrolling
> >> through the list.
> Hello BillD,
> I'm not sure there's a way to do this when rendering through Report Manager.
> If there is I'd love to hear about it. But, I know you could easily create
> a custom webform that accomplishes this goal.
> For example, you can use JavaScript to determine whether the text box has
> been typed into and adjust the form action that requests the report accordingly.
> Here's a snippet that I used in one of my apps that might help:
> <script>
> function process()
> {
> var actionBase = "http://localhost/reportserver/myreport?rs:Command=Render&ParamVal=";
> var theForm = document.getElementById("myForm");
> var txtBox = document.getElementById("myBox");
> var selectBox = document.getElementById("mySelect");
> // If the textbox is empty, use the select box value
> if(txtBox.value == "")
> theForm.action = actionBase + selectBox.value;
> else
> // otherwise, use the text box value
> theForm.action = actionBase + txtBox.value;
> theForm.submit();
> }
> </script>
> <form method="get" id="myForm">
> <select id="mySelect">
> <!-- would be populated from database -->
> <option>Val1</option>
> <option>Val2</option>
> <option>Val3</option>
> </select>
> <input id="myBox" type="textbox">
> <input type="button" value="Submit" onClick="process();">
> </form>
> -chris
>
>sql
Thursday, March 22, 2012
A Way To Go To First Row In A Parameter's DataSet?
We have cascading parameters in many of our reports. Many of the subsequent parameters after the previous ones have been selected, will result in a dataset with just one or two rows. Is there anyway to have Reporting Services select that first (and many times the only) record in that dataset?
Thanks!
Unfortunately no, there isn't.Monday, March 19, 2012
A table within a table
multiple datasets within one table, but since it will only let me put
one dataset within the table, I am trying to put a table within a table
but I can't get it to work. Thank you for any help that you can give!What are you trying to accomplish? Maybe there's another way...
"KimB" wrote:
> Does anyone know how to put a table within a table? I need to use
> multiple datasets within one table, but since it will only let me put
> one dataset within the table, I am trying to put a table within a table
> but I can't get it to work. Thank you for any help that you can give!
>|||Hi! Actually, the stored procedures were already given to me and I have two
rows to put in my report, with row one coming from one procedure, and row two
coming from the other procedure. I did try putting a list within the table
and the list let me use a different data set than the table was...I know
that the table within a table should let me use different data sets, but I
havent been able to figure it out. Thank you for responding!
"daw" wrote:
> What are you trying to accomplish? Maybe there's another way...
> "KimB" wrote:
> > Does anyone know how to put a table within a table? I need to use
> > multiple datasets within one table, but since it will only let me put
> > one dataset within the table, I am trying to put a table within a table
> > but I can't get it to work. Thank you for any help that you can give!
> >
> >|||I haven't really used temp tables, but could you combine the data from the
two stored procedures into a temp table and use that as your data set?
"KimB" wrote:
> Hi! Actually, the stored procedures were already given to me and I have two
> rows to put in my report, with row one coming from one procedure, and row two
> coming from the other procedure. I did try putting a list within the table
> and the list let me use a different data set than the table was...I know
> that the table within a table should let me use different data sets, but I
> havent been able to figure it out. Thank you for responding!
> "daw" wrote:
> > What are you trying to accomplish? Maybe there's another way...
> >
> > "KimB" wrote:
> >
> > > Does anyone know how to put a table within a table? I need to use
> > > multiple datasets within one table, but since it will only let me put
> > > one dataset within the table, I am trying to put a table within a table
> > > but I can't get it to work. Thank you for any help that you can give!
> > >
> > >|||I have the same problem too, the only difference is I have 20 stored
procedures to call for my 20 different tables.
"daw" wrote:
> I haven't really used temp tables, but could you combine the data from the
> two stored procedures into a temp table and use that as your data set?
> "KimB" wrote:
> > Hi! Actually, the stored procedures were already given to me and I have two
> > rows to put in my report, with row one coming from one procedure, and row two
> > coming from the other procedure. I did try putting a list within the table
> > and the list let me use a different data set than the table was...I know
> > that the table within a table should let me use different data sets, but I
> > havent been able to figure it out. Thank you for responding!
> >
> > "daw" wrote:
> >
> > > What are you trying to accomplish? Maybe there's another way...
> > >
> > > "KimB" wrote:
> > >
> > > > Does anyone know how to put a table within a table? I need to use
> > > > multiple datasets within one table, but since it will only let me put
> > > > one dataset within the table, I am trying to put a table within a table
> > > > but I can't get it to work. Thank you for any help that you can give!
> > > >
> > > >
Saturday, February 25, 2012
A question about using stored procedure to update database?
A stored procedure was created to update a database.
But, I don't know how to trigger it in code:
This is the example to create a dataset for Dropdownlist,
Dim da As New SqlDataAdapter(myCommand)
Dim ds AS DataSet = new DataSet() da.Fill(ds)
This way doesn't work for triggering the stored procedure for updating database
How to trigger the stored Procedure for updating the database in the code?
Thx.
You need to create a SqlCommand object - in the properties for this you can set it to be a stored procedure and set the text to be something like [dbo].sprocname - then need to give it a SqlConnection object for it to be able to access the database
eg:
using
(SqlConnection conSQL =newSqlConnection("YourConString")){
using (SqlCommand cmd =newSqlCommand()){
cmd.CommandText =
"[dbo].sprocname";cmd.CommandType = System.Data.
CommandType.StoredProcedure;cmd.Parameters =
newSqlParameterCollection(<this should match your sproc>);cmd.ExecuteNonQuery();
}
}