Showing posts with label parameters. Show all posts
Showing posts with label parameters. Show all posts

Friday, March 30, 2012

Reporting Services Advanced Features

I am looking to find more information regarding advanced filtering/report parameters available in SQL Server 2005 Reporting Services. From what I can see, the user can set values for each report parameter and the query defaults to "where x = (param 1) and y = (param 2)" etc. Is there a way that a user can pick parameters that structure a more complex where clause? For example, say I want to filter by all clients enrolled in all of these 3 service programs and have a dog or clients not enrolled in one of the following 3 care programs or clients who live in one of the following cities? So it would be like this:

where (((sp = 1 and sp = 2 and sp = 3) and animal = dog) or ((cp not in (1, 2, 3)) or city in (a, b, c, d)))

In addition, I am looking for more information regarding programmatic capabilities in Reporting Services. Can anyone point me to a good place for this information? I would like to know whether we could structure part of a query in VB.NET code and then pass this query to Reporting Services to join with the basic report query. Also, I would like to know Reporting Services' capability to interact with stored procedures.

In addition, is Reporting Services more for internal business reporting, or do companies add it onto their existing software package to sell to external customers? Does Reporting Services allow one report to be created, and then users (our customers) on different servers who use different databases to run the report by giving Reporting Services their credentials (database, SQL Server login, etc)?

Basically, I have just been following the tutorials on Microsoft's site, but they are all pretty basic so I haven't gotten a good feel for whether this product is good for advanced reporting needs.

Thanks!

Anonymous wrote:

I am looking to find more information regarding advanced filtering/report parameters available in SQL Server 2005 Reporting Services. From what I can see, the user can set values for each report parameter and the query defaults to "where x = (param 1) and y = (param 2)" etc. Is there a way that a user can pick parameters that structure a more complex where clause? For example, say I want to filter by all clients enrolled in all of these 3 service programs and have a dog or clients not enrolled in one of the following 3 care programs or clients who live in one of the following cities? So it would be like this:

where (((sp = 1 and sp = 2 and sp = 3) and animal = dog) or ((cp not in (1, 2, 3)) or city in (a, b, c, d)))

You can add pretty much any type of WHERE clause you'd like, since you control the query that is being issued. The default interface is best suited to modifying the value portion of a where clause, not adding new columns or changing operators. It is possible, but it is not as easy to implement.

Anonymous wrote:

In addition, is Reporting Services more for internal business reporting, or do companies add it onto their existing software package to sell to external customers? Does Reporting Services allow one report to be created, and then users (our customers) on different servers who use different databases to run the report by giving Reporting Services their credentials (database, SQL Server login, etc)?

It is used for both. Microsoft uses Reporting Services in the Dynamics products, for example.

|||Can you point me to some tutorials and/or articles that provide more details? For the query above, I want the user to specify the columns, values, and operators for the where clause and then be able to generate the query from their specifications.

How can Reporting Services be used to allow a user to log into our application, select the databases to work with, and then have the report generate according to user login?
|||

If your requirement is that the user by allowed to create their own where clauses, you might want to investigate Report Builder as an option. It provides all the GUI for accomplishes this, and can allow users to build their own reports on the fly. There are other third party tools that allow this as well.

The other path is to build your own front end to manage the creation of the where clause. It's more work, but you have full control. If you want to go this route, I'd recommend checking out a few books on Reporting Services, as many of them have chapters that deal with this to some degree.

Reporting Services Advanced Features

I am looking to find more information regarding advanced filtering/report parameters available in SQL Server 2005 Reporting Services. From what I can see, the user can set values for each report parameter and the query defaults to "where x = (param 1) and y = (param 2)" etc. Is there a way that a user can pick parameters that structure a more complex where clause? For example, say I want to filter by all clients enrolled in all of these 3 service programs and have a dog or clients not enrolled in one of the following 3 care programs or clients who live in one of the following cities? So it would be like this:

where (((sp = 1 and sp = 2 and sp = 3) and animal = dog) or ((cp not in (1, 2, 3)) or city in (a, b, c, d)))

In addition, I am looking for more information regarding programmatic capabilities in Reporting Services. Can anyone point me to a good place for this information? I would like to know whether we could structure part of a query in VB.NET code and then pass this query to Reporting Services to join with the basic report query. Also, I would like to know Reporting Services' capability to interact with stored procedures.

In addition, is Reporting Services more for internal business reporting, or do companies add it onto their existing software package to sell to external customers? Does Reporting Services allow one report to be created, and then users (our customers) on different servers who use different databases to run the report by giving Reporting Services their credentials (database, SQL Server login, etc)?

Basically, I have just been following the tutorials on Microsoft's site, but they are all pretty basic so I haven't gotten a good feel for whether this product is good for advanced reporting needs.

Thanks!

Anonymous wrote:

I am looking to find more information regarding advanced filtering/report parameters available in SQL Server 2005 Reporting Services. From what I can see, the user can set values for each report parameter and the query defaults to "where x = (param 1) and y = (param 2)" etc. Is there a way that a user can pick parameters that structure a more complex where clause? For example, say I want to filter by all clients enrolled in all of these 3 service programs and have a dog or clients not enrolled in one of the following 3 care programs or clients who live in one of the following cities? So it would be like this:

where (((sp = 1 and sp = 2 and sp = 3) and animal = dog) or ((cp not in (1, 2, 3)) or city in (a, b, c, d)))

You can add pretty much any type of WHERE clause you'd like, since you control the query that is being issued. The default interface is best suited to modifying the value portion of a where clause, not adding new columns or changing operators. It is possible, but it is not as easy to implement.

Anonymous wrote:

In addition, is Reporting Services more for internal business reporting, or do companies add it onto their existing software package to sell to external customers? Does Reporting Services allow one report to be created, and then users (our customers) on different servers who use different databases to run the report by giving Reporting Services their credentials (database, SQL Server login, etc)?

It is used for both. Microsoft uses Reporting Services in the Dynamics products, for example.

|||Can you point me to some tutorials and/or articles that provide more details? For the query above, I want the user to specify the columns, values, and operators for the where clause and then be able to generate the query from their specifications.

How can Reporting Services be used to allow a user to log into our application, select the databases to work with, and then have the report generate according to user login?|||

If your requirement is that the user by allowed to create their own where clauses, you might want to investigate Report Builder as an option. It provides all the GUI for accomplishes this, and can allow users to build their own reports on the fly. There are other third party tools that allow this as well.

The other path is to build your own front end to manage the creation of the where clause. It's more work, but you have full control. If you want to go this route, I'd recommend checking out a few books on Reporting Services, as many of them have chapters that deal with this to some degree.

Monday, March 26, 2012

Reporting Services 2005 & Parameters

Hi, I experiencing some problems when accesing the Parameters collection on
the dataset to build the the sql statement.
Below is my code (very simple):
DataSet:
="SELECT 'userid' = '" & code.Parameter("userID", Parameters) & "' FROM
users"
Code:
Public Function Parameter(ByVal field As String, ByRef pars As Object) As
String
return pars(field).Value
End Function
This code works just fine on the Preview but if I test the report on the
browser, it doesnt work and returns the following error:
a.. An error has occurred during report processing.
a.. Cannot set the command text for data set 'ExpoMedios'.
a.. Error during processing of the CommandText expression of dataset
'ExpoMedios'.
Doing some debugging the error message inside the function is:
Attempt to access the method failed.
Can anyone pleae explain why this is happening. Your help will be
appreciated.
Regards,
FabianAny help please? It happens when I access to the Parameters Collection
inside a custom code.
Any help will be appreciated.
Thanks in avance,
Fabian von Romberg
"Fabian von Romberg" <fromberg100@.hotmail.com> wrote in message
news:uBbFLro3GHA.3492@.TK2MSFTNGP06.phx.gbl...
> Hi, I experiencing some problems when accesing the Parameters collection
on
> the dataset to build the the sql statement.
> Below is my code (very simple):
> DataSet:
> ="SELECT 'userid' = '" & code.Parameter("userID", Parameters) & "' FROM
> users"
> Code:
> Public Function Parameter(ByVal field As String, ByRef pars As Object) As
> String
> return pars(field).Value
> End Function
>
> This code works just fine on the Preview but if I test the report on the
> browser, it doesnt work and returns the following error:
> a.. An error has occurred during report processing.
> a.. Cannot set the command text for data set 'ExpoMedios'.
> a.. Error during processing of the CommandText expression of dataset
> 'ExpoMedios'.
> Doing some debugging the error message inside the function is:
> Attempt to access the method failed.
>
> Can anyone pleae explain why this is happening. Your help will be
> appreciated.
> Regards,
> Fabian
>

Friday, March 23, 2012

Reporting services 2000 / 2005 parameters

Hi all,

Is there any way to pass a dataset parameter in RS 2000? Basicly, I have some data in my web page and want to print it. But I don't want to create another page to pass parameters to RS. I want to print the page as it is with the data already in the page, so if there is a way I can send the data through a dataset to the report directly, would be great. Is there?

Thank you very much,

Marco

You can give this a try.

http://blogs.msdn.com/bryanke/archive/2004/09/13/229129.aspx

cheers,

Andrew

|||The link from the blog is not valid.|||

More ideas, please

Thanks,

Marco

|||

I found it after googling custom dataset reporting services.

http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=b8468707-56ef-4864-ac51-d83fc3273fe5

cheers,

Andrew

|||

Good article, Andrew.

Thank you very much

Regards,

Marco

Wednesday, March 21, 2012

Reporting Services - Variables/Parameters - Is this a bug?

When creating a Reporting Services report and declaring local variables as part of your query in a dataset there is sometimes a problem. When you hit run in the Data section and the “Define Query Parameters” box pops up, all the variables are not there. Sometimes when you go to properties (…) of that dataset the parameters are gone. Is this a bug? This is happening both in RS2000 and 2005.

Thanks

?

|||Anyone?|||

Not an expert in this area of the product, but i tried it briefly on my computer - local variables are recognized when you use the generic query designer (the default). They do not appear in the parameters (as they shouldn't). Parameters that are not local variables are automatically detected and shown in the parameters.

I couldn't emulate the behavior you describe. No matter how many times I opened/closed the report the parameters were correctly recognized and the local variables were preserved.

If you're using the graphical query designer, you may be running into some problems - that component rewrites queries and sometimes makes mistakes with more complicated query structures. Unfortunately, it is a standard component that we do not control. Recommendation is to try the generic query designer and see if the problem persists. There is a button on the data tab that lets you switch from using the graphical to using the generic query designer.

Hope that helps,

-Lukasz

|||

this is possibly related, and everytime i encounter it i get closer to having a nervous break down.. its very very annoying to say the least..

here's what i'm getting:

i have a report that gets data from a WebService.. webservice takes 6 parameters, all are primative datatypes.

i have a set of report parameters, and a set of dataset parameters that come from the report params.

i hit the execute button, fill in my values, it chugs along and give's me my expected results in the results grid.. perfect..

i edit my dataset query and put in an <ElementPath> so i can specify a particular table, hit execute and again i get my expected results..

if i do anything ie, edit the query, change to the layout window, then go back to the data window and hit refresh, the query blows up.. i edit my dataset and on the parameters tab, there's nothing.. all gone! wow.. i put all the parameters back in again, viewed the report source, copy and paste the block of code contained in the <DataSets> node to the notepad so i dont have to continually waste time re-entering the parameters..

this seems to happen whenever i click the refresh button.. i've tried to put it in generic query designer, and do it, but the UI seems to revert back to the graphical designer..

i've been dealing with it because most of my reports only took a parameter or two..

any ideas?

EDIT:

actually, i think it might be a problem if there is an error when you type in the parameters.. ie if i have a string param called strGuid, and it craps out the webservice when i cast the string to a guid (missed a char).. it seems to wipe out the dataset parameters..

|||

I've seen this many times, codemare & ruckazz

It will happen for one of the following reasons:

1. Your Query does not get parsed correctly i.e type error and you hit the properties button to go to parameters

2. You use a parameter that is not defined or you spelled incorrectly and go to parameters in properties

Use the Undo button (Ctrl-Z or Edit>Undo) and your parameters WILL be restored, do not save, find your flaw, fix it, save it, run it.

Reporting Services - Variables/Parameters - Is this a bug?

When creating a Reporting Services report and declaring local variables as part of your query in a dataset there is sometimes a problem. When you hit run in the Data section and the “Define Query Parameters” box pops up, all the variables are not there. Sometimes when you go to properties (…) of that dataset the parameters are gone. Is this a bug? This is happening both in RS2000 and 2005.

Thanks

?

|||Anyone?|||

Not an expert in this area of the product, but i tried it briefly on my computer - local variables are recognized when you use the generic query designer (the default). They do not appear in the parameters (as they shouldn't). Parameters that are not local variables are automatically detected and shown in the parameters.

I couldn't emulate the behavior you describe. No matter how many times I opened/closed the report the parameters were correctly recognized and the local variables were preserved.

If you're using the graphical query designer, you may be running into some problems - that component rewrites queries and sometimes makes mistakes with more complicated query structures. Unfortunately, it is a standard component that we do not control. Recommendation is to try the generic query designer and see if the problem persists. There is a button on the data tab that lets you switch from using the graphical to using the generic query designer.

Hope that helps,

-Lukasz

|||

this is possibly related, and everytime i encounter it i get closer to having a nervous break down.. its very very annoying to say the least..

here's what i'm getting:

i have a report that gets data from a WebService.. webservice takes 6 parameters, all are primative datatypes.

i have a set of report parameters, and a set of dataset parameters that come from the report params.

i hit the execute button, fill in my values, it chugs along and give's me my expected results in the results grid.. perfect..

i edit my dataset query and put in an <ElementPath> so i can specify a particular table, hit execute and again i get my expected results..

if i do anything ie, edit the query, change to the layout window, then go back to the data window and hit refresh, the query blows up.. i edit my dataset and on the parameters tab, there's nothing.. all gone! wow.. i put all the parameters back in again, viewed the report source, copy and paste the block of code contained in the <DataSets> node to the notepad so i dont have to continually waste time re-entering the parameters..

this seems to happen whenever i click the refresh button.. i've tried to put it in generic query designer, and do it, but the UI seems to revert back to the graphical designer..

i've been dealing with it because most of my reports only took a parameter or two..

any ideas?

EDIT:

actually, i think it might be a problem if there is an error when you type in the parameters.. ie if i have a string param called strGuid, and it craps out the webservice when i cast the string to a guid (missed a char).. it seems to wipe out the dataset parameters..

|||

I've seen this many times, codemare & ruckazz

It will happen for one of the following reasons:

1. Your Query does not get parsed correctly i.e type error and you hit the properties button to go to parameters

2. You use a parameter that is not defined or you spelled incorrectly and go to parameters in properties

Use the Undo button (Ctrl-Z or Edit>Undo) and your parameters WILL be restored, do not save, find your flaw, fix it, save it, run it.

Reporting Services - Variables/Parameters - Is this a bug?

When creating a Reporting Services report and declaring local variables as part of your query in a dataset there is sometimes a problem. When you hit run in the Data section and the “Define Query Parameters” box pops up, all the variables are not there. Sometimes when you go to properties (…) of that dataset the parameters are gone. Is this a bug? This is happening both in RS2000 and 2005.

Thanks

?

|||Anyone?|||

Not an expert in this area of the product, but i tried it briefly on my computer - local variables are recognized when you use the generic query designer (the default). They do not appear in the parameters (as they shouldn't). Parameters that are not local variables are automatically detected and shown in the parameters.

I couldn't emulate the behavior you describe. No matter how many times I opened/closed the report the parameters were correctly recognized and the local variables were preserved.

If you're using the graphical query designer, you may be running into some problems - that component rewrites queries and sometimes makes mistakes with more complicated query structures. Unfortunately, it is a standard component that we do not control. Recommendation is to try the generic query designer and see if the problem persists. There is a button on the data tab that lets you switch from using the graphical to using the generic query designer.

Hope that helps,

-Lukasz

|||

this is possibly related, and everytime i encounter it i get closer to having a nervous break down.. its very very annoying to say the least..

here's what i'm getting:

i have a report that gets data from a WebService.. webservice takes 6 parameters, all are primative datatypes.

i have a set of report parameters, and a set of dataset parameters that come from the report params.

i hit the execute button, fill in my values, it chugs along and give's me my expected results in the results grid.. perfect..

i edit my dataset query and put in an <ElementPath> so i can specify a particular table, hit execute and again i get my expected results..

if i do anything ie, edit the query, change to the layout window, then go back to the data window and hit refresh, the query blows up.. i edit my dataset and on the parameters tab, there's nothing.. all gone! wow.. i put all the parameters back in again, viewed the report source, copy and paste the block of code contained in the <DataSets> node to the notepad so i dont have to continually waste time re-entering the parameters..

this seems to happen whenever i click the refresh button.. i've tried to put it in generic query designer, and do it, but the UI seems to revert back to the graphical designer..

i've been dealing with it because most of my reports only took a parameter or two..

any ideas?

EDIT:

actually, i think it might be a problem if there is an error when you type in the parameters.. ie if i have a string param called strGuid, and it craps out the webservice when i cast the string to a guid (missed a char).. it seems to wipe out the dataset parameters..

|||

I've seen this many times, codemare & ruckazz

It will happen for one of the following reasons:

1. Your Query does not get parsed correctly i.e type error and you hit the properties button to go to parameters

2. You use a parameter that is not defined or you spelled incorrectly and go to parameters in properties

Use the Undo button (Ctrl-Z or Edit>Undo) and your parameters WILL be restored, do not save, find your flaw, fix it, save it, run it.

Reporting Services - String parameter problems

We have noticed that SQL Reporting Services uses the 'nvarchar' data type for
all report parameters of type 'string'. If the actual datatype of the column
is 'varchar' this causes (serious) performance problems as SQL Server must
convert the 'varchar' column to match the 'nvarchar' parameter.
Is there any way to control the data type that is chosen for 'string'
parameters? And why does SQL Reporting Services choose 'nvarchar' when the
column is of type 'varchar'?
For example, if I have a table defined as:
CREATE TABLE [TestTable] (
[TheKey] [int] NOT NULL ,
[Name] [varchar] (50) NULL ,
CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED
(
[TheKey]
)
)
... and I write a simple report to display this data with a query of :
SELECT Name
FROM TestTable
WHERE (Name = @.NameParam)
.. I notice that the query sent to SQL Server (from Profiler) is:
exec sp_executesql N'SELECT Name
FROM TestTable
WHERE (Name = @.NameParam)', N'@.NameParam nvarchar(4000)', @.NameParam = N'Name0'
... notice that the parameter type is 'nvarchar(4000)' but the actual column
data type is 'varchar'. If you create an execution plan for this query you
can see that SQL Server must perform alot more work than if the parameter was
defined as 'varchar(4000)'.
Thanks,
Scott.Scott
Have you tried CONVERT or CAST on both sides of the expression, i.e
WHERE CONVERT(Varchar(4000), Name) = CONVERT(VarChar(4000), @.NameParam)
I know it's clunky but it is a way of explicitly data typing the fields!
Chris
"Scott Simms" wrote:
> We have noticed that SQL Reporting Services uses the 'nvarchar' data type for
> all report parameters of type 'string'. If the actual datatype of the column
> is 'varchar' this causes (serious) performance problems as SQL Server must
> convert the 'varchar' column to match the 'nvarchar' parameter.
> Is there any way to control the data type that is chosen for 'string'
> parameters? And why does SQL Reporting Services choose 'nvarchar' when the
> column is of type 'varchar'?
> For example, if I have a table defined as:
> CREATE TABLE [TestTable] (
> [TheKey] [int] NOT NULL ,
> [Name] [varchar] (50) NULL ,
> CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED
> (
> [TheKey]
> )
> )
> ... and I write a simple report to display this data with a query of :
> SELECT Name
> FROM TestTable
> WHERE (Name = @.NameParam)
> .. I notice that the query sent to SQL Server (from Profiler) is:
> exec sp_executesql N'SELECT Name
> FROM TestTable
> WHERE (Name = @.NameParam)', N'@.NameParam nvarchar(4000)', @.NameParam => N'Name0'
> ... notice that the parameter type is 'nvarchar(4000)' but the actual column
> data type is 'varchar'. If you create an execution plan for this query you
> can see that SQL Server must perform alot more work than if the parameter was
> defined as 'varchar(4000)'.
> Thanks,
> Scott.
>
>|||Hi Chris,
Yep. If we cast the parameter to varchar the query executes properly. I was
hoping not to update all of my reports to fix this problem!
If you can think of anyway to change the behaviour within Reporting Services
I would appreciate it. If not, can you check if this is being addressed in a
service pack or next version?
Thanks,
Scott.
"Chris McGuigan" wrote:
> Scott
> Have you tried CONVERT or CAST on both sides of the expression, i.e
> WHERE CONVERT(Varchar(4000), Name) = CONVERT(VarChar(4000), @.NameParam)
> I know it's clunky but it is a way of explicitly data typing the fields!
> Chris
> "Scott Simms" wrote:
> > We have noticed that SQL Reporting Services uses the 'nvarchar' data type for
> > all report parameters of type 'string'. If the actual datatype of the column
> > is 'varchar' this causes (serious) performance problems as SQL Server must
> > convert the 'varchar' column to match the 'nvarchar' parameter.
> >
> > Is there any way to control the data type that is chosen for 'string'
> > parameters? And why does SQL Reporting Services choose 'nvarchar' when the
> > column is of type 'varchar'?
> >
> > For example, if I have a table defined as:
> >
> > CREATE TABLE [TestTable] (
> > [TheKey] [int] NOT NULL ,
> > [Name] [varchar] (50) NULL ,
> > CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED
> > (
> > [TheKey]
> > )
> > )
> >
> > ... and I write a simple report to display this data with a query of :
> >
> > SELECT Name
> > FROM TestTable
> > WHERE (Name = @.NameParam)
> >
> > .. I notice that the query sent to SQL Server (from Profiler) is:
> >
> > exec sp_executesql N'SELECT Name
> > FROM TestTable
> > WHERE (Name = @.NameParam)', N'@.NameParam nvarchar(4000)', @.NameParam => > N'Name0'
> >
> > ... notice that the parameter type is 'nvarchar(4000)' but the actual column
> > data type is 'varchar'. If you create an execution plan for this query you
> > can see that SQL Server must perform alot more work than if the parameter was
> > defined as 'varchar(4000)'.
> >
> > Thanks,
> >
> > Scott.
> >
> >
> >|||Hi Scott,
I appreciate what your saying.
I reckon it's "Data Type Precedence" that's causing your problem, see;
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_da-db_2js5.asp
for an explanation.
It's typing to the highest common denominator which must be the parameter in
your case.
Is this parameters values derived from a query?
If not, then it's Reporting Services itself setting it to nvarchar!
If it is a query, maybe you could look at the query to force the type - I
don't really know.
But going back to my original suggestion, casting the parameter alone should
cure your problem, so it's just half as clunky! :)
Regards
Chris
"Scott Simms" wrote:
> Hi Chris,
> Yep. If we cast the parameter to varchar the query executes properly. I was
> hoping not to update all of my reports to fix this problem!
> If you can think of anyway to change the behaviour within Reporting Services
> I would appreciate it. If not, can you check if this is being addressed in a
> service pack or next version?
> Thanks,
> Scott.
>
> "Chris McGuigan" wrote:
> > Scott
> >
> > Have you tried CONVERT or CAST on both sides of the expression, i.e
> > WHERE CONVERT(Varchar(4000), Name) = CONVERT(VarChar(4000), @.NameParam)
> > I know it's clunky but it is a way of explicitly data typing the fields!
> >
> > Chris
> >
> > "Scott Simms" wrote:
> >
> > > We have noticed that SQL Reporting Services uses the 'nvarchar' data type for
> > > all report parameters of type 'string'. If the actual datatype of the column
> > > is 'varchar' this causes (serious) performance problems as SQL Server must
> > > convert the 'varchar' column to match the 'nvarchar' parameter.
> > >
> > > Is there any way to control the data type that is chosen for 'string'
> > > parameters? And why does SQL Reporting Services choose 'nvarchar' when the
> > > column is of type 'varchar'?
> > >
> > > For example, if I have a table defined as:
> > >
> > > CREATE TABLE [TestTable] (
> > > [TheKey] [int] NOT NULL ,
> > > [Name] [varchar] (50) NULL ,
> > > CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED
> > > (
> > > [TheKey]
> > > )
> > > )
> > >
> > > ... and I write a simple report to display this data with a query of :
> > >
> > > SELECT Name
> > > FROM TestTable
> > > WHERE (Name = @.NameParam)
> > >
> > > .. I notice that the query sent to SQL Server (from Profiler) is:
> > >
> > > exec sp_executesql N'SELECT Name
> > > FROM TestTable
> > > WHERE (Name = @.NameParam)', N'@.NameParam nvarchar(4000)', @.NameParam => > > N'Name0'
> > >
> > > ... notice that the parameter type is 'nvarchar(4000)' but the actual column
> > > data type is 'varchar'. If you create an execution plan for this query you
> > > can see that SQL Server must perform alot more work than if the parameter was
> > > defined as 'varchar(4000)'.
> > >
> > > Thanks,
> > >
> > > Scott.
> > >
> > >
> > >

Reporting Services - Rendering

I have created reports using Reporting Services and the problem I am having is with the Print Layout. I view a report with parameters and print. I then change the parameters and click 'View Report' again and the new report is displayed. However, the report does not refresh in the Print Layout, so if I try to print the 2nd report, the first report is the one that is printed. Any ideas how to solve this?

Thanks

Quite simple.

Close Print Layout when you change the parameters and open it after the new report is displayed. Print Layout is rendered upon demand, and just changing the parameters is not refreshing the Print Layout screen.

|||Bdot - aparerntly this is a confirmed bug but you can work around it in code by hooking up to the ViewButtonClick event and calling RefreshReport.

c/o http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=267834&SiteID=1

Reporting Services - Rendering

I have created reports using Reporting Services and the problem I am having is with the Print Layout. I view a report with parameters and print. I then change the parameters and click 'View Report' again and the new report is displayed. However, the report does not refresh in the Print Layout, so if I try to print the 2nd report, the first report is the one that is printed. Any ideas how to solve this?

Thanks

Quite simple.

Close Print Layout when you change the parameters and open it after the new report is displayed. Print Layout is rendered upon demand, and just changing the parameters is not refreshing the Print Layout screen.

|||Bdot - aparerntly this is a confirmed bug but you can work around it in code by hooking up to the ViewButtonClick event and calling RefreshReport.

c/o http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=267834&SiteID=1

Friday, March 9, 2012

Reporting service does not support In clause in select statment?

Hi,
I am trying to pass a parameters to the reporting services using "IN" clause in select statement.
If my parameter is 'C','D','F' and i wish to pass it to the IN clause, however it seem like it is taking the parameter as a whole string, and doesn't return me the result where the status IN ('C','D','F')
Anyone got solution for this??

Hi,
I managed to solve it. Found the solution from one of the site.
http://solidqualitylearning.com/Blogs/dejan/archive/2004/10/22/200.aspx
Hope it helps those that have this problem :o)

Wednesday, March 7, 2012

reporting server language

I want to change the reporting server language entirely - starting at the parameters bar.
how can i do that, where should i begin?

I don't think it is possible, unless I'm misunderstanding what you're asking. You could try to edit the .rdl file. However some of the XML tags are required tags which allow the report to render correctly, editing them could cause problems.

Saturday, February 25, 2012

Reporting Server - Passing Parameters programtically

We've developed several reports where you can type in / select variables and run them, affecting their outcomes.

We'd like to change this so if the user clicks on a link from our Intranet, this takes them straight to the report with the appropriate parameter(s) - rather like the "jump to report" function within a report - i.e. the url for that function...

Is this possible?

Steve

Yes, it is. You should check in the docs for topics mentioning "URL Access", but the basic deal is this:

I usually start this by drilling down to the appropriate URL for the report (sans parameters) using ReportServer rather than Reports (Report Manager) interface.

Once you have the appropriate base URL, you can add the appropriate instructions to the URL's query string.

You start with the ones that tell the server to render the report, in the appropriate format, for example:

&rs:Command=Render&rs:format=EXCEL

... and then you can add your params to this as more name-value pairs in normal querystring style, for example:

&myParam1=53&myKeyValue=SomeToken&myID=965

... okay?

By "start with" and "then", I don't mean that the order of the params and report instructions in the query string is significant, just that I generally think it through in this order, report-owned instructions and then parameters. If you are going to build the URL dynamically at runtime it helps to think about the two groups separately <s>.

>L<

|||

superb! i think the note to add to this is to use the "report server" site not the "reports" site i.e. http://servername/reportserver rather than http://servername/reports

thanks

|||

Yup, that's the way they do it in the docs, and that's the way I've been doing it... one site is the "real" server and the other is just the pretty interactive interface....

>L<

Reporting Server - Passing Parameters programtically

We've developed several reports where you can type in / select variables and run them, affecting their outcomes.

We'd like to change this so if the user clicks on a link from our Intranet, this takes them straight to the report with the appropriate parameter(s) - rather like the "jump to report" function within a report - i.e. the url for that function...

Is this possible?

Steve

Yes, it is. You should check in the docs for topics mentioning "URL Access", but the basic deal is this:

I usually start this by drilling down to the appropriate URL for the report (sans parameters) using ReportServer rather than Reports (Report Manager) interface.

Once you have the appropriate base URL, you can add the appropriate instructions to the URL's query string.

You start with the ones that tell the server to render the report, in the appropriate format, for example:

&rs:Command=Render&rs:format=EXCEL

... and then you can add your params to this as more name-value pairs in normal querystring style, for example:

&myParam1=53&myKeyValue=SomeToken&myID=965

... okay?

By "start with" and "then", I don't mean that the order of the params and report instructions in the query string is significant, just that I generally think it through in this order, report-owned instructions and then parameters. If you are going to build the URL dynamically at runtime it helps to think about the two groups separately <s>.

>L<

|||

superb! i think the note to add to this is to use the "report server" site not the "reports" site i.e. http://servername/reportserver rather than http://servername/reports

thanks

|||

Yup, that's the way they do it in the docs, and that's the way I've been doing it... one site is the "real" server and the other is just the pretty interactive interface....

>L<

|||Thank you for this information. It works perfectly! You saved me a bunch of time!

Reporting Server - Passing Parameters programtically

We've developed several reports where you can type in / select variables and run them, affecting their outcomes.

We'd like to change this so if the user clicks on a link from our Intranet, this takes them straight to the report with the appropriate parameter(s) - rather like the "jump to report" function within a report - i.e. the url for that function...

Is this possible?

Steve

Yes, it is. You should check in the docs for topics mentioning "URL Access", but the basic deal is this:

I usually start this by drilling down to the appropriate URL for the report (sans parameters) using ReportServer rather than Reports (Report Manager) interface.

Once you have the appropriate base URL, you can add the appropriate instructions to the URL's query string.

You start with the ones that tell the server to render the report, in the appropriate format, for example:

&rs:Command=Render&rs:format=EXCEL

... and then you can add your params to this as more name-value pairs in normal querystring style, for example:

&myParam1=53&myKeyValue=SomeToken&myID=965

... okay?

By "start with" and "then", I don't mean that the order of the params and report instructions in the query string is significant, just that I generally think it through in this order, report-owned instructions and then parameters. If you are going to build the URL dynamically at runtime it helps to think about the two groups separately <s>.

>L<

|||

superb! i think the note to add to this is to use the "report server" site not the "reports" site i.e. http://servername/reportserver rather than http://servername/reports

thanks

|||

Yup, that's the way they do it in the docs, and that's the way I've been doing it... one site is the "real" server and the other is just the pretty interactive interface....

>L<

Reporting Parameters with Jump to Report Action

I'm in Chart Properties > Data > Values > Edit.
Action tab > Jump to report > Parameters.

I want to jump to another report chart that is paramaterized. For "Parameter Value" I've already discovered you have to change the default "=Fields!xxx.Value" to "=Fields!xxx.UniqueName", but this only works if it is jumping to a single value parameter. I sometimes want to jump to multi-value parameter and don't know what expression should be. I want it to be something like "= included in Fields!xxx.BunchOfValues" but of course this option doesn't exist!

Any suggestions?

IN THIS CASE IN ORDER TO PASS MULTI VALUE PARAMETERS USE THE FOLLOWING SYNTAX

JOIN(PARAMETERS!YOURPARAM.VALUE,",")

Reporting parameters alignment

Hello All,
First time post question here :)
Is it possible to have 3 or more parameters in one row in RS2000 ? by
default only 2 are alowed to display in one row in reporting parameters
header, and it seems no setting in VS.net 2003 can handle it. or is it
possbile to directly write some xml code to achieve it?
Anyone can help me out ?
Thanks!
Regards,
--ChrisNo, It is handled by SSRS only. if you want to be shown as per your
requirement then you need to create your own forms using asp.net
Amarnath
"neogump" wrote:
> Hello All,
> First time post question here :)
> Is it possible to have 3 or more parameters in one row in RS2000 ? by
> default only 2 are alowed to display in one row in reporting parameters
> header, and it seems no setting in VS.net 2003 can handle it. or is it
> possbile to directly write some xml code to achieve it?
> Anyone can help me out ?
> Thanks!
> Regards,
> --Chris
>|||Amarnath,
Thanks for your information!|||So we cannot customize the report parameter area with our own controls added
to it or changing aligment ? and we cannot add a button on the report
parameter area.
Thanks,
Ravi Manda
"neogump" wrote:
> Amarnath,
> Thanks for your information!
>|||Correct.
"Ravi Manda" <RaviManda@.discussions.microsoft.com> wrote in message
news:32A91524-5F6A-4295-B3B7-E47155E451E1@.microsoft.com...
> So we cannot customize the report parameter area with our own controls
> added
> to it or changing aligment ? and we cannot add a button on the report
> parameter area.
> Thanks,
> Ravi Manda
>
> "neogump" wrote:
>> Amarnath,
>> Thanks for your information!
>>