Showing posts with label entry. Show all posts
Showing posts with label entry. Show all posts

Thursday, March 22, 2012

Conection Error

Whenever I try and connection to SQL Server, I keep
getting the following error: The procedure entry point
SetfilesecurityI could not be located in the dynamic link
library Msdart.dll. I have just installed MDAC 2.8 and re-
installed SQL Server, but I'm still encountering the same
problem. I am running SQL Server Personal edition SP3a on
Windows XP. Thanksmsdart.dll is an MDAC file. Try reinstalling MDAC, maybe something you
installed later wrote over that file.
Use the MDAC component checker (from microsoft.com/downloads) to see if you
have a file mismatch with msdart.dll.
Cindy Gross, MCDBA, MCSE
http://cindygross.tripod.com
This posting is provided "AS IS" with no warranties, and confers no rights.|||I had (have) the same thing happening to me-2.8 hosed Delphi's ado
connection component. I always get this error when I try to create an
ado connection object.
I was able to fix it by manually replacing the files and changing
registry settings. MDAC will not rollback, the files are under
protection so I had to get a program to turn off Windows File
Protection, it was a huge hassle.
You need to get the 2.7 installer, extract the files, run the comparison
utility to identify what to change, get the utility to turn off file
protection, copy the files (and to dllcache), change the registry.
It worked for a day and now it's broken again. aargh!
the rule: DON'T UPGRADE TO MDAC 2.8.
I'm contemplating reformatting my hard disk and reinstalling
Win2K...WITHOUT MDAC 2.8.
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!|||Hi,
Did you ever figure out how to get past this error? I'm getting the
same error message, although the actual situation is somewhat different.
I just posted the following message at
http://forums.aspfree.com/t35176/shtml:
This error just started occuring today on an application I've been
working on for two years. The error message I receive is this:
The procedure entry point SetFileSecurityI could not be located in the
dynamic link library MSDART.dll.
The error occurs when I call:
System.Web.Mail.SmptMail.Send(message).
The error only occurs if I previously set the following property:
System.Web.Mail.SmtpMail.SmtpServer = "serverName"
I can't quite place my finger on the source of the problem. Here are two
potential causes of the problem:
A couple weeks ago, I had installed the 2005 Express verions of SQL
Server, c#, and Web Developer, but didn't notice any major problems
until now. Installing SQL Server 2005 caused a few minor issues with
Enterprise Manager on the Sql Server 2000 instance, but I was able to
solve those. I uinstalled those products, and repaired the installation
of VS2003 to no avail.
I almost ended up reformatting my hard drive over the weekend, after I
attempted to install a personal instance of Oracle 10g. After completing
the install, I was unable to reboot my computer. The system would boot
up, give about 150 warnings about delayed writes failing, and then crash
with STOP 0x00000027. The system was even hanging on reboot to safe
mode. It took me several hours to actually get my system to a bootable
state...After rebuilding the Master Boot Record, uninstalling oracle
from safe mode, about 25 reboots, a bios reset, yada, yada, yada...I
was back in.
I can't find much information on this error. One person here reported
the same problem when accessing SQL Server:
http://www.codecomments.com/sql/mes...C8d1e01c40513%2
4864b0f00%24a001280a%40phx.gbl %3E
They suggested it may have to do with installing MDAC 2.8, but I'm
pretty sure I've had that installed for a while. Anyways, the server is
running MDAC 2.8 without a problem, so I'm pretty sure it is something
else. Does anybody have any ideas?
*** Sent via Developersdex http://www.codecomments.com ***
Don't just participate in USENET...get rewarded for it!

Monday, March 19, 2012

Conditional sum based on visibility

Hi,

I have a report that is conditionally showing a textbox based on the previous entry that is working correctly.

My issue is that the non visible entries are still being added to my Sum statement at the end of the report.

I need a way to exclude an entry based on its visibility.

Any help would be greatly appreciated.

Are you using the Previous aggregate to get the previous entry? If you are not, then you can add a conditional, using the same expression for determining the visibility, to the SUM aggregate. For example, =SUM(IIF(HiddenExpression, 0, Fields!FieldName.Value))|||

Thanks for the response.

I am using the Previous function to control the visibility. The report needs to show the first entry for each particular company code, but not the duplicate entries.

For example: =Previous(Fields!Company_code.Value) = Fields!Company_code.Value

I tried adding a conditional with the same expression to determine if it should be included in the Sum, but that does not work.

Any other suggestions?

Thanks!

|||

Try handling it in the code (Report -> Report Properties -> Code)

Declare a public shared variable (integer/float) in the code and write a public function to sum up the values based on current company code and previous company code. Your code will look something like this in VB.Net:

Public Shared SumTotal as Integer

SumTotal = 0

Public Function CalculateSum(isCompanyCodeSame as Boolean, FieldValue as Integer) As String

If isCompanyCodeSame = False Then

SumTotal = SumTotal + FieldValue

End If

CalculateSum = ""

End Function

and

append this expression to any of the textboxes in your detail row:

Fields!FieldName.Value & Code.CalculateSum(Fields!Company_code.Value=Previous(Fields!Company_code.Value), Fields!FieldToBeSummed.Value)

And use Code.SumTotal to get the sum.

Shyam

|||

Thanks for the code!

It is working correctly now.

|||

I used the same method to stop displaying rows in a table after the 10th row. It works fine in VS 2005 but it acts wierd when I publish it to the production server. I count up the rows that are visible...

Public Shared VisibleRowTotal as Integer=0

Public Function CountVisibleRow(isVisible as Boolean) As String
If isVisible = False Then
VisibleRowTotal = VisibleRowTotal + 1
End If
CountVisibleRow = ""
End Function

Then I added a column in my report table to call the code...

=Code.CountVisibleRow(ReportItems!textbox54.Value) & " " & Code.VisibleRowTotal

Then I based my row visibility on the code value.

=IIF(Code.VisibleRowTotal>=10, True,False)

To get it to work the first time I had to rename the original report on the production server and then upload the new report. Once several users start hitting the report then no rows are visible or it's intermittent.

I'll admit I've have never used custom code in a report before. Is there something different I need to do when uploading an rdl with custom code? Am I handling the custom code properly?

|||
You should change the VisibleRowTotal variable to not be Shared. Having it be shared or static will cause each instance of the report to share the same total value. So, removing the modifier will allow each report instance to execute independently from one another.

Ian|||

Thanks Ian.

I had the issue where my totals were correct for the first time the report loaded, but the totals just kept incrementing when I used different filters on the report.

Taking Shared off of the variable resolved the issue.