Showing posts with label cant. Show all posts
Showing posts with label cant. Show all posts

Tuesday, March 27, 2012

Embedded Code: whats the trick?

OK, I give up -- I can't get this to work. I am trying to put the following function into my report (RS 2005):

Public Shared Function ReportTotal(ByVal IsUnitCost As Boolean,ByVal TotalDirectCosts As Double, ByVal SalaryBenefitsTotal As Double, ByVal IndirectRate As Double, ByVal SS_Screened As Integer, ByVal UnitRate As Double) As Double
If IsUnitCost Then
Return SS_Screened * UnitRate
Else
Return TotalDirectCosts + SalaryBenefitsTotal * IndirectRate
End If
End Function

Supposedly, to use this code you put something like this for the expression in one of your fields: =Code.ReportTotal(...paramaters...)

However, when I type in "Code.", "ReportTotal" is not in the list provided by the Intellisense. If I type it in anyway, there is a red squiggly line under "ReportTotal", and then if I try to preview the report, I get an error: "The definition of report [report name] is invalid. Exception of type 'Microsoft.ReportingServices.ReportProcessing.ReportProcessingException' is thrown".

Real helpful. Does this mean there's an error in the Visual Basic? I tried to access the function improperly? What?

I tried with and without "Public", with and without "Shared". Same result.

Can anyone help??

I'm not familiar yet with 2005, but in 2000, there is a tab in the 'Report Properties' dialogue under the 'Report' menu.

If you put the code in there, IE:

Function FormatDateInterval(ByVal value As DateTime) As String
Return Year(value) & "-" & Month(value)
End Function

You can call the function by using something like:

= Code.FormatDateInterval(First(Fields!SaleDate.Value, "Foreclosures"))

Like I said, it works well in 2000. Hope it helps.

|||

Actually I found the answer. My code was fine -- it just doesn't get compiled until you deploy the report. I was testing it out in "preview" mode, and that's why it wasn't working.

Needless to say, this little feature is not documented anywhere!

sql

Thursday, March 22, 2012

e-mail subscription quit working - can't figure out why

Hi All,
I am using SQL Reporting Services MOM Reporting. I set up some reports and
they have been delivering flawlessley now for over a month. Now this morning
I got the error:
"Failure sending mail: The transport failed to connect to the server. "
It isn't descriptive enough to know what exactly failed. I can ping and
telnet to the SMTP port of the mail server and not being blocked. Also, the
same settings are being used for alerts from MOM without any problems. Is
there a way to run a test or get a better log to know what the error is?
This error is useless.
Thanks,
--GREG--I had experienced similar behavior. We resolved this by changing the
SMTP server specified in the Email Settings within Report Services
Configuration tool from the server name to the mail server's IP
address. Hope this helps!
Midas

Wednesday, March 7, 2012

EM locks up

On certain occasions, when I'm running a long-running query in Query
Analyzer, I can't get in to Enterprise Manager. What happens is the list of
tables can't be enumerated until the long-running query finishes. What's
odd to me is that the query only affects 1 or 2 tables. So why can't I get
into EM until this job finishes?
Thanks, Andre
Hi,
This might be because your ISQLW.EXE in client machine will be using the
CPU and Memory fully. If you have better processor PIII or higher +
512 MB ram you should have such issues.
Check your virtual memory definition in your client machine. Always try to
run the long running queries in text result mode.
Thanks
Hari
MCDBA
"Andre" <AndreGetsEnoughSPAM@.nospam.com> wrote in message
news:#O07UKgLEHA.1556@.TK2MSFTNGP10.phx.gbl...
> On certain occasions, when I'm running a long-running query in Query
> Analyzer, I can't get in to Enterprise Manager. What happens is the list
of
> tables can't be enumerated until the long-running query finishes. What's
> odd to me is that the query only affects 1 or 2 tables. So why can't I
get
> into EM until this job finishes?
> Thanks, Andre
>
|||Actually, the long-running query is running on a different box. For
example, if you and I were in the same office, and I was running the query,
you might not be able to get into EM.
Andre
"Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
news:%23udrVlgLEHA.1032@.tk2msftngp13.phx.gbl...[vbcol=seagreen]
> Hi,
> This might be because your ISQLW.EXE in client machine will be using the
> CPU and Memory fully. If you have better processor PIII or higher +
> 512 MB ram you should have such issues.
> Check your virtual memory definition in your client machine. Always try to
> run the long running queries in text result mode.
> Thanks
> Hari
> MCDBA
>
>
> "Andre" <AndreGetsEnoughSPAM@.nospam.com> wrote in message
> news:#O07UKgLEHA.1556@.TK2MSFTNGP10.phx.gbl...
list[vbcol=seagreen]
> of
What's
> get
>
|||Hi,
Means , you will be able to open the enterprise manager, but while expanding
your SQL Server it just hangs..
Can you check the SQLSERVR.exe CPU usage in server. If it is 100% then the
performance will be slow and cause a time out. The CPU usage in the log
running query can be minimized by tuning the query by effect sql statement
and adding proper indexes.
Did you installed SP3 in SQL server machine. If not install SP3.
Thanks
Hari
MCDBA
"Andre" <AndreGetsEnoughSPAM@.nospam.com> wrote in message
news:ep0$dzgLEHA.3292@.TK2MSFTNGP11.phx.gbl...
> Actually, the long-running query is running on a different box. For
> example, if you and I were in the same office, and I was running the
query,[vbcol=seagreen]
> you might not be able to get into EM.
> Andre
>
> "Hari Prasad" <hari_prasad_k@.hotmail.com> wrote in message
> news:%23udrVlgLEHA.1032@.tk2msftngp13.phx.gbl...
the[vbcol=seagreen]
to[vbcol=seagreen]
> list
> What's
I
>
|||sp3a was installed shortly after it was released. Yes, I (or other users)
can launch EM, can expand the server, but can't get a list of tables when
trying to expand the tables folder. Query analyzer works just fine. CPU
usage on the server is typically low when this is happening. sp_who2 shows
that the long running query is blocking the EM process. I just can't figure
out why a query that "might" have a lock on a table would prevent the list
of tables from being displayed in EM.
Andre
"Hari" <hari_prasad_k@.hotmail.com> wrote in message
news:ODjXezpLEHA.3052@.TK2MSFTNGP12.phx.gbl...
> Hi,
> Means , you will be able to open the enterprise manager, but while
expanding[vbcol=seagreen]
> your SQL Server it just hangs..
> Can you check the SQLSERVR.exe CPU usage in server. If it is 100% then the
> performance will be slow and cause a time out. The CPU usage in the log
> running query can be minimized by tuning the query by effect sql statement
> and adding proper indexes.
> Did you installed SP3 in SQL server machine. If not install SP3.
> Thanks
> Hari
> MCDBA
> "Andre" <AndreGetsEnoughSPAM@.nospam.com> wrote in message
> news:ep0$dzgLEHA.3292@.TK2MSFTNGP11.phx.gbl...
> query,
> the
try[vbcol=seagreen]
> to
can't
> I
>
|||Hi,
Do you have the problem yet? I am having a similar problem. I have 2 machines:
1 .- SQL server 2000 + SP3, without problems
2 .- SQL Server 2000 + SP3a, with performance problems
I am reinstalling Sql server + SP3 and I am testing machine 1. I am sending you information.
Lina
************************************************** ********************
Sent via Fuzzy Software @. http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...

EM can't connect to server

I suddenly can't work with my Enterprise Manager.
It tells me that log in failed - Can't access user's default database.
What can I do about it?
I really need to fix it fast.
Thanks a lot
Shimon.Shimon Sim wrote:
> I suddenly can't work with my Enterprise Manager.
> It tells me that log in failed - Can't access user's default
> database.
> What can I do about it?
> I really need to fix it fast.
> Thanks a lot
> Shimon.
Connect from Query Analyzer and change the default database for the user
you are using to login from SQL EM.
sp_defaultdb 'user', 'db'
David Gugick
Quest Software
www.imceda.com
www.quest.com|||I can't connect using QA either.
Thanks,
Shimon.
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:u6P6UNmYFHA.2264@.TK2MSFTNGP10.phx.gbl...
> Shimon Sim wrote:
> Connect from Query Analyzer and change the default database for the user
> you are using to login from SQL EM.
> sp_defaultdb 'user', 'db'
>
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com|||Shimon Sim wrote:
> I can't connect using QA either.
> Thanks,
> Shimon.
Log in as a different user in QA... one with admin rights. Then change
the default database.
David Gugick
Quest Software
www.imceda.com
www.quest.com|||Thanks
I connected using Visial Studio
Shimon.
"David Gugick" <david.gugick-nospam@.quest.com> wrote in message
news:u6P6UNmYFHA.2264@.TK2MSFTNGP10.phx.gbl...
> Shimon Sim wrote:
> Connect from Query Analyzer and change the default database for the user
> you are using to login from SQL EM.
> sp_defaultdb 'user', 'db'
>
> --
> David Gugick
> Quest Software
> www.imceda.com
> www.quest.com|||Hi Shimon,
Thanks for your posting!
From your descriptions, I understood you are not able to connect SQL Server
via SQL Server Enterprise Manager. Have I understood you? If I have
misunderstood your concern, please feel free to point it out.
First of all, would you please help me clarify the words "I connected using
Visial Studio"? You have said you are working wiht your Enterprise Manager?
When do you meet the error message "Can't access user's default database"?
More detailed informaiton, I believe, will make us closer to the
resolution. Please help me collecting the information by answering the
questions below
What account you are using to connect this SQL Server?
The SQL Server machine is in LAN or Internet?
You may refer the Knowledge Base article below
How to troubleshoot connectivity issues in SQL Server 2000
http://support.microsoft.com/kb/827422
BTW, if this issue is urgent, I would like to recommand you opening an
incident with PSS team direcly and there will be a dedicated Support
Professional working for you. Please be advised that contacting phone
support will be a charged call.
To obtain the phone numbers for specific technology request please take a
look at the web site listed below.
http://support.microsoft.com/defaul...US;PHONENUMBERS
If you are outside the US please see http://support.microsoft.com for
regional support phone numbers.
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are always here to be of
assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
Business-Critical Phone Support (BCPS) provides you with technical phone
support at no charge during critical LAN outages or "business down"
situations. This benefit is available 24 hours a day, 7 days a w to all
Microsoft technology partners in the United States and Canada.
This and other support options are available here:
BCPS:
https://partner.microsoft.com/US/te...erview/40010469
Others: https://partner.microsoft.com/US/te...upportoverview/
If you are outside the United States, please visit our International
Support page: http://support.microsoft.com/common/international.aspx
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.|||Michael
Thanks for your response.
I resolved the issue.
What happen I deleted my default database. And all the users for the SQL
Server had that database as default. So every program (EM,QA) that uses
default database in order to operate was throwing errors that they can't
login to the server.
So I decided to create database project in VS that uses specifies database
for login and not default and changed default database for all the users.
Thanks again.
Shimon.
"Michael Cheng [MSFT]" <v-mingqc@.online.microsoft.com> wrote in message
news:NIh58$oYFHA.2476@.TK2MSFTNGXA01.phx.gbl...
> Hi Shimon,
> Thanks for your posting!
> From your descriptions, I understood you are not able to connect SQL
> Server
> via SQL Server Enterprise Manager. Have I understood you? If I have
> misunderstood your concern, please feel free to point it out.
> First of all, would you please help me clarify the words "I connected
> using
> Visial Studio"? You have said you are working wiht your Enterprise
> Manager?
> When do you meet the error message "Can't access user's default database"?
> More detailed informaiton, I believe, will make us closer to the
> resolution. Please help me collecting the information by answering the
> questions below
> What account you are using to connect this SQL Server?
> The SQL Server machine is in LAN or Internet?
> You may refer the Knowledge Base article below
> How to troubleshoot connectivity issues in SQL Server 2000
> http://support.microsoft.com/kb/827422
> BTW, if this issue is urgent, I would like to recommand you opening an
> incident with PSS team direcly and there will be a dedicated Support
> Professional working for you. Please be advised that contacting phone
> support will be a charged call.
> To obtain the phone numbers for specific technology request please take a
> look at the web site listed below.
> http://support.microsoft.com/defaul...US;PHONENUMBERS
> If you are outside the US please see http://support.microsoft.com for
> regional support phone numbers.
> Thank you for your patience and cooperation. If you have any questions or
> concerns, don't hesitate to let me know. We are always here to be of
> assistance!
>
> Sincerely yours,
> Michael Cheng
> Microsoft Online Partner Support
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ========================================
=============
> Business-Critical Phone Support (BCPS) provides you with technical phone
> support at no charge during critical LAN outages or "business down"
> situations. This benefit is available 24 hours a day, 7 days a w to all
> Microsoft technology partners in the United States and Canada.
> This and other support options are available here:
> BCPS:
> https://partner.microsoft.com/US/te...erview/40010469
> Others: https://partner.microsoft.com/US/te...upportoverview/
> If you are outside the United States, please visit our International
> Support page: http://support.microsoft.com/common/international.aspx
> ========================================
=============
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>|||Hi Shimon,
You are welcome and it's great to hear you have resolved this!
If you have any questions or concerns, don't hesitate to let me know. We
are always here to be of assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
Business-Critical Phone Support (BCPS) provides you with technical phone
support at no charge during critical LAN outages or "business down"
situations. This benefit is available 24 hours a day, 7 days a w to all
Microsoft technology partners in the United States and Canada.
This and other support options are available here:
BCPS:
https://partner.microsoft.com/US/te...erview/40010469
Others: https://partner.microsoft.com/US/te...upportoverview/
If you are outside the United States, please visit our International
Support page: http://support.microsoft.com/common/international.aspx
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.

Wednesday, February 15, 2012

Editing Stored Procedures

Probably the wrong NG, but I can't find one for Visual Studio.
How are you supposed to edit SP's in VS 2003? I cannot find the option
anywhere. I can do it from Query Analyzer simply enough, but flipping back
and forth is a pain.
Hi Rock,
In Visual Studio 2003, you can create and edit a stored procedure via the
following steps:
1. Click View menu and select "Server Explorer";
2. Right click "Data Connections", click "Add Connection...", in the "Data
Link Properties" window, input the server name and select the database;
3. Expand the database connection "<server name>.<database name>.dbo",
expand "Stored Procedures", double click the stored procedure for browsing
or editing. If you want to create a new stored procedure, just right click
"Stored Procedures" and click "New Stored Procedure".
Hope this helps. If you have any other questions or concerns, please feel
free to let me know. It is my pleasure to be of assistance.
Best regards,
Charles Wang
Microsoft Online Community Support
================================================== ===
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ====