Friday, March 23, 2012
Is it possible to display the selected label (not value) of a query based Parameter in rep
If I have a query based parameter which has labels and values, for example,
parameter: Department, label: DepartmentName, Value: DepartmentID, I am
using the parameter value (e.g. DepartmentID) in the dataset filter, but I
want to display the parameter label in the report page footer. Is there an
easy way to do it? Right now I can use only Parameters!Department.Value
which displays the chosen DepartmentID.
Thanks.You can access the report parameter label by using the Label property:
=Parameters!Department.Label
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Wendy H" <WendyH@.tequilasoftware.com> wrote in message
news:%23sh1GK$eEHA.636@.TK2MSFTNGP12.phx.gbl...
> Hi,
> If I have a query based parameter which has labels and values, for
example,
> parameter: Department, label: DepartmentName, Value: DepartmentID, I am
> using the parameter value (e.g. DepartmentID) in the dataset filter, but I
> want to display the parameter label in the report page footer. Is there an
> easy way to do it? Right now I can use only Parameters!Department.Value
> which displays the chosen DepartmentID.
> Thanks.
>
>
Wednesday, March 21, 2012
Is it possible to create libraries to reuse parts of my report?
my first page looks always the same - image, title (of courese not always the
same) and three subtitles
Thank youInherited Report
Now you can create your custom Report Templates, and keep it in managed code
and reuse it!, in this example will show you, how to sub-class
the Report Class and create your report templates for further reuse.
http://www.rdlcomponents.com/examples/inherited/inherited.aspx
"Hawkeye" wrote:
> Is it possible to create libraries to reuse parts of my report? For Example
> my first page looks always the same - image, title (of courese not always the
> same) and three subtitles
> Thank you
>|||... I don't want to buy further tools!!!!
"Jerry" wrote:
> Inherited Report
> Now you can create your custom Report Templates, and keep it in managed code
> and reuse it!, in this example will show you, how to sub-class
> the Report Class and create your report templates for further reuse.
> http://www.rdlcomponents.com/examples/inherited/inherited.aspx
>
> "Hawkeye" wrote:
> > Is it possible to create libraries to reuse parts of my report? For Example
> > my first page looks always the same - image, title (of courese not always the
> > same) and three subtitles
> >
> > Thank you
> >|||You can do by yourself w/o buy anything, but if you have enough time:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/RSAMPLES/htm/rss_tutorials_v1_02ua.asp
"Hawkeye" wrote:
> ... I don't want to buy further tools!!!!
> "Jerry" wrote:
> > Inherited Report
> >
> > Now you can create your custom Report Templates, and keep it in managed code
> > and reuse it!, in this example will show you, how to sub-class
> > the Report Class and create your report templates for further reuse.
> >
> > http://www.rdlcomponents.com/examples/inherited/inherited.aspx
> >
> >
> > "Hawkeye" wrote:
> >
> > > Is it possible to create libraries to reuse parts of my report? For Example
> > > my first page looks always the same - image, title (of courese not always the
> > > same) and three subtitles
> > >
> > > Thank you
> > >
Is it possible to conditionally skip steps in a job?
step?
For example I don’t want to run a step if the are no records in a table.
I also need to loop based on a condition.
Sounds like a DTS package is a better choice for this type of work.
Andrew J. Kelly SQL MVP
"Dave" <Dave@.discussions.microsoft.com> wrote in message
news:742CC080-17BE-4885-AFF4-D5769DE1AC0E@.microsoft.com...
> Is it possible to conditionally skip or jump steps in a job without
> failing a
> step?
> For example I don't want to run a step if the are no records in a table.
> I also need to loop based on a condition.
>
|||Yes, you can... select the task. Right click and go to task properties ( I
could be mistaken and it might be in the workflow properties..) but you can
associate a script ( the button is on the lower left side of the dialog
box.)..
The script returns a value which indicates whether the step/task should run
or not...
Sorry I can't remember better details, and I only have Yukon installed on
this box...
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Dave" <Dave@.discussions.microsoft.com> wrote in message
news:742CC080-17BE-4885-AFF4-D5769DE1AC0E@.microsoft.com...
> Is it possible to conditionally skip or jump steps in a job without
failing a
> step?
> For example I don't want to run a step if the are no records in a table.
> I also need to loop based on a condition.
>
|||If this is with a job you can generate failure inside that step with
RAISERROR and then on job properties choose on failure go to the next step.
Other way with a job is to combine these 2 steps in one and make
a condition inside.
If this is a DTS go to the sqldts.com - there is a very good example
of skipping steps inside DTS package.
Regards.
"Dave" wrote:
> Is it possible to conditionally skip or jump steps in a job without failing a
> step?
> For example I don’t want to run a step if the are no records in a table.
> I also need to loop based on a condition.
>
Is it possible to conditionally skip steps in a job?
a
step?
For example I don’t want to run a step if the are no records in a table.
I also need to loop based on a condition.Sounds like a DTS package is a better choice for this type of work.
Andrew J. Kelly SQL MVP
"Dave" <Dave@.discussions.microsoft.com> wrote in message
news:742CC080-17BE-4885-AFF4-D5769DE1AC0E@.microsoft.com...
> Is it possible to conditionally skip or jump steps in a job without
> failing a
> step?
> For example I don't want to run a step if the are no records in a table.
> I also need to loop based on a condition.
>|||Yes, you can... select the task. Right click and go to task properties ( I
could be mistaken and it might be in the workflow properties..) but you can
associate a script ( the button is on the lower left side of the dialog
box.)..
The script returns a value which indicates whether the step/task should run
or not...
Sorry I can't remember better details, and I only have Yukon installed on
this box...
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Dave" <Dave@.discussions.microsoft.com> wrote in message
news:742CC080-17BE-4885-AFF4-D5769DE1AC0E@.microsoft.com...
> Is it possible to conditionally skip or jump steps in a job without
failing a
> step?
> For example I don't want to run a step if the are no records in a table.
> I also need to loop based on a condition.
>|||If this is with a job you can generate failure inside that step with
RAISERROR and then on job properties choose on failure go to the next step.
Other way with a job is to combine these 2 steps in one and make
a condition inside.
If this is a DTS go to the sqldts.com - there is a very good example
of skipping steps inside DTS package.
Regards.
"Dave" wrote:
> Is it possible to conditionally skip or jump steps in a job without failin
g a
> step?
> For example I don’t want to run a step if the are no records in a table.
> I also need to loop based on a condition.
>
Is it possible to conditionally skip steps in a job?
step?
For example I donâ't want to run a step if the are no records in a table.
I also need to loop based on a condition.Sounds like a DTS package is a better choice for this type of work.
--
Andrew J. Kelly SQL MVP
"Dave" <Dave@.discussions.microsoft.com> wrote in message
news:742CC080-17BE-4885-AFF4-D5769DE1AC0E@.microsoft.com...
> Is it possible to conditionally skip or jump steps in a job without
> failing a
> step?
> For example I don't want to run a step if the are no records in a table.
> I also need to loop based on a condition.
>|||Yes, you can... select the task. Right click and go to task properties ( I
could be mistaken and it might be in the workflow properties..) but you can
associate a script ( the button is on the lower left side of the dialog
box.)..
The script returns a value which indicates whether the step/task should run
or not...
Sorry I can't remember better details, and I only have Yukon installed on
this box...
--
Wayne Snyder MCDBA, SQL Server MVP
Mariner, Charlotte, NC
(Please respond only to the newsgroup.)
I support the Professional Association for SQL Server ( PASS) and it's
community of SQL Professionals.
"Dave" <Dave@.discussions.microsoft.com> wrote in message
news:742CC080-17BE-4885-AFF4-D5769DE1AC0E@.microsoft.com...
> Is it possible to conditionally skip or jump steps in a job without
failing a
> step?
> For example I don't want to run a step if the are no records in a table.
> I also need to loop based on a condition.
>|||If this is with a job you can generate failure inside that step with
RAISERROR and then on job properties choose on failure go to the next step.
Other way with a job is to combine these 2 steps in one and make
a condition inside.
If this is a DTS go to the sqldts.com - there is a very good example
of skipping steps inside DTS package.
Regards.
"Dave" wrote:
> Is it possible to conditionally skip or jump steps in a job without failing a
> step?
> For example I donâ't want to run a step if the are no records in a table.
> I also need to loop based on a condition.
>
Monday, March 12, 2012
Is it possible
--------------------------------------------------------------
Function GetNames(ByVal uid As Integer) As System.Data.DataSet Dim connectionString As String = (ConfigurationSettings.AppSettings("ConnectionString"))
Dim dbConnection As System.Data.IDbConnection = New System.Data.SqlClient.SqlConnection(connectionString)
Dim queryString As String = "SELECT [Products].[uid], [Products].[ManufacturerId], [Products].[Name], [Manufacturers].[uid], [Manufacturers].[AddressID], [Test.dbo].[uid], [Test.dbo].[Company] FROM [Products] INNER JOIN [Manufacturers] ON [Products].[uid] = [Manufacturers].[uid] INNER JOIN [Test.dbo] ON [Manufacturers].[uid] = [Test.dbo].[uid]"
Dim dbCommand As System.Data.IDbCommand = New System.Data.SqlClient.SqlCommand
dbCommand.CommandText = queryString
dbCommand.Connection = dbConnection
Dim dbParam_uid As System.Data.IDataParameter = New System.Data.SqlClient.SqlParameter
dbParam_uid.ParameterName = "@.uid"
dbParam_uid.Value = uid
dbParam_uid.DbType = System.Data.DbType.Int32
dbCommand.Parameters.Add(dbParam_uid)
Dim dataAdapter As System.Data.IDbDataAdapter = New System.Data.SqlClient.SqlDataAdapter
dataAdapter.SelectCommand = dbCommand
Dim dataSet As System.Data.DataSet = New System.Data.DataSet
dataAdapter.Fill(dataSet)
Return dataSet
End FunctionYour syntax is incorrect. You are missing ] and [ when referencing the other database.
Dim queryString As String = "SELECT [Products].[uid], [Products].[ManufacturerId], [Products].[Name], [Manufacturers].[uid], [Manufacturers].[AddressID], [Test].[dbo].[uid], [Test].[dbo].[Company] FROM [Products] INNER JOIN [Manufacturers] ON [Products].[uid] = [Manufacturers].[uid] INNER JOIN [Test].[dbo] ON [Manufacturers].[uid] = [Test].[dbo].[uid]"
|||Thank You Douglas,
I did try it that way, and it threw me this error:
Invalid object name 'Test.dbo'.
Description:An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details:System.Data.SqlClient.SqlException: Invalid object name 'Test.dbo'.
Source Error:
|
database.owner.tablenameand this format when referring to a column in your table
database.owner.tablename.columnname
|||
Thank you Terri & Douglas,
Yes Indeed I overlooked & forgot all about adding the Table Name. I do have it working now. Big Thanks!! As always... You Guys are the Best!!!
Friday, March 9, 2012
Is it necessary to order again?
CREATE FUNCTION dbo.Example(@.Param int)
RETURNS @.Tbl TABLE (
Field1 int,
Field2 int) AS
BEGIN
INSERT @.Tbl (Field1,Field2)
SELECT FieldA,FieldB FROM DataTable
WHERE FieldC = @.Param
ORDER BY FieldA
RETURN
END
The statement that populates the table orders the data. In order
to ensure the results are ordered that way, should the call to the
function include an ordering? I.e., is this sufficient
SELECT * FROM dbo.Example(17)
or is this necessary? --
SELECT * FROM dbo.Example(17) ORDER BY Field1
Thanks!"Jim Geissman" <jim_geissman@.countrywide.com> wrote in message
news:b84bf9dc.0408051457.6ae418c0@.posting.google.c om...
> I have a function that returns a table:
> CREATE FUNCTION dbo.Example(@.Param int)
> RETURNS @.Tbl TABLE (
> Field1 int,
> Field2 int) AS
> BEGIN
> INSERT @.Tbl (Field1,Field2)
> SELECT FieldA,FieldB FROM DataTable
> WHERE FieldC = @.Param
> ORDER BY FieldA
> RETURN
> END
> The statement that populates the table orders the data.
No, it doesn't. Tables are sets of data. They have no order.
Now, your statement may put the data into the table in order... but there's
no guarantee that SQL Server will store it in that order.
> In order
> to ensure the results are ordered that way, should the call to the
> function include an ordering? I.e., is this sufficient
> SELECT * FROM dbo.Example(17)
No
> or is this necessary? --
> SELECT * FROM dbo.Example(17) ORDER BY Field1
Yes.
> Thanks!