I use a javascript to close a window and refresh another window that contains
a report. I'm trying to actually refresh the report and have it get new data
from a table.
For some reason I refresh the browser and the report doesn't refresh until
the 2nd time it's done. Anyone know why or how to fix this?Hi John,
The problem probably is that the report gets data from cache. You can
disable this in URL you are using in the Report Rendering with
"rs:ClearSession=true" option. For example I use
http://localhost/reportserver?/MyReport&rs:Command=Render&rs:ClearSession=true
Hope solve your problem.
"John" wrote:
> I use a javascript to close a window and refresh another window that contains
> a report. I'm trying to actually refresh the report and have it get new data
> from a table.
> For some reason I refresh the browser and the report doesn't refresh until
> the 2nd time it's done. Anyone know why or how to fix this?
>|||This works perfectly. Thank you so much!
"ata" wrote:
> Hi John,
> The problem probably is that the report gets data from cache. You can
> disable this in URL you are using in the Report Rendering with
> "rs:ClearSession=true" option. For example I use
> http://localhost/reportserver?/MyReport&rs:Command=Render&rs:ClearSession=true
> Hope solve your problem.
>
> "John" wrote:
> > I use a javascript to close a window and refresh another window that contains
> > a report. I'm trying to actually refresh the report and have it get new data
> > from a table.
> >
> > For some reason I refresh the browser and the report doesn't refresh until
> > the 2nd time it's done. Anyone know why or how to fix this?
> >|||ClearSession never work for us. Any ideas?
"ata" wrote:
> Hi John,
> The problem probably is that the report gets data from cache. You can
> disable this in URL you are using in the Report Rendering with
> "rs:ClearSession=true" option. For example I use
> http://localhost/reportserver?/MyReport&rs:Command=Render&rs:ClearSession=true
> Hope solve your problem.
>
> "John" wrote:
> > I use a javascript to close a window and refresh another window that contains
> > a report. I'm trying to actually refresh the report and have it get new data
> > from a table.
> >
> > For some reason I refresh the browser and the report doesn't refresh until
> > the 2nd time it's done. Anyone know why or how to fix this?
> >
Showing posts with label window. Show all posts
Showing posts with label window. Show all posts
Monday, March 26, 2012
Refreshing a report
Tuesday, March 20, 2012
referencing report parameters in code
I'm trying to reference a report parameter in the code window:
Dim CompId As Integer
CompId = Parameters!CompanyId.Value
It gives me the error:
[BC30469] Reference to a non-shared member requires an object reference.
Any ideas (or alternatives) on how to resolve this? Thank you.TechnoSpyke,
The syntax to reference a report parameter has to be done by instantiating a
Reporting Object
For example:
Dim strParamName as string = â'ThisAStringLiteralâ'
Dim strParamValue as string = â'ThisAStringLiteralâ'
Dim Parameters(0) As Reporting.ParameterValue
Parameters(0) = New Reporting.ParameterValue
Parameters(0).Name = strParamName
Parameters(0).Value = strUSerID
For a better documentation, reference the SOAP API call in BOL
rwiethorn
"TechnoSpyke" wrote:
> I'm trying to reference a report parameter in the code window:
> Dim CompId As Integer
> CompId = Parameters!CompanyId.Value
> It gives me the error:
> [BC30469] Reference to a non-shared member requires an object reference.
> Any ideas (or alternatives) on how to resolve this? Thank you.
>
>|||Thanks for the reply, although I still have some problems.
What I wanted was to set a variable based on a report parameter (assuming
that this parameter has already a value), from within the report (code
window). The code below was taken from the BOL (Initializing Custom
Assembly Objects).
<Code>
Dim m_myClass As MyClass
Protected Overrides Sub OnInit()
m_myClass = new MyClass(User!Language, Paramters!Territory)
End Sub
</Code>
This is very similar to what I'm trying to do, yet I get a "[BC30469]
Reference to a non-shared member requires an object reference." everytime I
reference the Parameters.
"rwiethorn" <rwiethorn@.discussions.microsoft.com> wrote in message
news:BA485D54-C3F9-453A-8883-CADAD78570B5@.microsoft.com...
> TechnoSpyke,
> The syntax to reference a report parameter has to be done by instantiating
> a
> Reporting Object
> For example:
> Dim strParamName as string = "ThisAStringLiteral"
> Dim strParamValue as string = "ThisAStringLiteral"
> Dim Parameters(0) As Reporting.ParameterValue
> Parameters(0) = New Reporting.ParameterValue
> Parameters(0).Name = strParamName
> Parameters(0).Value = strUSerID
> For a better documentation, reference the SOAP API call in BOL
> rwiethorn
> "TechnoSpyke" wrote:
>> I'm trying to reference a report parameter in the code window:
>> Dim CompId As Integer
>> CompId = Parameters!CompanyId.Value
>> It gives me the error:
>> [BC30469] Reference to a non-shared member requires an object reference.
>> Any ideas (or alternatives) on how to resolve this? Thank you.
>>|||TechnoSpyke,
Were are you trying to get the value?
-in a custom assembly?
-in the code page of the report?
-in the expression builder of a control on a report?
If you're in a report, the report knows the name of the parameter. You
reference the param by name. So try to assign the value into a variable by
name.
I've not done that, but read about it. Search this newsgroup for params and
search BOL for param usage.
"TechnoSpyke" wrote:
> Thanks for the reply, although I still have some problems.
> What I wanted was to set a variable based on a report parameter (assuming
> that this parameter has already a value), from within the report (code
> window). The code below was taken from the BOL (Initializing Custom
> Assembly Objects).
> <Code>
> Dim m_myClass As MyClass
> Protected Overrides Sub OnInit()
> m_myClass = new MyClass(User!Language, Paramters!Territory)
> End Sub
> </Code>
> This is very similar to what I'm trying to do, yet I get a "[BC30469]
> Reference to a non-shared member requires an object reference." everytime I
> reference the Parameters.
>
> "rwiethorn" <rwiethorn@.discussions.microsoft.com> wrote in message
> news:BA485D54-C3F9-453A-8883-CADAD78570B5@.microsoft.com...
> > TechnoSpyke,
> > The syntax to reference a report parameter has to be done by instantiating
> > a
> > Reporting Object
> >
> > For example:
> > Dim strParamName as string = "ThisAStringLiteral"
> > Dim strParamValue as string = "ThisAStringLiteral"
> > Dim Parameters(0) As Reporting.ParameterValue
> >
> > Parameters(0) = New Reporting.ParameterValue
> > Parameters(0).Name = strParamName
> > Parameters(0).Value = strUSerID
> >
> > For a better documentation, reference the SOAP API call in BOL
> >
> > rwiethorn
> >
> > "TechnoSpyke" wrote:
> >
> >> I'm trying to reference a report parameter in the code window:
> >>
> >> Dim CompId As Integer
> >> CompId = Parameters!CompanyId.Value
> >>
> >> It gives me the error:
> >> [BC30469] Reference to a non-shared member requires an object reference.
> >>
> >> Any ideas (or alternatives) on how to resolve this? Thank you.
> >>
> >>
> >>
>
>|||I am trying to get the parameter value from the code page of the report. My
code looks like this (modified for this purpose):
Protected Overrides Sub OnInit()
Dim compId As Integer
'following code returns error [BC30469]
compId = Parameters!CompanyId
'following code still returns error [BC30469]
compId = Parameters!CompanyId.Value
'following code doesn't return an error, although not sure if I have the
correct value
compId = Report.Parameters("CompanyId").Value
End Sub
"rwiethorn" <rwiethorn@.discussions.microsoft.com> wrote in message
news:A5C1CEDC-1751-48FA-936A-ADEF01259F22@.microsoft.com...
> TechnoSpyke,
> Were are you trying to get the value?
> -in a custom assembly?
> -in the code page of the report?
> -in the expression builder of a control on a report?
> If you're in a report, the report knows the name of the parameter. You
> reference the param by name. So try to assign the value into a variable by
> name.
> I've not done that, but read about it. Search this newsgroup for params
> and
> search BOL for param usage.
> "TechnoSpyke" wrote:
>> Thanks for the reply, although I still have some problems.
>> What I wanted was to set a variable based on a report parameter (assuming
>> that this parameter has already a value), from within the report (code
>> window). The code below was taken from the BOL (Initializing Custom
>> Assembly Objects).
>> <Code>
>> Dim m_myClass As MyClass
>> Protected Overrides Sub OnInit()
>> m_myClass = new MyClass(User!Language, Paramters!Territory)
>> End Sub
>> </Code>
>> This is very similar to what I'm trying to do, yet I get a "[BC30469]
>> Reference to a non-shared member requires an object reference." everytime
>> I
>> reference the Parameters.
>>
>> "rwiethorn" <rwiethorn@.discussions.microsoft.com> wrote in message
>> news:BA485D54-C3F9-453A-8883-CADAD78570B5@.microsoft.com...
>> > TechnoSpyke,
>> > The syntax to reference a report parameter has to be done by
>> > instantiating
>> > a
>> > Reporting Object
>> >
>> > For example:
>> > Dim strParamName as string = "ThisAStringLiteral"
>> > Dim strParamValue as string = "ThisAStringLiteral"
>> > Dim Parameters(0) As Reporting.ParameterValue
>> >
>> > Parameters(0) = New Reporting.ParameterValue
>> > Parameters(0).Name = strParamName
>> > Parameters(0).Value = strUSerID
>> >
>> > For a better documentation, reference the SOAP API call in BOL
>> >
>> > rwiethorn
>> >
>> > "TechnoSpyke" wrote:
>> >
>> >> I'm trying to reference a report parameter in the code window:
>> >>
>> >> Dim CompId As Integer
>> >> CompId = Parameters!CompanyId.Value
>> >>
>> >> It gives me the error:
>> >> [BC30469] Reference to a non-shared member requires an object
>> >> reference.
>> >>
>> >> Any ideas (or alternatives) on how to resolve this? Thank you.
>> >>
>> >>
>> >>
>>
Dim CompId As Integer
CompId = Parameters!CompanyId.Value
It gives me the error:
[BC30469] Reference to a non-shared member requires an object reference.
Any ideas (or alternatives) on how to resolve this? Thank you.TechnoSpyke,
The syntax to reference a report parameter has to be done by instantiating a
Reporting Object
For example:
Dim strParamName as string = â'ThisAStringLiteralâ'
Dim strParamValue as string = â'ThisAStringLiteralâ'
Dim Parameters(0) As Reporting.ParameterValue
Parameters(0) = New Reporting.ParameterValue
Parameters(0).Name = strParamName
Parameters(0).Value = strUSerID
For a better documentation, reference the SOAP API call in BOL
rwiethorn
"TechnoSpyke" wrote:
> I'm trying to reference a report parameter in the code window:
> Dim CompId As Integer
> CompId = Parameters!CompanyId.Value
> It gives me the error:
> [BC30469] Reference to a non-shared member requires an object reference.
> Any ideas (or alternatives) on how to resolve this? Thank you.
>
>|||Thanks for the reply, although I still have some problems.
What I wanted was to set a variable based on a report parameter (assuming
that this parameter has already a value), from within the report (code
window). The code below was taken from the BOL (Initializing Custom
Assembly Objects).
<Code>
Dim m_myClass As MyClass
Protected Overrides Sub OnInit()
m_myClass = new MyClass(User!Language, Paramters!Territory)
End Sub
</Code>
This is very similar to what I'm trying to do, yet I get a "[BC30469]
Reference to a non-shared member requires an object reference." everytime I
reference the Parameters.
"rwiethorn" <rwiethorn@.discussions.microsoft.com> wrote in message
news:BA485D54-C3F9-453A-8883-CADAD78570B5@.microsoft.com...
> TechnoSpyke,
> The syntax to reference a report parameter has to be done by instantiating
> a
> Reporting Object
> For example:
> Dim strParamName as string = "ThisAStringLiteral"
> Dim strParamValue as string = "ThisAStringLiteral"
> Dim Parameters(0) As Reporting.ParameterValue
> Parameters(0) = New Reporting.ParameterValue
> Parameters(0).Name = strParamName
> Parameters(0).Value = strUSerID
> For a better documentation, reference the SOAP API call in BOL
> rwiethorn
> "TechnoSpyke" wrote:
>> I'm trying to reference a report parameter in the code window:
>> Dim CompId As Integer
>> CompId = Parameters!CompanyId.Value
>> It gives me the error:
>> [BC30469] Reference to a non-shared member requires an object reference.
>> Any ideas (or alternatives) on how to resolve this? Thank you.
>>|||TechnoSpyke,
Were are you trying to get the value?
-in a custom assembly?
-in the code page of the report?
-in the expression builder of a control on a report?
If you're in a report, the report knows the name of the parameter. You
reference the param by name. So try to assign the value into a variable by
name.
I've not done that, but read about it. Search this newsgroup for params and
search BOL for param usage.
"TechnoSpyke" wrote:
> Thanks for the reply, although I still have some problems.
> What I wanted was to set a variable based on a report parameter (assuming
> that this parameter has already a value), from within the report (code
> window). The code below was taken from the BOL (Initializing Custom
> Assembly Objects).
> <Code>
> Dim m_myClass As MyClass
> Protected Overrides Sub OnInit()
> m_myClass = new MyClass(User!Language, Paramters!Territory)
> End Sub
> </Code>
> This is very similar to what I'm trying to do, yet I get a "[BC30469]
> Reference to a non-shared member requires an object reference." everytime I
> reference the Parameters.
>
> "rwiethorn" <rwiethorn@.discussions.microsoft.com> wrote in message
> news:BA485D54-C3F9-453A-8883-CADAD78570B5@.microsoft.com...
> > TechnoSpyke,
> > The syntax to reference a report parameter has to be done by instantiating
> > a
> > Reporting Object
> >
> > For example:
> > Dim strParamName as string = "ThisAStringLiteral"
> > Dim strParamValue as string = "ThisAStringLiteral"
> > Dim Parameters(0) As Reporting.ParameterValue
> >
> > Parameters(0) = New Reporting.ParameterValue
> > Parameters(0).Name = strParamName
> > Parameters(0).Value = strUSerID
> >
> > For a better documentation, reference the SOAP API call in BOL
> >
> > rwiethorn
> >
> > "TechnoSpyke" wrote:
> >
> >> I'm trying to reference a report parameter in the code window:
> >>
> >> Dim CompId As Integer
> >> CompId = Parameters!CompanyId.Value
> >>
> >> It gives me the error:
> >> [BC30469] Reference to a non-shared member requires an object reference.
> >>
> >> Any ideas (or alternatives) on how to resolve this? Thank you.
> >>
> >>
> >>
>
>|||I am trying to get the parameter value from the code page of the report. My
code looks like this (modified for this purpose):
Protected Overrides Sub OnInit()
Dim compId As Integer
'following code returns error [BC30469]
compId = Parameters!CompanyId
'following code still returns error [BC30469]
compId = Parameters!CompanyId.Value
'following code doesn't return an error, although not sure if I have the
correct value
compId = Report.Parameters("CompanyId").Value
End Sub
"rwiethorn" <rwiethorn@.discussions.microsoft.com> wrote in message
news:A5C1CEDC-1751-48FA-936A-ADEF01259F22@.microsoft.com...
> TechnoSpyke,
> Were are you trying to get the value?
> -in a custom assembly?
> -in the code page of the report?
> -in the expression builder of a control on a report?
> If you're in a report, the report knows the name of the parameter. You
> reference the param by name. So try to assign the value into a variable by
> name.
> I've not done that, but read about it. Search this newsgroup for params
> and
> search BOL for param usage.
> "TechnoSpyke" wrote:
>> Thanks for the reply, although I still have some problems.
>> What I wanted was to set a variable based on a report parameter (assuming
>> that this parameter has already a value), from within the report (code
>> window). The code below was taken from the BOL (Initializing Custom
>> Assembly Objects).
>> <Code>
>> Dim m_myClass As MyClass
>> Protected Overrides Sub OnInit()
>> m_myClass = new MyClass(User!Language, Paramters!Territory)
>> End Sub
>> </Code>
>> This is very similar to what I'm trying to do, yet I get a "[BC30469]
>> Reference to a non-shared member requires an object reference." everytime
>> I
>> reference the Parameters.
>>
>> "rwiethorn" <rwiethorn@.discussions.microsoft.com> wrote in message
>> news:BA485D54-C3F9-453A-8883-CADAD78570B5@.microsoft.com...
>> > TechnoSpyke,
>> > The syntax to reference a report parameter has to be done by
>> > instantiating
>> > a
>> > Reporting Object
>> >
>> > For example:
>> > Dim strParamName as string = "ThisAStringLiteral"
>> > Dim strParamValue as string = "ThisAStringLiteral"
>> > Dim Parameters(0) As Reporting.ParameterValue
>> >
>> > Parameters(0) = New Reporting.ParameterValue
>> > Parameters(0).Name = strParamName
>> > Parameters(0).Value = strUSerID
>> >
>> > For a better documentation, reference the SOAP API call in BOL
>> >
>> > rwiethorn
>> >
>> > "TechnoSpyke" wrote:
>> >
>> >> I'm trying to reference a report parameter in the code window:
>> >>
>> >> Dim CompId As Integer
>> >> CompId = Parameters!CompanyId.Value
>> >>
>> >> It gives me the error:
>> >> [BC30469] Reference to a non-shared member requires an object
>> >> reference.
>> >>
>> >> Any ideas (or alternatives) on how to resolve this? Thank you.
>> >>
>> >>
>> >>
>>
referencing fields in the code window
Hi, how do I reference a report field in a custom function which is written
in the code window (Report Properties/code tab)? i.e.
Function Something
If Fields!FIELD1_Company.Value = Nothing Then
Return ""
End If
End Function
This example will not work but it's similar to my needs
Thanks
NPSend the field value as a parameter to your function. i.e. re-write the
function as:
Function SomeFunction(byVal MyFieldValue as datatype) as datatype
if MyFieldValue is nothing
...
return ...
End Function
In your report expression, just call the function:
=Code.SomeFunction(Fields!MyField.Value)
Charles Kangai, MCT, MCDBA
"slk55guy" wrote:
> Hi, how do I reference a report field in a custom function which is written
> in the code window (Report Properties/code tab)? i.e.
> Function Something
> If Fields!FIELD1_Company.Value = Nothing Then
> Return ""
> End If
> End Function
> This example will not work but it's similar to my needs
> Thanks
> NP
>|||Thanks Charles, by the way how are you? I was on one of your DTS courses a
couple of years ago in the city. Small world eh?
I think this will work but there is another post (converting crystal code) I
put up here and basically I'm trying to get the same functionality as I would
in a Crystal function.
Happy Christmas
NP
"Charles Kangai" wrote:
> Send the field value as a parameter to your function. i.e. re-write the
> function as:
> Function SomeFunction(byVal MyFieldValue as datatype) as datatype
> if MyFieldValue is nothing
> ...
> return ...
> End Function
> In your report expression, just call the function:
> =Code.SomeFunction(Fields!MyField.Value)
> Charles Kangai, MCT, MCDBA
>
> "slk55guy" wrote:
> > Hi, how do I reference a report field in a custom function which is written
> > in the code window (Report Properties/code tab)? i.e.
> >
> > Function Something
> > If Fields!FIELD1_Company.Value = Nothing Then
> > Return ""
> > End If
> > End Function
> >
> > This example will not work but it's similar to my needs
> >
> > Thanks
> >
> > NP
> >|||Hi,
It should work. I am using something similar myself.
I did a demonstration and some conversations for a customer earlier this
week. The developers are all Crystal users, and they were so impressed with
Reporting Services that they are going to migrate all their sites in UK,
Italy, USA, and Denmark to RS within the next few weeks.
Great to come across you again - we will be running a Reporting Services
course from the end of Feb. I am the author. Check with Learning Tree.
Merry Christmas!
Charles
"slk55guy" wrote:
> Thanks Charles, by the way how are you? I was on one of your DTS courses a
> couple of years ago in the city. Small world eh?
> I think this will work but there is another post (converting crystal code) I
> put up here and basically I'm trying to get the same functionality as I would
> in a Crystal function.
> Happy Christmas
> NP
> "Charles Kangai" wrote:
> > Send the field value as a parameter to your function. i.e. re-write the
> > function as:
> >
> > Function SomeFunction(byVal MyFieldValue as datatype) as datatype
> > if MyFieldValue is nothing
> > ...
> > return ...
> > End Function
> >
> > In your report expression, just call the function:
> > =Code.SomeFunction(Fields!MyField.Value)
> >
> > Charles Kangai, MCT, MCDBA
> >
> >
> > "slk55guy" wrote:
> >
> > > Hi, how do I reference a report field in a custom function which is written
> > > in the code window (Report Properties/code tab)? i.e.
> > >
> > > Function Something
> > > If Fields!FIELD1_Company.Value = Nothing Then
> > > Return ""
> > > End If
> > > End Function
> > >
> > > This example will not work but it's similar to my needs
> > >
> > > Thanks
> > >
> > > NP
> > >
in the code window (Report Properties/code tab)? i.e.
Function Something
If Fields!FIELD1_Company.Value = Nothing Then
Return ""
End If
End Function
This example will not work but it's similar to my needs
Thanks
NPSend the field value as a parameter to your function. i.e. re-write the
function as:
Function SomeFunction(byVal MyFieldValue as datatype) as datatype
if MyFieldValue is nothing
...
return ...
End Function
In your report expression, just call the function:
=Code.SomeFunction(Fields!MyField.Value)
Charles Kangai, MCT, MCDBA
"slk55guy" wrote:
> Hi, how do I reference a report field in a custom function which is written
> in the code window (Report Properties/code tab)? i.e.
> Function Something
> If Fields!FIELD1_Company.Value = Nothing Then
> Return ""
> End If
> End Function
> This example will not work but it's similar to my needs
> Thanks
> NP
>|||Thanks Charles, by the way how are you? I was on one of your DTS courses a
couple of years ago in the city. Small world eh?
I think this will work but there is another post (converting crystal code) I
put up here and basically I'm trying to get the same functionality as I would
in a Crystal function.
Happy Christmas
NP
"Charles Kangai" wrote:
> Send the field value as a parameter to your function. i.e. re-write the
> function as:
> Function SomeFunction(byVal MyFieldValue as datatype) as datatype
> if MyFieldValue is nothing
> ...
> return ...
> End Function
> In your report expression, just call the function:
> =Code.SomeFunction(Fields!MyField.Value)
> Charles Kangai, MCT, MCDBA
>
> "slk55guy" wrote:
> > Hi, how do I reference a report field in a custom function which is written
> > in the code window (Report Properties/code tab)? i.e.
> >
> > Function Something
> > If Fields!FIELD1_Company.Value = Nothing Then
> > Return ""
> > End If
> > End Function
> >
> > This example will not work but it's similar to my needs
> >
> > Thanks
> >
> > NP
> >|||Hi,
It should work. I am using something similar myself.
I did a demonstration and some conversations for a customer earlier this
week. The developers are all Crystal users, and they were so impressed with
Reporting Services that they are going to migrate all their sites in UK,
Italy, USA, and Denmark to RS within the next few weeks.
Great to come across you again - we will be running a Reporting Services
course from the end of Feb. I am the author. Check with Learning Tree.
Merry Christmas!
Charles
"slk55guy" wrote:
> Thanks Charles, by the way how are you? I was on one of your DTS courses a
> couple of years ago in the city. Small world eh?
> I think this will work but there is another post (converting crystal code) I
> put up here and basically I'm trying to get the same functionality as I would
> in a Crystal function.
> Happy Christmas
> NP
> "Charles Kangai" wrote:
> > Send the field value as a parameter to your function. i.e. re-write the
> > function as:
> >
> > Function SomeFunction(byVal MyFieldValue as datatype) as datatype
> > if MyFieldValue is nothing
> > ...
> > return ...
> > End Function
> >
> > In your report expression, just call the function:
> > =Code.SomeFunction(Fields!MyField.Value)
> >
> > Charles Kangai, MCT, MCDBA
> >
> >
> > "slk55guy" wrote:
> >
> > > Hi, how do I reference a report field in a custom function which is written
> > > in the code window (Report Properties/code tab)? i.e.
> > >
> > > Function Something
> > > If Fields!FIELD1_Company.Value = Nothing Then
> > > Return ""
> > > End If
> > > End Function
> > >
> > > This example will not work but it's similar to my needs
> > >
> > > Thanks
> > >
> > > NP
> > >
Monday, February 20, 2012
Reduce size of Reporting Services report within Sharepoint web part
I have a Reporting Services report available in a Windows Sharepoint Services webpart. The report is too large to display in the webpart window requiring the user to use the scroll bars. Is there any way to reduce the size of the report so that fits completely within the webpart without using scroll bars?
Thank you.
David
Sorry, there is no way to currently do this. You would need to redesign the report to make sure that it fits.
Subscribe to:
Posts (Atom)