Showing posts with label parameter. Show all posts
Showing posts with label parameter. Show all posts

Friday, March 30, 2012

Report/query parameter default values

I am using a SQL stored procedure for a report. The sproc has a variable in it (@.itemnumber) to be supplied by the user at run time. In the report parameters within Visual Studio Designer, I am trying to set a default value for the parameter of % so that all items will be returned unless the user enters a specific item number. In the Visual Studio preview this works but once the report is deployed to the web server, the default value does NOT show up. Please advise.

thanks!

Martha

Hi Martha,

SQL Server 2005 Books Online contains an example that takes you through

exactly what it sounds like you are trying to accomplish. Please

take a look at it at:

SQL Server 2005 Books Online->SQL Server 2005

Tutorials->Reporting Services Tutorials->Using a Dynamic Query in

a Report

It shows you how to build a dynamic query to return all records when no parameter is passed through.

If you have further problems after looking at that, please continue posting.|||

Only problem is that we are still on SQL RS 2000. Have not gone to 2005 as yet. Would the information you refer to work on 2000?

thanks!

|||Well let's try to tackle it a different way. Is your query

dynamic and includes a union with your default value that you want to

show all? For example:

SELECT 0 AS DepartmentID, 'All' AS Name

UNION

SELECT DepartmentID, Name

FROM HumanResources.Department

ORDER BY Name|||No, it's a non-queried default. I'm simply trying to set it to %. The variable is a string (varchar) in the sproc. In the Visual Studio preview it works, just not on the web once deployed.|||

hi,

iam also not able to use the dynamic query in repoting services,in sql server 2005.

i am trying from the following path

SQL Server 2005 Books Online->SQL Server 2005 Tutorials->Reporting Services Tutorials->Using a Dynamic Query in a Report-->Lesson 6: Updating the Employees Dataset with a Dynamic Query

as given in the boks online the following query

="SELECT c.firstname, c.lastname, e.title, d.departmentID " &

"From HumanResources.EmployeeDepartmentHistory D " &

"INNER JOIN HumanResources.Employee E " &

"ON D.EmployeeID = E.EmployeeID " &

"INNER JOIN Person.Contact C " &

"ON E.ContactID = C.ContactID " &

Iif(Parameters!Department.Value = 0, "", "WHERE D.DepartmentID = " & Parameters!Department.Value) &

"ORDER BY C.LastName" but am getting error from the if clause,so how to use the dynamic query for the above so.please do replysekhar|||

I am not worked on dynamic queries but i suggest you can use stored procedures with a parameter. Create a stored procedue and pass your parameter to stored procedure.

Report/query parameter default values

I am using a SQL stored procedure for a report. The sproc has a variable in it (@.itemnumber) to be supplied by the user at run time. In the report parameters within Visual Studio Designer, I am trying to set a default value for the parameter of % so that all items will be returned unless the user enters a specific item number. In the Visual Studio preview this works but once the report is deployed to the web server, the default value does NOT show up. Please advise.

thanks!

Martha

Hi Martha,
SQL Server 2005 Books Online contains an example that takes you through exactly what it sounds like you are trying to accomplish. Please take a look at it at:
SQL Server 2005 Books Online->SQL Server 2005 Tutorials->Reporting Services Tutorials->Using a Dynamic Query in a Report
It shows you how to build a dynamic query to return all records when no parameter is passed through.
If you have further problems after looking at that, please continue posting.
|||

Only problem is that we are still on SQL RS 2000. Have not gone to 2005 as yet. Would the information you refer to work on 2000?

thanks!

|||Well let's try to tackle it a different way. Is your query dynamic and includes a union with your default value that you want to show all? For example:
SELECT 0 AS DepartmentID, 'All' AS Name
UNION
SELECT DepartmentID, Name
FROM HumanResources.Department
ORDER BY Name
|||No, it's a non-queried default. I'm simply trying to set it to %. The variable is a string (varchar) in the sproc. In the Visual Studio preview it works, just not on the web once deployed.|||

hi,

iam also not able to use the dynamic query in repoting services,in sql server 2005.

i am trying from the following path

SQL Server 2005 Books Online->SQL Server 2005 Tutorials->Reporting Services Tutorials->Using a Dynamic Query in a Report-->Lesson 6: Updating the Employees Dataset with a Dynamic Query

as given in the boks online the following query

="SELECT c.firstname, c.lastname, e.title, d.departmentID " & "From HumanResources.EmployeeDepartmentHistory D " & "INNER JOIN HumanResources.Employee E " & "ON D.EmployeeID = E.EmployeeID " & "INNER JOIN Person.Contact C " & "ON E.ContactID = C.ContactID " & Iif(Parameters!Department.Value = 0, "", "WHERE D.DepartmentID = " & Parameters!Department.Value) & "ORDER BY C.LastName" but am getting error from the if clause,so how to use the dynamic query for the above so.please do replysekhar|||

I am not worked on dynamic queries but i suggest you can use stored procedures with a parameter. Create a stored procedue and pass your parameter to stored procedure.

Report/query parameter default values

I am using a SQL stored procedure for a report. The sproc has a variable in it (@.itemnumber) to be supplied by the user at run time. In the report parameters within Visual Studio Designer, I am trying to set a default value for the parameter of % so that all items will be returned unless the user enters a specific item number. In the Visual Studio preview this works but once the report is deployed to the web server, the default value does NOT show up. Please advise.

thanks!

Martha

Hi Martha,

SQL Server 2005 Books Online contains an example that takes you through

exactly what it sounds like you are trying to accomplish. Please

take a look at it at:

SQL Server 2005 Books Online->SQL Server 2005

Tutorials->Reporting Services Tutorials->Using a Dynamic Query in

a Report

It shows you how to build a dynamic query to return all records when no parameter is passed through.

If you have further problems after looking at that, please continue posting.|||

Only problem is that we are still on SQL RS 2000. Have not gone to 2005 as yet. Would the information you refer to work on 2000?

thanks!

|||Well let's try to tackle it a different way. Is your query

dynamic and includes a union with your default value that you want to

show all? For example:

SELECT 0 AS DepartmentID, 'All' AS Name

UNION

SELECT DepartmentID, Name

FROM HumanResources.Department

ORDER BY Name|||No, it's a non-queried default. I'm simply trying to set it to %. The variable is a string (varchar) in the sproc. In the Visual Studio preview it works, just not on the web once deployed.|||

hi,

iam also not able to use the dynamic query in repoting services,in sql server 2005.

i am trying from the following path

SQL Server 2005 Books Online->SQL Server 2005 Tutorials->Reporting Services Tutorials->Using a Dynamic Query in a Report-->Lesson 6: Updating the Employees Dataset with a Dynamic Query

as given in the boks online the following query

="SELECT c.firstname, c.lastname, e.title, d.departmentID " &

"From HumanResources.EmployeeDepartmentHistory D " &

"INNER JOIN HumanResources.Employee E " &

"ON D.EmployeeID = E.EmployeeID " &

"INNER JOIN Person.Contact C " &

"ON E.ContactID = C.ContactID " &

Iif(Parameters!Department.Value = 0, "", "WHERE D.DepartmentID = " & Parameters!Department.Value) &

"ORDER BY C.LastName" but am getting error from the if clause,so how to use the dynamic query for the above so.please do replysekhar|||

I am not worked on dynamic queries but i suggest you can use stored procedures with a parameter. Create a stored procedue and pass your parameter to stored procedure.

Report's Parameter : From Date to Date

I want to add 2 parameters in my report to delimit a date range. The report is based on Analysis Services 2005 and I have created a Time Dimension. What is the best way to do this ?

I would prefer to use a Datetime parameter type because of the calendar component, but then I don't succeed to associate this parameter with the Time Dimension in the filter expression...

I really need an answer to that question, please help me |||You can't really use a datetime parameter (at least not using the built-in prompting) as AS dates are members of a dimension, not scalars. And you aren't really guaranteed that the range between two members will give you what you want. We could add a feature at some point to convert them but that doesn't exist now.|||

Thanks for the answer.

I just found a solution to my problem, even if the solution is not what I hoped for, it may help someone :

I created two Report Parameters "From Date" and "To Date" which use the calendar component to let the user choose a date. And in my Dataset, in the '...' button, in the 'Parameters' bar, I add a parameter whose value is :

="[Temps].[Temps - Date Key].[" & Year(Parameters!FromTempsTempsCalendrier.Value) & "-" & IIF(Month(Parameters!FromTempsTempsCalendrier.Value)<10,"0","") & Month(Parameters!FromTempsTempsCalendrier.Value) & "-" & IIF(Day(Parameters!FromTempsTempsCalendrier.Value)<10, "0","") & Day(Parameters!FromTempsTempsCalendrier.Value) & " 00:00:00]"

That way, I build the UNIQUENAME properties of my Time Dimension.

But an error occurs when the user select a date which does not exist in the Time Dimension.

|||

Thanks for the possible solution. However, I've been working on following your steps, but I am not getting it to work.

Could you explain in a little more detail how to accomplish this?

Report won't rerun after parameter change

One of our Sales Reps is having issues with a report I've made and as far as I know he's the only one (Out of about 50) who has had this issue. He's running IE 7. What happens is he'll enter in the parameters and run the report and it works fine. But when he goes to change the dates he entered as parameters and then clicks "View Report" again to run the report again, the browser just redisplays the same results and doesn't even generate a new report. It appears as if the browser has cached his previously ran report and then just redisplays it instead of going back to the server and re-generating the report. Has anyone seen this before or have any ideas? I appreciate it.

JD

I ran into the same issue when the report was cached (by SSRS). It did not find any work around other than to not cache the report which unfortunately you have no control over and I would say is less than an optimal solution.

Report won;t run with new paramters

I have a report that works just fine and has for some time. I had to make a
change and added a new parameter to the stored procedure. I updated the
report and republished it. It sees the parameter but doesn't seem to be
using it. I even ran SQL Profiler and it definitely is not calling the
stored procedure with the new parameter. I checked the RDL and it does know
about the parameter. I am just confused.
Stacey LevineTry deleting the report from the report server and redeploying it.
Andy Potter|||That did not work.. but..here is what I had to do to fix it. I had to go to
the data tab in visual studio and run the data set (stored procedure) and
enter the new parameters. Then I rebuilt and redeployed and it started
working. Not sure why.. but this did it.
Thanks.
Stacey
"Potter" <drewpotter@.gmail.com> wrote in message
news:1136925208.341658.254200@.g44g2000cwa.googlegroups.com...
> Try deleting the report from the report server and redeploying it.
> Andy Potter
>|||If you add a parameter to a database object, you must either refresh or
execute the dataset in order for the MSRS to know about the new
parameter. This forces RS to execute its GetParameters() method for
the command. This parameter will then be listed on the Parameters tab
of the dataset (and similarly, in the RDL). The GetParameters() is not
called when you Preview the report.
The alternative is to manually enter the new parameter on the Parameter
tab of the dataset.
Andy Potter

Report with parameter and Windows Application

Hi,
I've created a report with parameter, namely user should enter three
parameter and then run the user.
From a window application I would like to launch (call) an existing report,
already depoloyed in the SQL Reporting Server, and pass the three parameter
according to the user's input. Can anybody help me'
ThanksToday you have two choices, URL integration or web services. With URL
integration you embed the IE browser control, assemble the appropriate URL.
With web services your app uses SOAP to get the rendered report (which still
needs to be shown, either html (browser control again) or pdf). Next version
will have a winform control that will make this much easier (late summer
hopefully).
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Siu" <Siu@.discussions.microsoft.com> wrote in message
news:BF7CD367-3353-4AA9-9C56-A5A6E2411638@.microsoft.com...
> Hi,
> I've created a report with parameter, namely user should enter three
> parameter and then run the user.
> From a window application I would like to launch (call) an existing
report,
> already depoloyed in the SQL Reporting Server, and pass the three
parameter
> according to the user's input. Can anybody help me'
> Thanks|||I'm interested in URL integration: how should I write the url in order to
pass the parameter?
Thanks :)
"Bruce L-C [MVP]" wrote:
> Today you have two choices, URL integration or web services. With URL
> integration you embed the IE browser control, assemble the appropriate URL.
> With web services your app uses SOAP to get the rendered report (which still
> needs to be shown, either html (browser control again) or pdf). Next version
> will have a winform control that will make this much easier (late summer
> hopefully).
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "Siu" <Siu@.discussions.microsoft.com> wrote in message
> news:BF7CD367-3353-4AA9-9C56-A5A6E2411638@.microsoft.com...
> > Hi,
> > I've created a report with parameter, namely user should enter three
> > parameter and then run the user.
> >
> > From a window application I would like to launch (call) an existing
> report,
> > already depoloyed in the SQL Reporting Server, and pass the three
> parameter
> > according to the user's input. Can anybody help me'
> >
> > Thanks
>
>

Monday, March 26, 2012

Report Viewer Reverse Proxy

I was wondering if anybody knew anything about the ReportUrl QueryString
parameter and if it requires a certain format.
I'm currently attempting to write a reverse-proxy HttpHandler for accessing
reports in SSRS 2005. I'm doing it this way for three reasons: 1) We have to
use VS2003, 2) Users don't have direct access to the database server (and
thus SSRS via URL access), and 3) I like the report viewer and want to avoid
cloning it with my own. I am very close to succeeding and promise, if
successful, to post the resulting code here.
I've currently got the main page loading, the wait page loading, and all
images loading, but I'm getting a (500) Internal Server Error when the actual
report attempts to load in the iframe. The event log shows the following
info:
Exception information:
Exception type: HttpHandlerInputException
Exception message: ReportUrl
I've made my own HttpHandler and also named it
Reserved.ReportViewerWebControl (via web.config), so the only difference
between my URL and a normal URL is the addition of a virtual directory name.
It looks like this:
http://ServerName/VirtualDirectoryName/ReportServer/Reserved.ReportViewerWebControl.axd?OpType=DocMapReport&ClientController=ClientControllerReportViewerControl&ReportUrl=%2fVirtualDirectoryName%2fReportServer%2fReserved.ReportViewerWebControl.axd%3fExecutionID%3dmjuze0ni4lyf4v55cebmh2mr%26ControlID%3d03b34cbd-599e-4c7d-a19d-854cd1c7eec6%26Culture%3d1033%26UICulture%3d9%26ReportStack%3d1%26OpType%3dReportArea%26Controller%3dClientControllerReportViewerControl%26PageNumber%3d1%26ZoomMode%3dPercent%26ZoomPct%3d100%26ReloadDocMap%3dtrue%26EnableFindNext%3dFalse%26LinkTarget%3d_top
Whew. If I take out the virtual directory name it works fine, but that's
because it now references the actual reporting services installed locally on
my box (it gets an rsExecutionNotFound error). Does anybody know if there's
a known issue with sticking a virtual directory in the ReportUrl? Thanks in
advance for the info, and please chime in if you have any suggestions.
- DaveHello Dave,
From your description, you are developing a custom httphandler that will
help get SSRS report from SSRS reportserver and display to other client
user through ASP.NET web application, however, you are encountering some
problem with the reportURL used in the handler, correct?
As for your own custom handler, what is the code logic of it, do you simply
copy the Microsoft.Reporting.WebForms.HttpHandler(built-in) class's code
logic? Based on my research, the following URL
========/ASPNET/V2/WebSites/PostPageSite/Reserved.ReportViewerWebControl.axd?OpType=DocMapReport&ClientController=ClientControllerReportViewer1&ReportUrl=/ASPNE
T/V2/WebSites/PostPageSite/Reserved.ReportViewerWebControl.axd%3fReportSessi
on%3dr1hwjmr1e5e5moygaqmwpu45%26ControlID%3d0f59883b-da9b-4044-add7-99bcd496
eeb4%26Culture%3d2052%26UICulture%3d1033%26ReportStack%3d1%26OpType%3dReport
Area%26Controller%3dClientControllerReportViewer1%26PageNumber%3d1%26ZoomMod
e%3dPercent%26ZoomPct%3d100%26ReloadDocMap%3dtrue%26EnableFindNext%3dFalse%2
6LinkTarget%3d_to
=============
is dedicated for the Microsoft.Reporting.WebForms.HttpHandler handler and
is not documented. IMO, if you want to write a custom handler than will
retrieve report from backend SSRS server and stream it to front end client,
you can consider use the SSRS 2005's webservice to request and render
report. Actually, the ReportViewer control internally also use the SSRS
2005 webservice to access the report.
If you do want to inspect the ReportUrl used by ReportViewer control and
the axd handler, you may use reflector to investigate the reportviewer and
the handler's code. I've performed some view and find that it is the ""
class which do the DocmapReport render task. It has the following code
logic to parse the querystring:
#In the "Microsoft.Reporting.WebForms.DocMapReportPageOperation" class
==============public override void PerformOperation(NameValueCollection urlQuery,
HttpResponse response)
{
DocMapReportPage page1 = new DocMapReportPage();
page1.ReportAreaUrl = HandlerOperation.GetAndEnsureParam(urlQuery,
"ReportUrl");
if
(!page1.ReportAreaUrl.StartsWith(HttpHandler.HandlerUri.Uri.PathAndQuery,
StringComparison.OrdinalIgnoreCase))
{
throw new ArgumentOutOfRangeException("ReportUrl");
}
page1.ClientController = HandlerOperation.GetAndEnsureParam(urlQuery,
"ClientController");
HandlerOperation.EnsureValidJavascriptIdentifier(page1.ClientController);
HttpContext.Current.Server.Transfer(page1, true);
}
==============
Hope this helps some.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.|||Thank you, thank you, thank you! Your post gave me the exact clue I needed -
namely that the ReportUrl parameter is validated in some way and URL paths
are compared. I made some adjustments in my code to kind of "trick" SQL
Server into thinking it was using a ReportUrl whose path matched the server's
URL and it worked great!
For your info, I'm using HttpWebRequest and HttpWebResponse objects to
create a kind of reverse proxy server. I was thinking of abandoning this
path and going with the web service, but I originally tried to access things
this way because I liked the Report Viewer and didn't want to write code to
"clone" its toolbar. From what I've read in the docs, if you use web service
access to get your report you have to write your own viewer GUI. I
originally thought I could save some time by writing a quick and dirty
reverse proxy, but quickly found I was in for some whole new troubles.
Anyway, my code is now properly retrieving the report and displaying it.
The export seems to missing a response header (quick fix), and the print
button returns an error, but as soon as I figure those out I'll post the code
here. Thanks again for your help. I'm also going to investigate the use of
the reflector to view code, thanks for the tip.
- Dave|||That's great Dave,
I'm glad that the information is of assistance.
Have a nice day!
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.|||In case you're interested, I posted the code that ended up working for me as
a new message named "Using SSRS Viewer in VS2003 with Reverse Proxy". Thanks
again for your help.
"Steven Cheng[MSFT]" wrote:
> That's great Dave,
> I'm glad that the information is of assistance.
> Have a nice day!
>
> Sincerely,
> Steven Cheng
> Microsoft MSDN Online Support Lead
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>sql

Report Viewer Parameter Dropdown width

Does anyone know how to control the width of the parameter dropdownlist? If you select "Multi-value" for the parameter (non-sp1 version) the parameter list is in a dropdownlist that is manageable in size. If you do not use the multi-value parameter, it looks like the width of the dropdownlist is determined by the width of the longest text of the returned parameters.

Is there any way to control the width of the dropdown?

Thanks

Rob

pretty sure there is no way to do this|||

I spent some time "fighting" with this problem. The only way this might be achieved is to play with the customizable style sheets for the Report Manager.

I solved my problem by making the text in the multi-value dropdown smaller.

|||

Hi

Where can I find this style sheet?
I've had this problem since I started using
SSRS 4 months ago.

Thanks

G

|||

here you can find all the info you need: http://msdn2.microsoft.com/en-us/library/ms345247.aspx.

Also, maybe you'll find this post useful: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1084925&SiteID=1

|||

Thanks alot!

I only now saw your other post...
Marked as hepfull

G

sql

Report Viewer Parameter Dropdown width

Does anyone know how to control the width of the parameter dropdownlist? If you select "Multi-value" for the parameter (non-sp1 version) the parameter list is in a dropdownlist that is manageable in size. If you do not use the multi-value parameter, it looks like the width of the dropdownlist is determined by the width of the longest text of the returned parameters.

Is there any way to control the width of the dropdown?

Thanks

Rob

pretty sure there is no way to do this|||

I spent some time "fighting" with this problem. The only way this might be achieved is to play with the customizable style sheets for the Report Manager.

I solved my problem by making the text in the multi-value dropdown smaller.

|||

Hi

Where can I find this style sheet?
I've had this problem since I started using
SSRS 4 months ago.

Thanks

G

|||

here you can find all the info you need: http://msdn2.microsoft.com/en-us/library/ms345247.aspx.

Also, maybe you'll find this post useful: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1084925&SiteID=1

|||

Thanks alot!

I only now saw your other post...
Marked as hepfull

G

Friday, March 23, 2012

Report Viewer - tell it not to run until parameters are entered

I have this reportviewer control in an asp.net page -
I've added a parameter of startdate
How do I change the properties of the ReportViewer control so that it waits
for the date input, and doesn't try to run when the page is loaded?
I keep getting this error when running the page:
a.. The property 'DefaultValue' of report parameter 'StartDate' doesn't
have the expected type.On Jan 18, 12:05 pm, "Elmo Watson" <s...@.here.com> wrote:
> I have this reportviewer control in an asp.net page -
> I've added a parameter of startdate
> How do I change the properties of the ReportViewer control so that it waits
> for the date input, and doesn't try to run when the page is loaded?
> I keep getting this error when running the page:
> a.. The property 'DefaultValue' of report parameter 'StartDate' doesn't
> have the expected type.
The easiest way to control the automatic running of the report is to
modify the SSRS report itself to not have a default value (set Default
Values to Null) for the startdate parameter. This should follow
through to the report viewer control. Hope this helps.
Regards,
Enrique Martinez
Sr. Software Consultantsql

Wednesday, March 21, 2012

Report Title in Report manager Subscription

Hi,

Is there a way of passing a default parameter value into the subject title on a report subscription?

Currently there are std global variables i.e. @.ReportName was executed at @.ExecutionTime, but what other variables can be passed here to make it more relevant to the recipient?

Thx

so....could do with some help on this, but no replies as yet...

What I have found out is that only some of the global variables can be used such as the ones above, but not all of them.

What other options are there?

Has anyone tried modifying this or is it restricted to @.ReportName and @.ExecutionTime?

any help appreciated.

Thx

Monday, March 12, 2012

report service's cache problem

hi,
i query the result in Web
my report service has only one parameter
(1) i set some condition as : http://127.0.0.1/reportServer?/query1&NO>=1)
, and query it, It's Ok!
(2) Add some new record in SQL server
(3) and set the query as step(1) :
http://127.0.0.1/reportServer?/query1&NO>=1)) . My god! the
newest added record could't be shown in setp (2)
To find what's the reason of this:
(1) i open the SQL Server's event-detector, and find in step 2 , Server's
event-detector cann't dectect the step(2)'s action.
(2) another test , i set the query as
http://127.0.0.1/reportServer?/query1&NO>=2 , then the result's ok!
(3) finally, i reset the query as
http://127.0.0.1/reportServer?/query1&NO>=1 , then the result's ok, too!
How puzzled it is!
I guess this may be cached by IIS or reportServer.BUT I Cann't find in which
configution , i can shield the cache.
My opion is that in every query , the SQL Sever can dectect the action , and
reQeury the newest result.
Any sugguestion ? thanks a lot!
RainbowIn Report Manager, view the report using an admin account.
Select the Properties tab.
Then select the Execution page.
Is the radio button for Do not cache temporary copies of this report
selected?
Andrew Watt
MVP - InfoPath
On Sun, 9 Oct 2005 00:31:09 +0800, "Rainbow" <RainbowHu@.msn.com>
wrote:
>hi,
>i query the result in Web
>my report service has only one parameter
>(1) i set some condition as : http://127.0.0.1/reportServer?/query1&NO>=1)
>, and query it, It's Ok!
>(2) Add some new record in SQL server
>(3) and set the query as step(1) :
>http://127.0.0.1/reportServer?/query1&NO>=1)) . My god! the
>newest added record could't be shown in setp (2)
>
> To find what's the reason of this:
>(1) i open the SQL Server's event-detector, and find in step 2 , Server's
>event-detector cann't dectect the step(2)'s action.
>(2) another test , i set the query as
>http://127.0.0.1/reportServer?/query1&NO>=2 , then the result's ok!
>(3) finally, i reset the query as
>http://127.0.0.1/reportServer?/query1&NO>=1 , then the result's ok, too!
>How puzzled it is!
>I guess this may be cached by IIS or reportServer.BUT I Cann't find in which
>configution , i can shield the cache.
>My opion is that in every query , the SQL Sever can dectect the action , and
>reQeury the newest result.
>Any sugguestion ? thanks a lot!
>Rainbow
>
>|||-- Original Message --
From: "Andrew Watt [MVP - InfoPath]" <SVGDeveloper@.aol.com>
Newsgroups: microsoft.public.sqlserver.reportingsvcs
Sent: Sunday, October 09, 2005 9:43 PM
Subject: Re: report service's cache problem
> In Report Manager, view the report using an admin account.
> Select the Properties tab.
> Then select the Execution page.
> Is the radio button for Do not cache temporary copies of this report
> selected?
>
thanks, Andrew
Yes, the default value in Execution page is "Do not cache temporary copies
of this report"?In My Report Manager , this is Selected.|||I have the same caching issue. It seems the Reporting Services still cache
the data even the "Do not cache temporary copies of this report" is checked.
Is this a feature or a bug?
Thank you.
"Andrew Watt [MVP - InfoPath]" wrote:
> In Report Manager, view the report using an admin account.
> Select the Properties tab.
> Then select the Execution page.
> Is the radio button for Do not cache temporary copies of this report
> selected?
> Andrew Watt
> MVP - InfoPath
> On Sun, 9 Oct 2005 00:31:09 +0800, "Rainbow" <RainbowHu@.msn.com>
> wrote:
> >hi,
> >
> >i query the result in Web
> >
> >my report service has only one parameter
> >
> >(1) i set some condition as : http://127.0.0.1/reportServer?/query1&NO>=1)
> >, and query it, It's Ok!
> >(2) Add some new record in SQL server
> >(3) and set the query as step(1) :
> >http://127.0.0.1/reportServer?/query1&NO>=1)) . My god! the
> >newest added record could't be shown in setp (2)
> >
> >
> > To find what's the reason of this:
> >(1) i open the SQL Server's event-detector, and find in step 2 , Server's
> >event-detector cann't dectect the step(2)'s action.
> >(2) another test , i set the query as
> >http://127.0.0.1/reportServer?/query1&NO>=2 , then the result's ok!
> >(3) finally, i reset the query as
> >http://127.0.0.1/reportServer?/query1&NO>=1 , then the result's ok, too!
> >
> >How puzzled it is!
> >I guess this may be cached by IIS or reportServer.BUT I Cann't find in which
> >configution , i can shield the cache.
> >My opion is that in every query , the SQL Sever can dectect the action , and
> >reQeury the newest result.
> >
> >Any sugguestion ? thanks a lot!
> >
> >Rainbow
> >
> >
> >
> >
>

Friday, March 9, 2012

Report Service 2005 parameter at Date

I set Report Parameters ,

Properties

Name : StartDate

Data Type : DateTime

Prompt : StartDate

Default values = Format(Today(),"yyyy/MM/dd")

But have error (An error occurred during local report rpocessing. The properly "DefaultValue" of report parameter 'EndDate' doesn't have the expected type.)

The Result show : like "2007/05/01"

Thanks help

Moving to SQL Server Reporting Services forum. This is not an SSIS issue.|||

Hi,

I think the Format function converts your value into String datatype & that is why you're getting the error.

Just use CDate of your expression, that is:

CDate(Format(Today(),"yyyy/MM/dd")

That should get rid of the error.

-Aayush.

|||

=CDate(Format(Today(),"yyyy/MM/dd")

had error

[rsCompilerErrorInExpression] The Value expression for the report parameter ‘endDate’ contains an error: [BC30198] ')' expected.

Thanks help

|||

Oops.. I missed out a bracket Smile Sorry for that.

Try =CDate(Format(Today(),"yyyy/MM/dd"))

-Aayush

|||Thanks You very much|||

Thanks all

The command is right, but I look in client pc, i see the date is "06/11/2007"

The =Cdate(format(today(),"yyyy/MM/dd")) could not work.

|||You're right I overlooked the fact that CDate converts it back to the default date format. So this fix does not work. Actually the expression =Format(Today(),"yyyy/MM/dd") would work but it would require you to change the Data Type of the parameter from 'DateTime' to 'String'. So I don't think it is very feasible.|||

Thanks

But not work

Monday, February 20, 2012

Report send to many people

Hello i have a question,

I need to create a report that will take parameter Customer_ID and will be send to his email which is stored in my database. And i want it to happen to all of my customers so basically i need to pass this parameter automatically.

My queston is, where in a report designer or whereever it is set it that it sends this report via email and this email is taken from a field in a report?

And how exactly pass this parameter, will i have to do it programaticly by calling this report so many times or somehow the report services can manage that?

thank u for help

Marek

SSRS supports data-driven subscriptions where the Report Server will automatically send the report to the subscribed recipients. Another option is to create an application that does this programatically by calling down to the SSRS APIs.

Report running really really slowly!!

Hi, I have a report with 18 cascading report parameters. Each report parameter has a unique dataset which passes the value of the previous parameter into the sql string. As I am selecting the report parameters it is taking longer to query the further down I go. I think this is because of the number of where conditions that are being passed through the sql query. The last report parameter is passing 17 where conditions.

In access when I have done this the parameters near the bottom were being refreshed quicker than the top ones - why is it the opposite way round in reporting services? Any ideas of how to speed this process up?

probobaly becuase in access the data is cached locally.

|||How do you have your parameters structured? Are you building the sql string dynamically? If you give a few more details/examples, I might be able to point you in a direction with less overhead...|||

I wont list all my report parameters, but to show you what I am doing I will list the first few. I have parameters:

Publication, Division, Product Manager.

Parameter Publication is just bringing back a list of publications, divison is bringing back a list of divisions where publication is in paramter publication, i.e

="SELECT
division_code
FROM base_table
WHERE publication_code in ('
" & Parameters!par_pub.Value & "
') " &
"
GROUP BY 1
ORDER BY 1"

Product Manager is bringing back a list of product managers, where publication is in parameter publication and where division is in parameter division, ie

="SELECT
product_range_manager_code,
trim(product_range_manager_desc)as product_range_manager_desc
FROM base_table WHERE division_code IN ('
" & join(Parameters!par_div.Value," ','
") & "
') " &
"

AND publication_code in ('

" & Parameters!par_pub.Value & "

') " &

"
GROUP BY 1,2
ORDER BY 1,2"

Like I said this goes on, so the 4th parameter will contain 3 WHERE conditions until the 18th parameter contains 17 where conditions. My main dataset which populates my report table looks at each of the parameters and filters based on these values. Oh also as you probably have guessed all the processing is done on the server. Hope you can help.

|||First of all, I think that you will see some speedup if you make stored procedures. Depending on the database structure, and where the bottle-neck is that speedup could be considerable or not. It seemed that you were pulling all of your data from one base table? If that is the case, you could write one stored procedure that would populate each dropdown, with a where clause of the form:

Code Snippet

WHERE foo IN (@.param1) AND (@.param2 IS NULL OR bar IN (@.param2)) AND ...

You should also verify whether there are any dependencies in your parameters that you can exploit to reduce calls to the database. In other words check if selecting a particular parameter is the same as selecting another one downstream (1 to 1), in which case that second filter (and clause) does not need to be applied at all. Similarly, verify that you need the previous filters applied once you know the downstream selections. For example, if all publications are produced by only one division, then in the second query you supplied you do not need to filter for the divison code at all.

Since you are not aggregating any columns, the group by clause is unnecessary. The SQL compiler should have caught that, so eliminating it probably won't save you anything, but it never hurts to remove unnecessary bits.

Finally, if these steps still result in a report that takes too long to refresh, you have a couple of options. You can create a drill-through report, wherein you actually navigate to a child report with fewer parameters, and you can look at improving your database structure to optimize this sort of activity, e.g. via normalization and adding indexes.

I hope this helps.

Report Renders w/out parameters being selected

I have a report with a parameter list. The parameter has no default value.
When I open the report it renders without waiting for the parameter to be
selected and the parameter list is empty.
I ran SQL Profiler and the sproc that is used to populate the parameter list
is being run and I verified in Query Analyzer that the sproc is returning 4
values.
This same report runs ok on other environments (I have double checked an
uploaded the same RDL to multiple servers).
Any ideas? Is there a server setting that would control this?Try to delete report from server and re-deploy from report designer.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Joe" <noemail@.noemail.com> wrote in message
news:esAZuAcnFHA.1996@.TK2MSFTNGP10.phx.gbl...
>I have a report with a parameter list. The parameter has no default value.
> When I open the report it renders without waiting for the parameter to be
> selected and the parameter list is empty.
> I ran SQL Profiler and the sproc that is used to populate the parameter
> list is being run and I verified in Query Analyzer that the sproc is
> returning 4 values.
> This same report runs ok on other environments (I have double checked an
> uploaded the same RDL to multiple servers).
> Any ideas? Is there a server setting that would control this?
>

Report Refresh Problem

Hi,
I had a report wherein it was taking a single parameter value and outputting
the data. In addition I pass other parameters to this report. Now the
functionality is that it can take multiple values in addition to the existing
params. The multiple value list is not passed into the report but the way I
have implemented this is:
1. Load all the values into a listbox and then load it into a table.
2. The stored procedure looks for the entries in the table and builds the
sql statement and outputs the data.
What's happening is this for the first time when the report runs it is fine
and I get the data that I want. When I add another value into the report or
remove the data, the report doesn't get refreshed unless I chnage one of the
parameters(dropdown or date).
Any clue why this is happeing.. I really appreciate your inputs.
Thanks
Suresh
Whn i first select the report to runThe dataset for those parameters is already created for the first set of
parameters. Changing the parameters is how you change the data.
--
| Thread-Topic: Report Refresh Problem
| thread-index: AcWCTExfmZtzyhPaRcKY0HoFtDt+Rw==| X-WBNR-Posting-Host: 161.88.255.139
| From: =?Utf-8?B?U3VyZXNo?= <Suresh@.discussions.microsoft.com>
| Subject: Report Refresh Problem
| Date: Wed, 6 Jul 2005 10:01:06 -0700
| Lines: 23
| Message-ID: <65901F85-6FE9-497F-A0D5-0D9DD1C7BAC9@.microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.reportingsvcs
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.reportingsvcs:47502
| X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
|
| Hi,
|
| I had a report wherein it was taking a single parameter value and
outputting
| the data. In addition I pass other parameters to this report. Now the
| functionality is that it can take multiple values in addition to the
existing
| params. The multiple value list is not passed into the report but the way
I
| have implemented this is:
|
| 1. Load all the values into a listbox and then load it into a table.
| 2. The stored procedure looks for the entries in the table and builds the
| sql statement and outputs the data.
|
| What's happening is this for the first time when the report runs it is
fine
| and I get the data that I want. When I add another value into the report
or
| remove the data, the report doesn't get refreshed unless I chnage one of
the
| parameters(dropdown or date).
|
| Any clue why this is happeing.. I really appreciate your inputs.
|
| Thanks
| Suresh
|
| Whn i first select the report to run
|