Sql Server - SSRS Code Shared Variables And Simultaneous Report Execution?

Dec 28, 2009

I've found out that if two instances of an SSRS report run at the same time, any Code variables declared at the class level (not inside a function) can collide. I suspect this may be the cause of our report failures and I'm working up a potential fix.The reason we're using the Code portion of SSRS at all is for things like custom group and page header calculation. The code is called from expressions in TextBoxes and returns what the current label should be. The code needs to maintain state to remember what the last header value was in order return it when unknown or to store the new header value for reuse

View 11 Replies


ADVERTISEMENT

In SSRS Under Report /REport Properties In The Code Tab Trying To Use Code From MSDN Library And Getting BC30465 Imports Statement Must Precede Any Declarations?

Aug 3, 2009

It looks like this: Itis stripping out HTML characters.

Imports System.Text.RegularExpressions
Function GetTextFromHtml(ByVal htmlText As String) As String

[code].....

View 1 Replies

Function Optimization (SSRS Report Code)?

Jan 14, 2010

I came across the following code recently and would like to optimize it:Public Shared Function ComputeLabel(ByVal Action As Integer, ByVal Flag1 As Boolean, ByVal Flag2 As Boolean) As String

Dim Prefix As String = ""
If Flag2 Then
Prefix = "Conditional "

[code].....

View 6 Replies

Call A SSRS Report With Parameter From Program Code?

Apr 11, 2012

I have a SSRS report that contains a parameter called @playerID

what coding I need to add so the report can be run using the parameter?[code]...

View 1 Replies

Selection Type Of Variables Speed Up The Code Execution?

Feb 15, 2012

"Does the selection type of variables speed up the code execution in VB.NET?"For example, I have two same exactly same projects where the first project is running with all Single variables and the other project which running with all Double variables.Is there any difference in term of the speed of code execution?This is because I'm working on a project which is very critical in term of the speed of execution. However, I'm using Double variables for most part of the code.

View 4 Replies

.net - SSRS Report Called From ReportViewer Control Displays No Data In The Report When Called With A Parameter

Apr 11, 2012

Can you look at my coding and let me know what I'm missing or doing wrong?I have a SSRS report that is called from a ReportViewer control and the ProcessingMode for this control is Remote. The report also has 1 parameter in it's DataSet.In the code I placed a MsgBox to make sure the code is finding the parameter and returning the parameter name. I am trying to stick the value of 10 into the parameter for playerID 10. Data for this player does exist.

I believe I need to add some more code to make this work but I'm not sure what else to add.

When the code executes the report is displayed but no data is shown in the report.

[Code]...

View 1 Replies

Trying The Report After Execution It Giving 'numeric Overflow' And The Report Not Coming?

Jan 10, 2011

I am in a great problem, I have an application which working on mulity nodes but same report executing properly except one node. on that node when I trying the report after execution it giving 'numeric overflow' and the report not coming. the node also 32bit version. so what

View 1 Replies

Display Parameter Value On SSRS Report

Aug 25, 2011

I am very new to SSRS.I have added one Parameter named Date on SQL Server Report.i have set parameter value from aspx.cs code behind file.i have drown that parameter on ReportHeader and i want display CurrentDate value on that parameter and i tried =Join(Parameters!Date.Value,", ") but it displays #Error at runtime.i also tried =Join(Parameters!Date.Label,", ") but it displays Nothing.

View 2 Replies

Obraining SSRS Report In The Form Of Pdf?

Mar 11, 2012

I want to get SSRS report in the form of pdf (or any other portable format) automatically. I mean when user presses button, instead of viewing report in Report View, it should be converted to pdf

View 1 Replies

SSRS Report Viewer From VB 2005?

Aug 5, 2010

VS 2005 (VB) SSRS 2005I have set up a functioning report server and can load a server report into a Report Viewer Control (8.0.0.0.) with copy local set to false. It will compile and render on my development machines no problem, but after compile the user gets the exception (System.IO.Filenotfound...could not load file or assembly icrosoft.reportviewer.winforms.

View 1 Replies

.net - SSRS Report Expression - Null Being Treated Like Zero?

Apr 11, 2012

Consider this SSRS value expression :=IIF(First(Fields!MyCol.Value, "MyDataSet")=0, "yes", "no")

MyCol is a Nullable column. I want "yes" to be output only when MyCol equals 0. The code above correctly evaluates to "yes" when MyCol is 0. However, it also evaluates to "yes" when MyCol is Nothing (i.e. NULL in SQL Server). Is this expected behavior ?

I had to resort to the following longer expression to get the desired result :

=IIF(Not(First(Fields!MyCol.Value, "MyDataSet") is Nothing) And First(Fields!MyCol.Value, "MyDataSet")=0, "yes", "no")Is there a shorter version of this which also works ?

View 1 Replies

Asp.net - SSRS Reporting Loads Slowly The 1st Report

Apr 30, 2012

I have a website(asp.net) which displays ssrs reports. Howevery everytime that I try to run the report from the website it takes about 2 min to load, but if I click on the report again , it will load up in seconds. I have tried to run a query that is used by the report and I get the results in second as well.

Is there any configuaration that I need to change or any tsql code that I need to add?

I have gone through to solutions provided here on stackoverflow but still had no luck.

View 1 Replies

String Parameter With Space In Between Passing To SSRS Report?

Nov 2, 2010

my users to view, send (via email), export SSRS reports. I have set up date parameter boxes with calendar drop down and they are able to send via email a URL link that would either display the report via ReportViewer or send a link that would let then view the report in Excel or PDF. This is working just fine. Now I just added another report with a procedure prompt using a text box. Report works fine when I run it in SSRS. If I enter say carotid stent, it displays all records that have the word "carotid stent" in the procedure name field. Now, when I added code using VS 2005 to accommodate this new parameter, here's my code -

ProcedureName = txtProcedureName.Text
msg.Body = "Please click on the URL link to view the report - " + Chr(13) + Chr(10) + "http://SERVERNAME/ReportServer/Pages/ReportViewer.aspx?%2fReports%2f" + ReportName +

[code].....

View 1 Replies

Local SSRS Report (.rdlc) With Object Data Source?

Apr 15, 2011

i created more projects using ReportViewer 2005 and 2008 in local processing mode than I can count on my hands. All Visual Studio 2005 or 2008 ASP.NET web forms projects. I always used some flavor of Object data source for the reports.Tonight, I attempted to add the same functionality to a Visual Studio 2010 MVC 2 project and am failing miserably. First, the Add New Item > Reporting > Report is now a 2008 RDLC and not a 2005 RDLC report. Secondly, when trying to add a DataSet, my usual method of create a data proxy class with static methods that return IEnumerables(Of Stuff) will not show up as sources in the DataSources drop down

Thirdly, my only option is to add a Database connection. There is no "Object Data Source" to pick from: Like I kind of alluded to, I have no problems whatsoever actually rendering a report using the ReportViewer control. What I can't do is figure out how set up a Data Source in these new-fangled 2008 reports with Visual Studio 2010 so that I can pump a list of domain objects into the ReportViewer and display the report.

UPDATE: With some more research, I've found that MVC projects do not allow object data sources to be used within them. One solution for my issue is to create a separate project in the solution -- a web application, a service, or even just a class library, to add the report to and design it accordingly.'m still looking for alternatives here, so don't run away too fast!

View 3 Replies

Asp.net - Unable To Load Control With Report Viewer (for SSRS 2k5) And Vs2010?

Oct 5, 2011

I am currently updating an application from Vs2005 to Vs2010. I'm having an issue rendering the report viewer (using SSRS 2k5) in the browser.When the report is loaded, I get bombarded with popups that say "Unable to load control". After all the popups, the report eventually load (thank god for firefox's prevent additional popup checkbox), yet none of the buttons work (each button causes the popup).

here is my code

html
<asp:Button ID="test" runat="server" Text="Run Report" />
<rsweb:ReportViewer ID="ReportViewer1" Width="700" Height="900" runat="server" />

[code]....

View 1 Replies

Use Derived Class Shared Variables In Shared Methods Of Base Class?

Jun 4, 2010

I am trying to add shared members in derived classes and use that values in base classes...

I have base

class DBLayer
public shared function GetDetail(byval UIN as integer)
dim StrSql = string.format("select * from {0} where uin = {1}", tablename, uin)
end function
end class

[Code]..

currently there is error using the tablename variable of derived class in base class but i want to use it i dun know other techniques if other solutions are better then u can post it or u can say how can i make it work? confused...

View 2 Replies

Variables Would Improve Script Execution Time?

Jun 20, 2012

I was updating an old .aspx.vb script that was originally written with dynamically typed variables, like this:

Dim price I updated them to the following format (along with some IsDBNull checks to compensate):

Dim price As String After doing this to all of my variables, the script appeared to run noticeably faster. Is this a real effect of static typing, or is it just a coincidence?

View 1 Replies

Sql Server - SSRS: How To Count True Rows

May 18, 2009

I have a report with a dataset that has a column with booleans. In the table footer I want to display x / y where x is how many rows that were true and y is how many rows there was total.

[Code]...

View 3 Replies

Reference A Report Variable In The Report Properties Code Window Of A Local Report?

Apr 19, 2011

how I can reference a report variable in the Report Properties Code Window of a local report? I have tried Variables!Claimant.Value (for a variable called Claimant) but I get an error "Reference to a non-shared member requires an object reference." I have tried qualifying it with Report. and also with the report name in front of it but I get errors with this also.I have the variable CLaimant defined in the Variables section of the Report Properties.

View 3 Replies

Difference Between SQL Server Native Client And SQL Server DSN To Support SP Execution?

Jul 9, 2009

I wrote a VB code to call a sp in sql server 2005, which returns a recordset as follows:Dim objRecordset As ADODB.Recordset Set objComm = New ADODB.Command

Set objRecordset = objComm.Execute If Not objRecordset.BOF And Not objRecordset.EOF Then
Set objRecordset = objRecordset.NextRecordset I need to continue to get next recordset since there are many select statements inside the sp which I need to get the data. The code works fine when I create the DSN using SQL Server but it does not work when using the connection string or SQL Server Native Client DSN. It either breaks at Set objRecordset = objComm.Execute ( connection string )or at If Not objRecordset.BOF And Not objRecordset.EOF Then(SQL native client )

I have worked on this for a couple of days now and could not figure it out.Is this a bug in SQL Native Client or something related to some configuration on the database side? IS there a way I can change the connection property to get this working using SQL native client or connection string?

View 1 Replies

.net - Shared Variables Among Subclasses?

Jan 18, 2011

I have a problem with inherited classes. Have a look at the following VB.NET 2.0 / VS 2005 code:

MustInherit Class templateclass
Public Shared x As String
End Class
Class child1

[code]....

The templateclass has a shared variable x which is of course inherited by the child classes. But I wonder that all child classes share only one x! Until now I thought that shared variables are only shared among the instances of a class, not among all childs. This is very annoying because I have a base class which I need in two slightly different versions and they should not "share the shared" variables. And because the classes have a lot of shared variables, shadowing each in the childs would be very..

View 1 Replies

Shared Variables And DLL Usage

Oct 20, 2011

I'm trying to split some prior crafted code into a DLL. It's a simple logger system.There are a few things that need to be shared with the main form in the project, so I set them up as a shared variable, but I don't use shared stuff often, and I worry it will cause variable conflicts regarding scope. I figured I would make a post here about it and see if someone can explain what I don't fully understand.Since this is a logger it will be used a couple of places. Other DLLs that need logging may reference it through a instanced object and project reference. My main form will also have an instanced object and a reference to the logger libary.Since one of my properties is a connection string and it's shared, does this mean that a instance of my logger class inside a DLL will have the same shared values as a instance on my main UI form? Or will the fact that the instance is inside of a DLL provide the scope boundary I need?

View 1 Replies

Local Variables Are Automatically Shared

Mar 13, 2012

I was reviewing the MSDN documentation on VB.Net's little-used Static keyword for local variables. My question is not about how Static works (I personally plan to avoid using it as it seems like it could cause grief to future programmers who don't notice the side-effects.) My question is about this statement in the docs:[code]So can anyone interpret the above statement for me in a way that makes sense? Or is this a bug in the documentation? It's been there since the VS 2005 version of the docs and is still present in the Visual Studio 11 version.

View 2 Replies

Access Shared Variables Of A Class?

Jul 23, 2009

I am making a small application in which i have added a class module and a window forms in vb.net. i want to acess the shared variables and mathods of class without making any object.

View 8 Replies

Difference Between Static And Shared Variables In .NET?

Jun 22, 2009

exact diff b/t Static v/s Shared variables in VB.NET?

View 3 Replies

Inheriting Shared Variables/properties?

Nov 29, 2009

basically i was wondering if we could inherit shared variables but restrict its scope to only that of the class itself.

Class A
Public Shared shared_variable as Boolean = true
End Class

[code]....

when i do this A.shared_variable = False, B's shared_variable also becomes false. how do i stop this?i cannot remove the Shared keyword because shared_variable should be able to be accessed without an instance of the class?

View 7 Replies

Shared Variables And Garbage Collection?

Feb 21, 2012

I've been doing some reading on garbage collection in .NET and I was hoping for some clarification. So, as I understand it if I declare a public shared class variable, the GC will never get rid of it. Is this correct?Also, what then of private variables? Take the following example:

public class myClass
private shared myString As String
public sub ChangeString(newString As String)

[code].....

View 4 Replies

VS 2010 Shared Variables And Threading Pin?

Mar 12, 2012

So I am currently attempting to wrap my head around create multi-threaded programs and I am currently running into an issue when using a Shared variable across multiple threads.The program is structured as follows: Public Shared IsActive as Boolean

Main Thread = GUISets the Value of IsActive through a Button ControlTwo Worker ThreadsBoth threads are while loops that read the IsActive Boolean Ex:While IsActive = True Do Work End WhileHowever when I change the value of IsActive from the Main Thread it causes the worker threads to stop (ThreadState = 16).

I have been reading that I have to synchronize/lock shared resources and have tried SyncLock and Monitor methods without success (it is entirely possible I am not using the above correctly, so If someone could provide proper examples for the above situation using the mentioned methods please share them).

View 4 Replies

Accessing Variables From A Public Shared Subroutine?

Feb 15, 2009

I have created a public shared subroutine in a class file in asp.net 2 (vb.net) web site app_folder.The subroutine retrives some values from a sql database via an sql query and assigns the datareader field values to several variables The problem is I can't seem to assign the variables from the subroutine to the variables and textbox controls in the asp.net page I am calling the subroutine from. The textbox text value just appear blank.By the way, if I response.write the variables in the subroutine they appear populated by the sql data reader.

View 9 Replies

Lifespan And Scope Of Shared Variables And Functions?

Jul 31, 2010

Are the following three the same upon compilation

dim x as new assigningfunction
dim x as new assigningfunction()
dim x as assigningfunction = new assigningfunction()

[code].....

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved