Friday, March 9, 2012
Reporting Service MDX problem
I am using Analysis Services cubes as backend to my Reporting Service
reports currently. I have a situation where I select
measures in axis 0
and
a heirarchy members & a level(in another heirarchy) in axis 1.
Now the result set will look like...
heiarchymember1 heirarchymember2 heirarchymember3 level measure
-- -- --
-- --
but my report requires the values of level column above to be column names
and the measure value to be values for those columns. In simple words I want
to transpose a column to rows and measure values should appear as data under
those transposed columns.
I cannot make use of matrix dataregion to do this as I have other
restriction. I can use only table dataregion. Is there a way (say some
function) available in mdx to do this kind of transpose with cube data in
reporting services.
Adventure works query which is good to explain my situation is
SELECT [Measures].[Total Product Cost] ON COLUMNS,
{([Product].[Product Categories].MEMBERS,
[Geography].[Geography].[Country].MEMBERS)} ON ROWS
FROM [Adventure Works]
Pl run the above query from reporting service report builder because if you
run in management studio u will see in different format.
Now when you run the above query in RS you can see Category, SubCategory,
ProductName, Country,Total Product Cost columns. What I want is
Category, SubCategory, ProductName,country1,country2,... as columns and the
relevant Total Product Cost measure values under the country names as data.
If it is sql I can use Case statement to do this kind of transposing. But
here in reporting service MDX we can only use measures no other dimension in
axis 0, which actually leads to this kind of transposing requirements.
Pl let me know what is the best way to accomplish this.
ThanksHi Wei Lu,
Since our reporting requirements are such that we cannot use matrix and we
have to use table with different groups all placing one below the other, I
tried a different solution. I found somewhere that If I make use of OLEDB
provider instead of MS Analysis Services Provider so that I dont have
restriction to put only Measures on columns axis. Now my question is what is
flexibility that I loose if I use oledb provider for analysis services 9.0
than Microsoft Analysis services provider?
Thanks
"Wei Lu [MSFT]" wrote:
> Hi ringt,
> Thank you for your posting!
> From your description, my understanding of this issue is: You want to use
> the MDX in the report and you want to show the heirarchymember in the
> column. If I misunderstood your concern, please feel free to let me know.
> I suggest you use the Matrix control in your report to show the data.
> The attachment is the Report I designed using the Matrix. Please check and
> let me know whether this meet your requirement.
> The datasource is the Adventure Works and the MDX query is the one you
> posted.
> I put the Country in the column group and Total Product Costs in the
> Detail, others in the Row group.
> Please let me know the result so that I can provide further assistance.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no rights|||Hi ringt,
Thank you for the update.
Based on my research, this issue is by design. Although the MDX you want to
use Multi Dimensions in the columns axis could run in the Analysis
Services, the data is extracted as a flattened row-set and can be used by
the report builder only as a row-set. So the Report Builder will not care
about certain things related to OLAP.
I suggest you use the OLEDB for AS 9.0 driver so that you could add Multi
Dimensions in the columns axis.
Hope this will be helpful!
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hello Ringt,
How are you doing on this issue, does Wei's last reply help clarify the
problem further or have you got further progress on this? If there is still
anything we can help, please feel free to post here.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
Reporting service does not support In clause in select statment?
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)
Reporting Service Cache
Hello Techies
i have SSRS 2005 report the source data from oracle views i simply select * from the view and display data for a particular entity say empID using filter in the reports which is passed as parameter
the question is whether SSRS will cahe the data and for subsquent request it will take from Cache instead of going back to database even if i change the parameter say empID 1,2,3,
please help me on this
thanks in advance
SSRS always performs user session caching for each parameter combination. If a subsequent request is sent before the session expires and includes the session identifier, the report will be displayed from the cached instance. The end user can click the Refresh Report toolbar button (not the browser Refresh button) to generate the report anew.
|||i call the depolyed rdl and then renders in to excel in my Windows Application
and i pass param to RDL not to datasource i use the param for filters in RDL list
i enable cache for that rdl say 60 min
when render the rdl in loop by changin the param it gives same output excel data for different param
please help
|||I enable cache for that rdl say 60 min
What does this mean? You enabled shapshot caching? You don't have to do anything to specifically enable user session caching. However, I haven't tried filtering only though. If it still doesn't work for you I will take a look.
|||I enable cache for that rdl say 60 min means execution cache for that report
i haven't enabled session cache coz i not displaying my rdl in browser
i use Reporting Service webservice methods to accesses and render report
code
Private Sub RptRender2(ByVal paramName As String, ByVal paraVal As String)
Dim rs As New ReportExecutionService()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
rs.Url = "http://localhost/reportserver/ReportExecution2005.asmx"
' Render arguments
Dim result As Byte() = Nothing
Dim reportPath As String = "/PanelPayments/EvalRpt2"
Dim format As String = "EXCEL"
Dim historyID As String = Nothing
Dim devInfo As String = "<DeviceInfo><Toolbar>False</Toolbar></DeviceInfo>"
' Prepare report parameter.
Dim parameters(0) As WindowsApplication2.ReportExecution2005.ParameterValue
Dim credentials As WindowsApplication2.ReportExecution2005.DataSourceCredentials() = Nothing
Dim showHideToggle As String = Nothing
Dim encoding As String = ""
Dim mimeType As String = ""
Dim warnings As WindowsApplication2.ReportExecution2005.Warning() = Nothing
Dim reportHistoryParameters As WindowsApplication2.ReportExecution2005.ParameterValue() = Nothing
Dim streamIDs As String() = Nothing
Dim execInfo As New ExecutionInfo
Dim execHeader As New ExecutionHeader()
Dim SessionId As String
Dim extension As String = ""
Dim arrList As New ArrayList
arrList.Add("1")
arrList.Add("2")
arrList.Add("3")
arrList.Add("4")
rs.ExecutionHeaderValue = execHeader
execInfo = rs.LoadReport(reportPath, historyID)
Dim i As Integer
Try
For i = 0 To arrList.Count - 1
'set parameter
paraVal = arrList(i).ToString()
parameters(0) = New WindowsApplication2.ReportExecution2005.ParameterValue()
parameters(0).Name = paramName
parameters(0).Value = paraVal
rs.SetExecutionParameters(parameters, "en-us")
'get sessiion id
SessionId = rs.ExecutionHeaderValue.ExecutionID
Console.WriteLine("SessionID: {0}", rs.ExecutionHeaderValue.ExecutionID)
'render the result
result = rs.Render(format, devInfo, extension, _
encoding, mimeType, warnings, streamIDs)
execInfo = rs.GetExecutionInfo()
Console.WriteLine("Execution date and time: {0}", execInfo.ExecutionDateTime)
' Write the contents of the report to an MHTML file.
Try
Dim sFilePath As String = "C:\Paypal\out\Summary" & paraVal & ".xls"
Dim stream As FileStream = File.Create(sFilePath, result.Length)
Console.WriteLine("File created.")
stream.Write(result, 0, result.Length)
Console.WriteLine("Result written to the file.")
stream.Close()
Catch e As Exception
Console.WriteLine(e.Message)
End Try
Next
Catch e As SoapException
Console.WriteLine(e.Detail.OuterXml)
End Try
End Sub
-
when verifed the report Execution log table it shows same parameter value except first 2
thanks
|||Once you create a snapshot report, all subsequent requests will be served using the cached instance irrespective of the parameters passed. That's because a snapshot report is cached only for the default parameter values specified when the snapshot is generated. In contrast, session caching is performed for each parameter combination.
i haven't enabled session cache coz i not displaying my rdl in browser
Session caching is always enabled. You can control only the session timeout (the minimum is 60 seconds). If you pass the session identifier back to the report server you can take advantage of the session caching when you call the RS web service.|||Hi
Enabling snapshot eliminates the problem of getting same data for different parameters - Thanks a ton
but
i am using
SetExecutionOptions method to set snapshot but how can check the time taken for snapshot to complete
coz i am getting exception if the sanpshot is not created
ie the generation of the report runs montly so a exe will set the snapshot and renders to excel for diff parameter
if you can suggest something to solve i think i will solve the problem
again thanks a lot
your knowledge on SSRS is commentable
|||
hello
|||I have a created a report in 2005 and am calling the report from .Net console.
I have enabled caching for 30 minutes. I have added parameters as filters to the report assuming that I'll be able to retrieve the output from cache rather than hitting db for each of the parameters. My report runs fine with 2 parameters but when I trigger the same with the third parameter, the outputs is erndered with the second parameter value.From then onwards all my outputs will have the same parameter filter value 2 applied.Haven't enabled snapshots as it is difficult to maintain (clean one)
Any help?
Thanks for all your help
Execution caching is based on query parameters not report parameters. You need to link report parameters to the query instead of using filters.
|||Thank you
i used
SetExecutionOptions
and
UpdateReportExecutionSnapshot (this method waits till the snapshot is created)
and i would call the render method
it worked !!!!
other work around suggested by our team cordinator is using
web url request
Create the URL (including render option and parameter)
and use webRequest method to download the file this work much faster than the snapshot
loop the url for different parameters
thanks a ton for sharing your knowledge
Hi
ok..I understand... How do i pass query parameters from my application?
Thanks
|||Once you configure the report for execution cache, setExecutionParameters() followed by Render() should work. See the code example in this thread.
|||Hi all,
I am a newbie here. Just wondering, How to set the timeout for .rdlc file?
I am using reporting services and my report always timeout after around 30sec. I already tried to set timeout in the connection string but it's not working. I am just using the report viewer to display this report.
Any help will be appreciated. Thank you.
|||30 sec or 30 min? There is a global report timeout setting which you can overwrite for all reports. Go to Report Manager -> Site Settings ->Limit report execution to the following number of seconds. The default is 1800 seconds. You can overwrite the timeout on report basis by setting the same property in the report Execution property tab.
There is also a proxy timeout setting on the ReportViewer control (ServerReport section -> Timeout) to time out the web service call. The default is 600000 ms (600 seconds).
Reporting Service Cache
Hello Techies
i have SSRS 2005 report the source data from oracle views i simply select * from the view and display data for a particular entity say empID using filter in the reports which is passed as parameter
the question is whether SSRS will cahe the data and for subsquent request it will take from Cache instead of going back to database even if i change the parameter say empID 1,2,3,
please help me on this
thanks in advance
SSRS always performs user session caching for each parameter combination. If a subsequent request is sent before the session expires and includes the session identifier, the report will be displayed from the cached instance. The end user can click the Refresh Report toolbar button (not the browser Refresh button) to generate the report anew.
|||i call the depolyed rdl and then renders in to excel in my Windows Application
and i pass param to RDL not to datasource i use the param for filters in RDL list
i enable cache for that rdl say 60 min
when render the rdl in loop by changin the param it gives same output excel data for different param
please help
|||I enable cache for that rdl say 60 min
What does this mean? You enabled shapshot caching? You don't have to do anything to specifically enable user session caching. However, I haven't tried filtering only though. If it still doesn't work for you I will take a look.
|||I enable cache for that rdl say 60 min means execution cache for that report
i haven't enabled session cache coz i not displaying my rdl in browser
i use Reporting Service webservice methods to accesses and render report
code
Private Sub RptRender2(ByVal paramName As String, ByVal paraVal As String)
Dim rs As New ReportExecutionService()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
rs.Url = "http://localhost/reportserver/ReportExecution2005.asmx"
' Render arguments
Dim result As Byte() = Nothing
Dim reportPath As String = "/PanelPayments/EvalRpt2"
Dim format As String = "EXCEL"
Dim historyID As String = Nothing
Dim devInfo As String = "<DeviceInfo><Toolbar>False</Toolbar></DeviceInfo>"
' Prepare report parameter.
Dim parameters(0) As WindowsApplication2.ReportExecution2005.ParameterValue
Dim credentials As WindowsApplication2.ReportExecution2005.DataSourceCredentials() = Nothing
Dim showHideToggle As String = Nothing
Dim encoding As String = ""
Dim mimeType As String = ""
Dim warnings As WindowsApplication2.ReportExecution2005.Warning() = Nothing
Dim reportHistoryParameters As WindowsApplication2.ReportExecution2005.ParameterValue() = Nothing
Dim streamIDs As String() = Nothing
Dim execInfo As New ExecutionInfo
Dim execHeader As New ExecutionHeader()
Dim SessionId As String
Dim extension As String = ""
Dim arrList As New ArrayList
arrList.Add("1")
arrList.Add("2")
arrList.Add("3")
arrList.Add("4")
rs.ExecutionHeaderValue = execHeader
execInfo = rs.LoadReport(reportPath, historyID)
Dim i As Integer
Try
For i = 0 To arrList.Count - 1
'set parameter
paraVal = arrList(i).ToString()
parameters(0) = New WindowsApplication2.ReportExecution2005.ParameterValue()
parameters(0).Name = paramName
parameters(0).Value = paraVal
rs.SetExecutionParameters(parameters, "en-us")
'get sessiion id
SessionId = rs.ExecutionHeaderValue.ExecutionID
Console.WriteLine("SessionID: {0}", rs.ExecutionHeaderValue.ExecutionID)
'render the result
result = rs.Render(format, devInfo, extension, _
encoding, mimeType, warnings, streamIDs)
execInfo = rs.GetExecutionInfo()
Console.WriteLine("Execution date and time: {0}", execInfo.ExecutionDateTime)
' Write the contents of the report to an MHTML file.
Try
Dim sFilePath As String = "C:\Paypal\out\Summary" & paraVal & ".xls"
Dim stream As FileStream = File.Create(sFilePath, result.Length)
Console.WriteLine("File created.")
stream.Write(result, 0, result.Length)
Console.WriteLine("Result written to the file.")
stream.Close()
Catch e As Exception
Console.WriteLine(e.Message)
End Try
Next
Catch e As SoapException
Console.WriteLine(e.Detail.OuterXml)
End Try
End Sub
-
when verifed the report Execution log table it shows same parameter value except first 2
thanks
|||Once you create a snapshot report, all subsequent requests will be served using the cached instance irrespective of the parameters passed. That's because a snapshot report is cached only for the default parameter values specified when the snapshot is generated. In contrast, session caching is performed for each parameter combination.
i haven't enabled session cache coz i not displaying my rdl in browser
Session caching is always enabled. You can control only the session timeout (the minimum is 60 seconds). If you pass the session identifier back to the report server you can take advantage of the session caching when you call the RS web service.|||Hi
Enabling snapshot eliminates the problem of getting same data for different parameters - Thanks a ton
but
i am using
SetExecutionOptions method to set snapshot but how can check the time taken for snapshot to complete
coz i am getting exception if the sanpshot is not created
ie the generation of the report runs montly so a exe will set the snapshot and renders to excel for diff parameter
if you can suggest something to solve i think i will solve the problem
again thanks a lot
your knowledge on SSRS is commentable
|||
hello
|||I have a created a report in 2005 and am calling the report from .Net console.
I have enabled caching for 30 minutes. I have added parameters as filters to the report assuming that I'll be able to retrieve the output from cache rather than hitting db for each of the parameters. My report runs fine with 2 parameters but when I trigger the same with the third parameter, the outputs is erndered with the second parameter value.From then onwards all my outputs will have the same parameter filter value 2 applied.Haven't enabled snapshots as it is difficult to maintain (clean one)
Any help?
Thanks for all your help
Execution caching is based on query parameters not report parameters. You need to link report parameters to the query instead of using filters.
|||Thank you
i used
SetExecutionOptions
and
UpdateReportExecutionSnapshot (this method waits till the snapshot is created)
and i would call the render method
it worked !!!!
other work around suggested by our team cordinator is using
web url request
Create the URL (including render option and parameter)
and use webRequest method to download the file this work much faster than the snapshot
loop the url for different parameters
thanks a ton for sharing your knowledge
Hi
ok..I understand... How do i pass query parameters from my application?
Thanks
|||Once you configure the report for execution cache, setExecutionParameters() followed by Render() should work. See the code example in this thread.
|||Hi all,
I am a newbie here. Just wondering, How to set the timeout for .rdlc file?
I am using reporting services and my report always timeout after around 30sec. I already tried to set timeout in the connection string but it's not working. I am just using the report viewer to display this report.
Any help will be appreciated. Thank you.
|||30 sec or 30 min? There is a global report timeout setting which you can overwrite for all reports. Go to Report Manager -> Site Settings ->Limit report execution to the following number of seconds. The default is 1800 seconds. You can overwrite the timeout on report basis by setting the same property in the report Execution property tab.
There is also a proxy timeout setting on the ReportViewer control (ServerReport section -> Timeout) to time out the web service call. The default is 600000 ms (600 seconds).
Reporting Service Cache
Hello Techies
i have SSRS 2005 report the source data from oracle views i simply select * from the view and display data for a particular entity say empID using filter in the reports which is passed as parameter
the question is whether SSRS will cahe the data and for subsquent request it will take from Cache instead of going back to database even if i change the parameter say empID 1,2,3,
please help me on this
thanks in advance
SSRS always performs user session caching for each parameter combination. If a subsequent request is sent before the session expires and includes the session identifier, the report will be displayed from the cached instance. The end user can click the Refresh Report toolbar button (not the browser Refresh button) to generate the report anew.
|||i call the depolyed rdl and then renders in to excel in my Windows Application
and i pass param to RDL not to datasource i use the param for filters in RDL list
i enable cache for that rdl say 60 min
when render the rdl in loop by changin the param it gives same output excel data for different param
please help
|||I enable cache for that rdl say 60 min
What does this mean? You enabled shapshot caching? You don't have to do anything to specifically enable user session caching. However, I haven't tried filtering only though. If it still doesn't work for you I will take a look.
|||I enable cache for that rdl say 60 min means execution cache for that report
i haven't enabled session cache coz i not displaying my rdl in browser
i use Reporting Service webservice methods to accesses and render report
code
Private Sub RptRender2(ByVal paramName As String, ByVal paraVal As String)
Dim rs As New ReportExecutionService()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
rs.Url = "http://localhost/reportserver/ReportExecution2005.asmx"
' Render arguments
Dim result As Byte() = Nothing
Dim reportPath As String = "/PanelPayments/EvalRpt2"
Dim format As String = "EXCEL"
Dim historyID As String = Nothing
Dim devInfo As String = "<DeviceInfo><Toolbar>False</Toolbar></DeviceInfo>"
' Prepare report parameter.
Dim parameters(0) As WindowsApplication2.ReportExecution2005.ParameterValue
Dim credentials As WindowsApplication2.ReportExecution2005.DataSourceCredentials() = Nothing
Dim showHideToggle As String = Nothing
Dim encoding As String = ""
Dim mimeType As String = ""
Dim warnings As WindowsApplication2.ReportExecution2005.Warning() = Nothing
Dim reportHistoryParameters As WindowsApplication2.ReportExecution2005.ParameterValue() = Nothing
Dim streamIDs As String() = Nothing
Dim execInfo As New ExecutionInfo
Dim execHeader As New ExecutionHeader()
Dim SessionId As String
Dim extension As String = ""
Dim arrList As New ArrayList
arrList.Add("1")
arrList.Add("2")
arrList.Add("3")
arrList.Add("4")
rs.ExecutionHeaderValue = execHeader
execInfo = rs.LoadReport(reportPath, historyID)
Dim i As Integer
Try
For i = 0 To arrList.Count - 1
'set parameter
paraVal = arrList(i).ToString()
parameters(0) = New WindowsApplication2.ReportExecution2005.ParameterValue()
parameters(0).Name = paramName
parameters(0).Value = paraVal
rs.SetExecutionParameters(parameters, "en-us")
'get sessiion id
SessionId = rs.ExecutionHeaderValue.ExecutionID
Console.WriteLine("SessionID: {0}", rs.ExecutionHeaderValue.ExecutionID)
'render the result
result = rs.Render(format, devInfo, extension, _
encoding, mimeType, warnings, streamIDs)
execInfo = rs.GetExecutionInfo()
Console.WriteLine("Execution date and time: {0}", execInfo.ExecutionDateTime)
' Write the contents of the report to an MHTML file.
Try
Dim sFilePath As String = "C:\Paypal\out\Summary" & paraVal & ".xls"
Dim stream As FileStream = File.Create(sFilePath, result.Length)
Console.WriteLine("File created.")
stream.Write(result, 0, result.Length)
Console.WriteLine("Result written to the file.")
stream.Close()
Catch e As Exception
Console.WriteLine(e.Message)
End Try
Next
Catch e As SoapException
Console.WriteLine(e.Detail.OuterXml)
End Try
End Sub
-
when verifed the report Execution log table it shows same parameter value except first 2
thanks
|||Once you create a snapshot report, all subsequent requests will be served using the cached instance irrespective of the parameters passed. That's because a snapshot report is cached only for the default parameter values specified when the snapshot is generated. In contrast, session caching is performed for each parameter combination.
i haven't enabled session cache coz i not displaying my rdl in browser
Session caching is always enabled. You can control only the session timeout (the minimum is 60 seconds). If you pass the session identifier back to the report server you can take advantage of the session caching when you call the RS web service.|||Hi
Enabling snapshot eliminates the problem of getting same data for different parameters - Thanks a ton
but
i am using
SetExecutionOptions method to set snapshot but how can check the time taken for snapshot to complete
coz i am getting exception if the sanpshot is not created
ie the generation of the report runs montly so a exe will set the snapshot and renders to excel for diff parameter
if you can suggest something to solve i think i will solve the problem
again thanks a lot
your knowledge on SSRS is commentable
|||
hello
|||I have a created a report in 2005 and am calling the report from .Net console.
I have enabled caching for 30 minutes. I have added parameters as filters to the report assuming that I'll be able to retrieve the output from cache rather than hitting db for each of the parameters. My report runs fine with 2 parameters but when I trigger the same with the third parameter, the outputs is erndered with the second parameter value.From then onwards all my outputs will have the same parameter filter value 2 applied.Haven't enabled snapshots as it is difficult to maintain (clean one)
Any help?
Thanks for all your help
Execution caching is based on query parameters not report parameters. You need to link report parameters to the query instead of using filters.
|||Thank you
i used
SetExecutionOptions
and
UpdateReportExecutionSnapshot (this method waits till the snapshot is created)
and i would call the render method
it worked !!!!
other work around suggested by our team cordinator is using
web url request
Create the URL (including render option and parameter)
and use webRequest method to download the file this work much faster than the snapshot
loop the url for different parameters
thanks a ton for sharing your knowledge
Hi
ok..I understand... How do i pass query parameters from my application?
Thanks
|||Once you configure the report for execution cache, setExecutionParameters() followed by Render() should work. See the code example in this thread.
|||Hi all,
I am a newbie here. Just wondering, How to set the timeout for .rdlc file?
I am using reporting services and my report always timeout after around 30sec. I already tried to set timeout in the connection string but it's not working. I am just using the report viewer to display this report.
Any help will be appreciated. Thank you.
|||30 sec or 30 min? There is a global report timeout setting which you can overwrite for all reports. Go to Report Manager -> Site Settings ->Limit report execution to the following number of seconds. The default is 1800 seconds. You can overwrite the timeout on report basis by setting the same property in the report Execution property tab.
There is also a proxy timeout setting on the ReportViewer control (ServerReport section -> Timeout) to time out the web service call. The default is 600000 ms (600 seconds).
Wednesday, March 7, 2012
Reporting Service Cache
Hello Techies
i have SSRS 2005 report the source data from oracle views i simply select * from the view and display data for a particular entity say empID using filter in the reports which is passed as parameter
the question is whether SSRS will cahe the data and for subsquent request it will take from Cache instead of going back to database even if i change the parameter say empID 1,2,3,
please help me on this
thanks in advance
SSRS always performs user session caching for each parameter combination. If a subsequent request is sent before the session expires and includes the session identifier, the report will be displayed from the cached instance. The end user can click the Refresh Report toolbar button (not the browser Refresh button) to generate the report anew.
|||i call the depolyed rdl and then renders in to excel in my Windows Application
and i pass param to RDL not to datasource i use the param for filters in RDL list
i enable cache for that rdl say 60 min
when render the rdl in loop by changin the param it gives same output excel data for different param
please help
|||I enable cache for that rdl say 60 min
What does this mean? You enabled shapshot caching? You don't have to do anything to specifically enable user session caching. However, I haven't tried filtering only though. If it still doesn't work for you I will take a look.
|||I enable cache for that rdl say 60 min means execution cache for that report
i haven't enabled session cache coz i not displaying my rdl in browser
i use Reporting Service webservice methods to accesses and render report
code
Private Sub RptRender2(ByVal paramName As String, ByVal paraVal As String)
Dim rs As New ReportExecutionService()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
rs.Url = "http://localhost/reportserver/ReportExecution2005.asmx"
' Render arguments
Dim result As Byte() = Nothing
Dim reportPath As String = "/PanelPayments/EvalRpt2"
Dim format As String = "EXCEL"
Dim historyID As String = Nothing
Dim devInfo As String = "<DeviceInfo><Toolbar>False</Toolbar></DeviceInfo>"
' Prepare report parameter.
Dim parameters(0) As WindowsApplication2.ReportExecution2005.ParameterValue
Dim credentials As WindowsApplication2.ReportExecution2005.DataSourceCredentials() = Nothing
Dim showHideToggle As String = Nothing
Dim encoding As String = ""
Dim mimeType As String = ""
Dim warnings As WindowsApplication2.ReportExecution2005.Warning() = Nothing
Dim reportHistoryParameters As WindowsApplication2.ReportExecution2005.ParameterValue() = Nothing
Dim streamIDs As String() = Nothing
Dim execInfo As New ExecutionInfo
Dim execHeader As New ExecutionHeader()
Dim SessionId As String
Dim extension As String = ""
Dim arrList As New ArrayList
arrList.Add("1")
arrList.Add("2")
arrList.Add("3")
arrList.Add("4")
rs.ExecutionHeaderValue = execHeader
execInfo = rs.LoadReport(reportPath, historyID)
Dim i As Integer
Try
For i = 0 To arrList.Count - 1
'set parameter
paraVal = arrList(i).ToString()
parameters(0) = New WindowsApplication2.ReportExecution2005.ParameterValue()
parameters(0).Name = paramName
parameters(0).Value = paraVal
rs.SetExecutionParameters(parameters, "en-us")
'get sessiion id
SessionId = rs.ExecutionHeaderValue.ExecutionID
Console.WriteLine("SessionID: {0}", rs.ExecutionHeaderValue.ExecutionID)
'render the result
result = rs.Render(format, devInfo, extension, _
encoding, mimeType, warnings, streamIDs)
execInfo = rs.GetExecutionInfo()
Console.WriteLine("Execution date and time: {0}", execInfo.ExecutionDateTime)
' Write the contents of the report to an MHTML file.
Try
Dim sFilePath As String = "C:\Paypal\out\Summary" & paraVal & ".xls"
Dim stream As FileStream = File.Create(sFilePath, result.Length)
Console.WriteLine("File created.")
stream.Write(result, 0, result.Length)
Console.WriteLine("Result written to the file.")
stream.Close()
Catch e As Exception
Console.WriteLine(e.Message)
End Try
Next
Catch e As SoapException
Console.WriteLine(e.Detail.OuterXml)
End Try
End Sub
-
when verifed the report Execution log table it shows same parameter value except first 2
thanks
|||Once you create a snapshot report, all subsequent requests will be served using the cached instance irrespective of the parameters passed. That's because a snapshot report is cached only for the default parameter values specified when the snapshot is generated. In contrast, session caching is performed for each parameter combination.
i haven't enabled session cache coz i not displaying my rdl in browser
Session caching is always enabled. You can control only the session timeout (the minimum is 60 seconds). If you pass the session identifier back to the report server you can take advantage of the session caching when you call the RS web service.|||Hi
Enabling snapshot eliminates the problem of getting same data for different parameters - Thanks a ton
but
i am using
SetExecutionOptions method to set snapshot but how can check the time taken for snapshot to complete
coz i am getting exception if the sanpshot is not created
ie the generation of the report runs montly so a exe will set the snapshot and renders to excel for diff parameter
if you can suggest something to solve i think i will solve the problem
again thanks a lot
your knowledge on SSRS is commentable
|||
hello
|||I have a created a report in 2005 and am calling the report from .Net console.
I have enabled caching for 30 minutes. I have added parameters as filters to the report assuming that I'll be able to retrieve the output from cache rather than hitting db for each of the parameters. My report runs fine with 2 parameters but when I trigger the same with the third parameter, the outputs is erndered with the second parameter value.From then onwards all my outputs will have the same parameter filter value 2 applied.Haven't enabled snapshots as it is difficult to maintain (clean one)
Any help?
Thanks for all your help
Execution caching is based on query parameters not report parameters. You need to link report parameters to the query instead of using filters.
|||Thank you
i used
SetExecutionOptions
and
UpdateReportExecutionSnapshot (this method waits till the snapshot is created)
and i would call the render method
it worked !!!!
other work around suggested by our team cordinator is using
web url request
Create the URL (including render option and parameter)
and use webRequest method to download the file this work much faster than the snapshot
loop the url for different parameters
thanks a ton for sharing your knowledge
Hi
ok..I understand... How do i pass query parameters from my application?
Thanks
|||Once you configure the report for execution cache, setExecutionParameters() followed by Render() should work. See the code example in this thread.
|||Hi all,
I am a newbie here. Just wondering, How to set the timeout for .rdlc file?
I am using reporting services and my report always timeout after around 30sec. I already tried to set timeout in the connection string but it's not working. I am just using the report viewer to display this report.
Any help will be appreciated. Thank you.
|||30 sec or 30 min? There is a global report timeout setting which you can overwrite for all reports. Go to Report Manager -> Site Settings ->Limit report execution to the following number of seconds. The default is 1800 seconds. You can overwrite the timeout on report basis by setting the same property in the report Execution property tab.
There is also a proxy timeout setting on the ReportViewer control (ServerReport section -> Timeout) to time out the web service call. The default is 600000 ms (600 seconds).
Reporting Service Cache
Hello Techies
i have SSRS 2005 report the source data from oracle views i simply select * from the view and display data for a particular entity say empID using filter in the reports which is passed as parameter
the question is whether SSRS will cahe the data and for subsquent request it will take from Cache instead of going back to database even if i change the parameter say empID 1,2,3,
please help me on this
thanks in advance
SSRS always performs user session caching for each parameter combination. If a subsequent request is sent before the session expires and includes the session identifier, the report will be displayed from the cached instance. The end user can click the Refresh Report toolbar button (not the browser Refresh button) to generate the report anew.
|||i call the depolyed rdl and then renders in to excel in my Windows Application
and i pass param to RDL not to datasource i use the param for filters in RDL list
i enable cache for that rdl say 60 min
when render the rdl in loop by changin the param it gives same output excel data for different param
please help
|||I enable cache for that rdl say 60 min
What does this mean? You enabled shapshot caching? You don't have to do anything to specifically enable user session caching. However, I haven't tried filtering only though. If it still doesn't work for you I will take a look.
|||I enable cache for that rdl say 60 min means execution cache for that report
i haven't enabled session cache coz i not displaying my rdl in browser
i use Reporting Service webservice methods to accesses and render report
code
Private Sub RptRender2(ByVal paramName As String, ByVal paraVal As String)
Dim rs As New ReportExecutionService()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
rs.Url = "http://localhost/reportserver/ReportExecution2005.asmx"
' Render arguments
Dim result As Byte() = Nothing
Dim reportPath As String = "/PanelPayments/EvalRpt2"
Dim format As String = "EXCEL"
Dim historyID As String = Nothing
Dim devInfo As String = "<DeviceInfo><Toolbar>False</Toolbar></DeviceInfo>"
' Prepare report parameter.
Dim parameters(0) As WindowsApplication2.ReportExecution2005.ParameterValue
Dim credentials As WindowsApplication2.ReportExecution2005.DataSourceCredentials() = Nothing
Dim showHideToggle As String = Nothing
Dim encoding As String = ""
Dim mimeType As String = ""
Dim warnings As WindowsApplication2.ReportExecution2005.Warning() = Nothing
Dim reportHistoryParameters As WindowsApplication2.ReportExecution2005.ParameterValue() = Nothing
Dim streamIDs As String() = Nothing
Dim execInfo As New ExecutionInfo
Dim execHeader As New ExecutionHeader()
Dim SessionId As String
Dim extension As String = ""
Dim arrList As New ArrayList
arrList.Add("1")
arrList.Add("2")
arrList.Add("3")
arrList.Add("4")
rs.ExecutionHeaderValue = execHeader
execInfo = rs.LoadReport(reportPath, historyID)
Dim i As Integer
Try
For i = 0 To arrList.Count - 1
'set parameter
paraVal = arrList(i).ToString()
parameters(0) = New WindowsApplication2.ReportExecution2005.ParameterValue()
parameters(0).Name = paramName
parameters(0).Value = paraVal
rs.SetExecutionParameters(parameters, "en-us")
'get sessiion id
SessionId = rs.ExecutionHeaderValue.ExecutionID
Console.WriteLine("SessionID: {0}", rs.ExecutionHeaderValue.ExecutionID)
'render the result
result = rs.Render(format, devInfo, extension, _
encoding, mimeType, warnings, streamIDs)
execInfo = rs.GetExecutionInfo()
Console.WriteLine("Execution date and time: {0}", execInfo.ExecutionDateTime)
' Write the contents of the report to an MHTML file.
Try
Dim sFilePath As String = "C:\Paypal\out\Summary" & paraVal & ".xls"
Dim stream As FileStream = File.Create(sFilePath, result.Length)
Console.WriteLine("File created.")
stream.Write(result, 0, result.Length)
Console.WriteLine("Result written to the file.")
stream.Close()
Catch e As Exception
Console.WriteLine(e.Message)
End Try
Next
Catch e As SoapException
Console.WriteLine(e.Detail.OuterXml)
End Try
End Sub
-
when verifed the report Execution log table it shows same parameter value except first 2
thanks
|||Once you create a snapshot report, all subsequent requests will be served using the cached instance irrespective of the parameters passed. That's because a snapshot report is cached only for the default parameter values specified when the snapshot is generated. In contrast, session caching is performed for each parameter combination.
i haven't enabled session cache coz i not displaying my rdl in browser
Session caching is always enabled. You can control only the session timeout (the minimum is 60 seconds). If you pass the session identifier back to the report server you can take advantage of the session caching when you call the RS web service.|||Hi
Enabling snapshot eliminates the problem of getting same data for different parameters - Thanks a ton
but
i am using
SetExecutionOptions method to set snapshot but how can check the time taken for snapshot to complete
coz i am getting exception if the sanpshot is not created
ie the generation of the report runs montly so a exe will set the snapshot and renders to excel for diff parameter
if you can suggest something to solve i think i will solve the problem
again thanks a lot
your knowledge on SSRS is commentable
|||
hello
|||I have a created a report in 2005 and am calling the report from .Net console.
I have enabled caching for 30 minutes. I have added parameters as filters to the report assuming that I'll be able to retrieve the output from cache rather than hitting db for each of the parameters. My report runs fine with 2 parameters but when I trigger the same with the third parameter, the outputs is erndered with the second parameter value.From then onwards all my outputs will have the same parameter filter value 2 applied.Haven't enabled snapshots as it is difficult to maintain (clean one)
Any help?
Thanks for all your help
Execution caching is based on query parameters not report parameters. You need to link report parameters to the query instead of using filters.
|||Thank you
i used
SetExecutionOptions
and
UpdateReportExecutionSnapshot (this method waits till the snapshot is created)
and i would call the render method
it worked !!!!
other work around suggested by our team cordinator is using
web url request
Create the URL (including render option and parameter)
and use webRequest method to download the file this work much faster than the snapshot
loop the url for different parameters
thanks a ton for sharing your knowledge
Hi
ok..I understand... How do i pass query parameters from my application?
Thanks
|||Once you configure the report for execution cache, setExecutionParameters() followed by Render() should work. See the code example in this thread.
|||Hi all,
I am a newbie here. Just wondering, How to set the timeout for .rdlc file?
I am using reporting services and my report always timeout after around 30sec. I already tried to set timeout in the connection string but it's not working. I am just using the report viewer to display this report.
Any help will be appreciated. Thank you.
|||30 sec or 30 min? There is a global report timeout setting which you can overwrite for all reports. Go to Report Manager -> Site Settings ->Limit report execution to the following number of seconds. The default is 1800 seconds. You can overwrite the timeout on report basis by setting the same property in the report Execution property tab.
There is also a proxy timeout setting on the ReportViewer control (ServerReport section -> Timeout) to time out the web service call. The default is 600000 ms (600 seconds).
Reporting Service Cache
Hello Techies
i have SSRS 2005 report the source data from oracle views i simply select * from the view and display data for a particular entity say empID using filter in the reports which is passed as parameter
the question is whether SSRS will cahe the data and for subsquent request it will take from Cache instead of going back to database even if i change the parameter say empID 1,2,3,
please help me on this
thanks in advance
SSRS always performs user session caching for each parameter combination. If a subsequent request is sent before the session expires and includes the session identifier, the report will be displayed from the cached instance. The end user can click the Refresh Report toolbar button (not the browser Refresh button) to generate the report anew.
|||i call the depolyed rdl and then renders in to excel in my Windows Application
and i pass param to RDL not to datasource i use the param for filters in RDL list
i enable cache for that rdl say 60 min
when render the rdl in loop by changin the param it gives same output excel data for different param
please help
|||I enable cache for that rdl say 60 min
What does this mean? You enabled shapshot caching? You don't have to do anything to specifically enable user session caching. However, I haven't tried filtering only though. If it still doesn't work for you I will take a look.
|||I enable cache for that rdl say 60 min means execution cache for that report
i haven't enabled session cache coz i not displaying my rdl in browser
i use Reporting Service webservice methods to accesses and render report
code
Private Sub RptRender2(ByVal paramName As String, ByVal paraVal As String)
Dim rs As New ReportExecutionService()
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
rs.Url = "http://localhost/reportserver/ReportExecution2005.asmx"
' Render arguments
Dim result As Byte() = Nothing
Dim reportPath As String = "/PanelPayments/EvalRpt2"
Dim format As String = "EXCEL"
Dim historyID As String = Nothing
Dim devInfo As String = "<DeviceInfo><Toolbar>False</Toolbar></DeviceInfo>"
' Prepare report parameter.
Dim parameters(0) As WindowsApplication2.ReportExecution2005.ParameterValue
Dim credentials As WindowsApplication2.ReportExecution2005.DataSourceCredentials() = Nothing
Dim showHideToggle As String = Nothing
Dim encoding As String = ""
Dim mimeType As String = ""
Dim warnings As WindowsApplication2.ReportExecution2005.Warning() = Nothing
Dim reportHistoryParameters As WindowsApplication2.ReportExecution2005.ParameterValue() = Nothing
Dim streamIDs As String() = Nothing
Dim execInfo As New ExecutionInfo
Dim execHeader As New ExecutionHeader()
Dim SessionId As String
Dim extension As String = ""
Dim arrList As New ArrayList
arrList.Add("1")
arrList.Add("2")
arrList.Add("3")
arrList.Add("4")
rs.ExecutionHeaderValue = execHeader
execInfo = rs.LoadReport(reportPath, historyID)
Dim i As Integer
Try
For i = 0 To arrList.Count - 1
'set parameter
paraVal = arrList(i).ToString()
parameters(0) = New WindowsApplication2.ReportExecution2005.ParameterValue()
parameters(0).Name = paramName
parameters(0).Value = paraVal
rs.SetExecutionParameters(parameters, "en-us")
'get sessiion id
SessionId = rs.ExecutionHeaderValue.ExecutionID
Console.WriteLine("SessionID: {0}", rs.ExecutionHeaderValue.ExecutionID)
'render the result
result = rs.Render(format, devInfo, extension, _
encoding, mimeType, warnings, streamIDs)
execInfo = rs.GetExecutionInfo()
Console.WriteLine("Execution date and time: {0}", execInfo.ExecutionDateTime)
' Write the contents of the report to an MHTML file.
Try
Dim sFilePath As String = "C:\Paypal\out\Summary" & paraVal & ".xls"
Dim stream As FileStream = File.Create(sFilePath, result.Length)
Console.WriteLine("File created.")
stream.Write(result, 0, result.Length)
Console.WriteLine("Result written to the file.")
stream.Close()
Catch e As Exception
Console.WriteLine(e.Message)
End Try
Next
Catch e As SoapException
Console.WriteLine(e.Detail.OuterXml)
End Try
End Sub
-
when verifed the report Execution log table it shows same parameter value except first 2
thanks
|||Once you create a snapshot report, all subsequent requests will be served using the cached instance irrespective of the parameters passed. That's because a snapshot report is cached only for the default parameter values specified when the snapshot is generated. In contrast, session caching is performed for each parameter combination.
i haven't enabled session cache coz i not displaying my rdl in browser
Session caching is always enabled. You can control only the session timeout (the minimum is 60 seconds). If you pass the session identifier back to the report server you can take advantage of the session caching when you call the RS web service.|||Hi
Enabling snapshot eliminates the problem of getting same data for different parameters - Thanks a ton
but
i am using
SetExecutionOptions method to set snapshot but how can check the time taken for snapshot to complete
coz i am getting exception if the sanpshot is not created
ie the generation of the report runs montly so a exe will set the snapshot and renders to excel for diff parameter
if you can suggest something to solve i think i will solve the problem
again thanks a lot
your knowledge on SSRS is commentable
|||
hello
|||I have a created a report in 2005 and am calling the report from .Net console.
I have enabled caching for 30 minutes. I have added parameters as filters to the report assuming that I'll be able to retrieve the output from cache rather than hitting db for each of the parameters. My report runs fine with 2 parameters but when I trigger the same with the third parameter, the outputs is erndered with the second parameter value.From then onwards all my outputs will have the same parameter filter value 2 applied.Haven't enabled snapshots as it is difficult to maintain (clean one)
Any help?
Thanks for all your help
Execution caching is based on query parameters not report parameters. You need to link report parameters to the query instead of using filters.
|||Thank you
i used
SetExecutionOptions
and
UpdateReportExecutionSnapshot (this method waits till the snapshot is created)
and i would call the render method
it worked !!!!
other work around suggested by our team cordinator is using
web url request
Create the URL (including render option and parameter)
and use webRequest method to download the file this work much faster than the snapshot
loop the url for different parameters
thanks a ton for sharing your knowledge
Hi
ok..I understand... How do i pass query parameters from my application?
Thanks
|||Once you configure the report for execution cache, setExecutionParameters() followed by Render() should work. See the code example in this thread.
|||Hi all,
I am a newbie here. Just wondering, How to set the timeout for .rdlc file?
I am using reporting services and my report always timeout after around 30sec. I already tried to set timeout in the connection string but it's not working. I am just using the report viewer to display this report.
Any help will be appreciated. Thank you.
|||30 sec or 30 min? There is a global report timeout setting which you can overwrite for all reports. Go to Report Manager -> Site Settings ->Limit report execution to the following number of seconds. The default is 1800 seconds. You can overwrite the timeout on report basis by setting the same property in the report Execution property tab.
There is also a proxy timeout setting on the ReportViewer control (ServerReport section -> Timeout) to time out the web service call. The default is 600000 ms (600 seconds).
Reporting Service
How I can obtain SQL Server Reporting Service?
Thank
Pippo
Hi
See http://www.microsoft.com/sql/reporti...uy/default.asp
John
"Pippo" <anonymous@.discussions.microsoft.com> wrote in message
news:200a701c45867$a37dc160$a001280a@.phx.gbl...
> I have a select License Volume licensing program,
> How I can obtain SQL Server Reporting Service?
> Thank
> Pippo
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<