Showing posts with label access. Show all posts
Showing posts with label access. Show all posts

Thursday, March 29, 2012

Filter duplicate records

Hi

Have been given the task of trying to write reports in Crystal after someone found out I new one of Access from the other.

The report is taking data from SAGE database with custom written tables. The problem I have is that one of the custom table has not been well written allowing multiple identical entries.

The table in question holds data for each delivery note posted on SAGE. In this table are field I need relating to Product Number, Quantity and Nett Weight. Due to the way data has been stored I can have up to 16 records (effectively duplicates - same part number, quantity, nett weight) when I only want one record displayed.

Is it possible to write a filter that basically says that if for a given delivery number there is more than 1 record with the same Product Number, Quantity then filter the number of records down to one? If this is not possible, would it be possible to do the same but specifying to pick the record with the highest nett weight? assuming that if there were two identical records for all of the aforementioned fields that it could still bring this down to one?You can do it in your Query:

SELECT ProductNumber, Quantity, 'NettWeight' = MAX(NettWeight)
FROM TableName
GROUP BY ProductNumber, Quantity

(I use SQL Server 7, so you may need to adjust the syntax a bit to work in your database.)

- or -

You can do it in Crystal Reports. There should be a property called SuppressDuplicates (or something similar, I don't have CR in front of me). If you set it to True, Crystal should display only unique records. I think that property is available for fields as well as sections, but I'm not sure. Also, I use CR 8.5, so if you're using a different version, SuppressDuplicates may not exist at all or it may be called something different.

Wednesday, March 21, 2012

Files Needed to Distribute CR 8.5 at run time

I package my Project using Deployment Wizard to create a set up file. I'm using VB6 and Crystal Report 8.5 and Access 2000 as my database. After installing my application in other computer I notice that all my Crytal Report 8.5 is not running. What other Files should I need?

Thanks

Noel
www.roadcs.comHi,

Refer the help file "Runtime.hlp", it's inbuild in crystal report setup.

Thanks & Regards,
K.Babu

Originally posted by Noel Rico
I package my Project using Deployment Wizard to create a set up file. I'm using VB6 and Crystal Report 8.5 and Access 2000 as my database. After installing my application in other computer I notice that all my Crytal Report 8.5 is not running. What other Files should I need?

Thanks

Noel
www.roadcs.com

Wednesday, March 7, 2012

File System Access With Custom Assembly Method

Hello All,
I am building a dashboard report that will read through the file system
for a record's document folder on our server and report to the user if
there are any files missing in the directory. I am using a custom
assembly to house the method. When using the assembly in the dev
environment, everything works just fine. When the report is deployed
to the server, the assembly seems to work fine, but on closer
inspection, it looks like I cannot read the file system. Can someone
point me to a link that can bypass this (safely)? Do I need to suck it
up and create an ASP.NET app that does the same thing?
Thanks
JeffHi Jeff.
You need to change the "rssrvpolicy.config" to permit file access to your
assembly. In Visual Studio you have all permissions, but running on the
report server permission checks is performed.
In "rssrvpolicy.config" you can see several codegroups giving other
assemblies certain permissions. The file is found in "%SQL
SERVER%\MSSQL\Reporting Services\ReportServer"
You can put you CodeGroup below the one ending with Url="$CodeGen$/*". Se
sample:
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="$CodeGen$/*"
/>
</CodeGroup>
<CodeGroup
class="UnionCodeGroup"
version="1"
PermissionSetName="FullTrust"
Name="MyCodeGroup"
Description="Code group for my assembly">
<IMembershipCondition
class="UrlMembershipCondition"
version="1"
Url="C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportServer\bin\MyAssembly.MyNamespace.MyClass.dll"
/>
</CodeGroup>
This way you give you assemmbly Full thrust. To limit persmission to file
access you can change PermissionSet to "FileIOPermission".
Kind regards
Martin Bring (Sogeti AB)
*****************
"jeffjones176@.gmail.com" wrote:
> Hello All,
> I am building a dashboard report that will read through the file system
> for a record's document folder on our server and report to the user if
> there are any files missing in the directory. I am using a custom
> assembly to house the method. When using the assembly in the dev
> environment, everything works just fine. When the report is deployed
> to the server, the assembly seems to work fine, but on closer
> inspection, it looks like I cannot read the file system. Can someone
> point me to a link that can bypass this (safely)? Do I need to suck it
> up and create an ASP.NET app that does the same thing?
> Thanks
> Jeff
>

Sunday, February 26, 2012

File Share Delivery of subscription fails

I have a subscription that will not deliver to a file share. I've ensured
that the windows acct for share access for the subscription has read/write to
the share.
The error I get in report manager is:
Failure writing file <report name>: The Report Server has encountered a
configuration error; more details in the log files
The log file says:
ReportingServicesService!library!10ec!08/08/2005-12:26:05:: i INFO: Call to
RenderFirst( '/My Reports/<report name>)
ReportingServicesService!library!10ec!08/08/2005-12:26:06:: e ERROR:
Throwing
Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
The Report Server has encountered a configuration error; more details in the
log files, AuthzInitializeContextFromSid: Win32 error: 234;
Info:
Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
The Report Server has encountered a configuration error; more details in the
log files
ReportingServicesService!library!10ec!08/08/2005-12:26:06:: i INFO:
Initializing EnableExecutionLogging to 'True' as specified in Server system
properties.
ReportingServicesService!subscription!10ec!08/08/2005-12:26:06::
Microsoft.ReportingServices.Diagnostics.Utilities.RSException: The Report
Server has encountered a configuration error; more details in the log files
-->
Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
The Report Server has encountered a configuration error; more details in the
log files
at
Microsoft.ReportingServices.Authorization.Native.GetAuthzContextForUser(IntPtr userSid)
at Microsoft.ReportingServices.Authorization.Native.IsAdmin(String
userName)
at
Microsoft.ReportingServices.Authorization.WindowsAuthorization.IsAdmin(String
userName, IntPtr userToken)
at
Microsoft.ReportingServices.Authorization.WindowsAuthorization.CheckAccess(String
userName, IntPtr userToken, Byte[] secDesc, ReportOperation requiredOperation)
at Microsoft.ReportingServices.Library.Security.CheckAccess(ItemType
catItemType, Byte[] secDesc, ReportOperation rptOper)
at
Microsoft.ReportingServices.Library.RSService._GetReportParameterDefinitionFromCatalog(CatalogItemContext
reportContext, String historyID, Boolean forRendering, Guid& reportID, Int32&
executionOption, String& savedParametersXml, ReportSnapshot&
compiledDefinition, ReportSnapshot& snapshotData, Guid& linkID, DateTime&
historyDate)
at
Microsoft.ReportingServices.Library.RSService._GetReportParameters(String
report, String historyID, Boolean forRendering, NameValueCollection values,
DatasourceCredentialsCollection credentials)
at
Microsoft.ReportingServices.Library.RSService.RenderAsLiveOrSnapshot(CatalogItemContext
reportContext, ClientRequest session, Warning[]& warnings,
ParameterInfoCollection& effectiveParameters)
at
Microsoft.ReportingServices.Library.RSService.RenderFirst(CatalogItemContext
reportContext, ClientRequest session, Warning[]& warnings,
ParameterInfoCollection& effectiveParameters, String[]& secondaryStreamNames)
at Microsoft.ReportingServices.Library.RenderFirstCancelableStep.Execute()
at
Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
-- End of inner exception stack trace --
at
Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
at
Microsoft.ReportingServices.Library.RenderFirstCancelableStep.RenderFirst(RSService
rs, CatalogItemContext reportContext, ClientRequest session, JobTypeEnum
type, Warning[]& warnings, ParameterInfoCollection& effectiveParameters,
String[]& secondaryStreamNames)
at Microsoft.ReportingServices.Library.ReportImpl.Render(String
renderFormat, String deviceInfo)
at
Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.SaveReport(Notification notification, SubscriptionData data)
at
Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.Deliver(Notification notification)
Any ideas?
TIA,
Berry Morgan
JSOAre the user who created the report subscription and the ReportServer in the
same domain (actually the ReportServerService service account). We have seen
this issue in our DEV + QA environments which are in different domains that
are not trusted by our prod domain (but do trust it). We have configured all
our Report Servers to run under prod domain service accounts to get around
this issue (because when testing subscriptions, developers will still be
using their prod accounts and it seems that it is the subscription owner
account that was failing to be resolved)
--
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Berry at JSO" <6399bwmNOSPAM@.community.nospam> wrote in message
news:D735DEE3-F3E8-4250-9AAA-396D1B3742B2@.microsoft.com...
>I have a subscription that will not deliver to a file share. I've ensured
> that the windows acct for share access for the subscription has read/write
> to
> the share.
> The error I get in report manager is:
> Failure writing file <report name>: The Report Server has encountered a
> configuration error; more details in the log files
>
> The log file says:
> ReportingServicesService!library!10ec!08/08/2005-12:26:05:: i INFO: Call
> to
> RenderFirst( '/My Reports/<report name>)
> ReportingServicesService!library!10ec!08/08/2005-12:26:06:: e ERROR:
> Throwing
> Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
> The Report Server has encountered a configuration error; more details in
> the
> log files, AuthzInitializeContextFromSid: Win32 error: 234;
> Info:
> Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
> The Report Server has encountered a configuration error; more details in
> the
> log files
> ReportingServicesService!library!10ec!08/08/2005-12:26:06:: i INFO:
> Initializing EnableExecutionLogging to 'True' as specified in Server
> system
> properties.
> ReportingServicesService!subscription!10ec!08/08/2005-12:26:06::
> Microsoft.ReportingServices.Diagnostics.Utilities.RSException: The Report
> Server has encountered a configuration error; more details in the log
> files
> -->
> Microsoft.ReportingServices.Diagnostics.Utilities.ServerConfigurationErrorException:
> The Report Server has encountered a configuration error; more details in
> the
> log files
> at
> Microsoft.ReportingServices.Authorization.Native.GetAuthzContextForUser(IntPtr
> userSid)
> at Microsoft.ReportingServices.Authorization.Native.IsAdmin(String
> userName)
> at
> Microsoft.ReportingServices.Authorization.WindowsAuthorization.IsAdmin(String
> userName, IntPtr userToken)
> at
> Microsoft.ReportingServices.Authorization.WindowsAuthorization.CheckAccess(String
> userName, IntPtr userToken, Byte[] secDesc, ReportOperation
> requiredOperation)
> at Microsoft.ReportingServices.Library.Security.CheckAccess(ItemType
> catItemType, Byte[] secDesc, ReportOperation rptOper)
> at
> Microsoft.ReportingServices.Library.RSService._GetReportParameterDefinitionFromCatalog(CatalogItemContext
> reportContext, String historyID, Boolean forRendering, Guid& reportID,
> Int32&
> executionOption, String& savedParametersXml, ReportSnapshot&
> compiledDefinition, ReportSnapshot& snapshotData, Guid& linkID, DateTime&
> historyDate)
> at
> Microsoft.ReportingServices.Library.RSService._GetReportParameters(String
> report, String historyID, Boolean forRendering, NameValueCollection
> values,
> DatasourceCredentialsCollection credentials)
> at
> Microsoft.ReportingServices.Library.RSService.RenderAsLiveOrSnapshot(CatalogItemContext
> reportContext, ClientRequest session, Warning[]& warnings,
> ParameterInfoCollection& effectiveParameters)
> at
> Microsoft.ReportingServices.Library.RSService.RenderFirst(CatalogItemContext
> reportContext, ClientRequest session, Warning[]& warnings,
> ParameterInfoCollection& effectiveParameters, String[]&
> secondaryStreamNames)
> at
> Microsoft.ReportingServices.Library.RenderFirstCancelableStep.Execute()
> at
> Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
> -- End of inner exception stack trace --
> at
> Microsoft.ReportingServices.Diagnostics.CancelablePhaseBase.ExecuteWrapper()
> at
> Microsoft.ReportingServices.Library.RenderFirstCancelableStep.RenderFirst(RSService
> rs, CatalogItemContext reportContext, ClientRequest session, JobTypeEnum
> type, Warning[]& warnings, ParameterInfoCollection& effectiveParameters,
> String[]& secondaryStreamNames)
> at Microsoft.ReportingServices.Library.ReportImpl.Render(String
> renderFormat, String deviceInfo)
> at
> Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.SaveReport(Notification
> notification, SubscriptionData data)
> at
> Microsoft.ReportingServices.FileShareDeliveryProvider.FileShareProvider.Deliver(Notification
> notification)
>
> Any ideas?
> TIA,
> Berry Morgan
> JSO|||The subscription creator is a production domain account, but the
ReportServer service identity is NT AUTHORITY\Network Service.
If I change the ReportServer service identity to a domain account, won't
that require reactivation of the reporting server?
Also, email subscriptions currently work: wouldn't changing the service
identity require configuration changes for this subscription type as well?
My hunch is that subscription delivery to file shares is tied in with code
access security settings, but I'm not the MVP. :)
-Berry
"Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
news:ewEcpyGnFHA.3304@.tk2msftngp13.phx.gbl...
> Are the user who created the report subscription and the ReportServer in
> the same domain (actually the ReportServerService service account). We
> have seen this issue in our DEV + QA environments which are in different
> domains that are not trusted by our prod domain (but do trust it). We have
> configured all our Report Servers to run under prod domain service
> accounts to get around this issue (because when testing subscriptions,
> developers will still be using their prod accounts and it seems that it is
> the subscription owner account that was failing to be resolved)
>|||Our issue was purely domain related however what I would suggest is that you
contact PSS. They'll be able to provide you with a utility that should help
pinpoint the issue. This is a common problem (the error message you are
seeing) and it's all related to being able to query AD and permissions
related to that (rather than specifically anything SQL related). PSS will be
able to help you track down the specific issue in your environment. Email
subscriptions don't suffer the same issue as far as I'm aware (we haven't
seen it but that doesn't mean it doesn't exist<g>)
--
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Berry Morgan" <6399bwmNOSPAM@.community.nospam> wrote in message
news:uwK78DTnFHA.1372@.TK2MSFTNGP10.phx.gbl...
> The subscription creator is a production domain account, but the
> ReportServer service identity is NT AUTHORITY\Network Service.
> If I change the ReportServer service identity to a domain account, won't
> that require reactivation of the reporting server?
> Also, email subscriptions currently work: wouldn't changing the service
> identity require configuration changes for this subscription type as well?
> My hunch is that subscription delivery to file shares is tied in with code
> access security settings, but I'm not the MVP. :)
> -Berry
> "Jasper Smith" <jasper_smith9@.hotmail.com> wrote in message
> news:ewEcpyGnFHA.3304@.tk2msftngp13.phx.gbl...
>> Are the user who created the report subscription and the ReportServer in
>> the same domain (actually the ReportServerService service account). We
>> have seen this issue in our DEV + QA environments which are in different
>> domains that are not trusted by our prod domain (but do trust it). We
>> have configured all our Report Servers to run under prod domain service
>> accounts to get around this issue (because when testing subscriptions,
>> developers will still be using their prod accounts and it seems that it
>> is the subscription owner account that was failing to be resolved)
>

File Share Delivery Error

I have given subscription access to a domain group in reporting services.
Well when the users create a file share subscription and the subscription
launches they are getting the message "Failure writing file .pdf : Error
impersonating user." Thanks,
--
Andrew
MCSA,MCDBAThe error is stating that RS can not log on as the user that you configured
the subscription to use. It has nothing to do with the share permissions.
You should make sure that user can log onto the machine that RS is running
on.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Andrew" <Andrew@.discussions.microsoft.com> wrote in message
news:6E473576-5F7A-430D-AB70-A0EB8A4C7C60@.microsoft.com...
>I have given subscription access to a domain group in reporting services.
> Well when the users create a file share subscription and the subscription
> launches they are getting the message "Failure writing file .pdf : Error
> impersonating user." Thanks,
> --
> Andrew
> MCSA,MCDBA|||Daniel,
Thanks for the advice I discovered the only group granted log on locally
rights was the administrators group. Thanks again,
--
Andrew
MCSA,MCDBA
"Daniel Reib [MSFT]" wrote:
> The error is stating that RS can not log on as the user that you configured
> the subscription to use. It has nothing to do with the share permissions.
> You should make sure that user can log onto the machine that RS is running
> on.
> --
> -Daniel
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Andrew" <Andrew@.discussions.microsoft.com> wrote in message
> news:6E473576-5F7A-430D-AB70-A0EB8A4C7C60@.microsoft.com...
> >I have given subscription access to a domain group in reporting services.
> > Well when the users create a file share subscription and the subscription
> > launches they are getting the message "Failure writing file .pdf : Error
> > impersonating user." Thanks,
> >
> > --
> > Andrew
> > MCSA,MCDBA
>
>

Friday, February 24, 2012

File IO Exception thrown when trying to access a CLR Assembly in SQL Server

I have been encountering a problem using a CLR Assembly in SQL server. The Assembly is one provided by Microsoft for an example on using Exchange web services with SQL server.

http://www.microsoft.com/downloads/details.aspx?FamilyId=D6924897-7B62-46FD-874E-24FB0FBA2159&displaylang=en#Requirements

Essentially what this package is, is a set of c# classes that access the Exchange 2007 Web Services via a set of user defined functions and views in MS SQL Server 2005.

We have not modified the code except to configure for our host environment.

We are able to register the assembly using the setup.sql file included. But when we try to access any of the views or use the functions we get the following error:

Msg 10314, Level 16, State 11, Line 10

An error occurred in the Microsoft .NET Framework while trying to load assembly id 65551. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error:

System.IO.FileLoadException: Could not load file or assembly 'exchangeudfs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=777b97dde00f3dbe' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

System.IO.FileLoadException:

at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)

at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)

at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)

at System.Reflection.Assembly.Load(String assemblyString)

We have 3 testing environments. 2 Windows 2003 servers called test and test2. Also a single Windows 2000 server called test3. Test and test2 have a full suite installed on them, web server, exchange 2007, sql server 2005, they are also domain controllers for their own domains.

We get the above error on test and test2 but it runs fine on test3. Test and test2 represent what our production environment is like. Test3 was just part of our troubleshooting process.

We have tried a lot to make this work. Here are some details on the things we have tried.

The database is set up to allow CLR Assemblies. This is part of the setup.sql.

The assembly's permission is set to external_access.

We have gone all the way to setting the file permissions on the dll to full control to the Everyone group.

We have tried different accounts to run the SQL Service. We've tried the system account, the local admin account and a seperate user account.

The database we are using is a fresh brand new database. Therefore it does not fit into the bug reported in this article:

http://support.microsoft.com/kb/918040

I am really at a loss to where to go from here. Any ideas on why this 'out of the box' solution is causing us so many headaches would be appriciated.

Thanks,

Tim

Which box did you compile your changes on? Do the full assembly identities match for the exchangeudfs assembly and all the dependents?

|||

I compiled the assembly on another seperate development machine. I'm not sure I know how to answer your second question.

|||

Fro whatever reason I recompiled it and it magically started working. Not sure why.

Sunday, February 19, 2012

File IO Exception thrown when trying to access a CLR Assembly in SQL Server

I have been encountering a problem using a CLR Assembly in SQL server. The Assembly is one provided by Microsoft for an example on using Exchange web services with SQL server.

http://www.microsoft.com/downloads/details.aspx?FamilyId=D6924897-7B62-46FD-874E-24FB0FBA2159&displaylang=en#Requirements

Essentially what this package is, is a set of c# classes that access the Exchange 2007 Web Services via a set of user defined functions and views in MS SQL Server 2005.

We have not modified the code except to configure for our host environment.

We are able to register the assembly using the setup.sql file included. But when we try to access any of the views or use the functions we get the following error:

Msg 10314, Level 16, State 11, Line 10

An error occurred in the Microsoft .NET Framework while trying to load assembly id 65551. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error:

System.IO.FileLoadException: Could not load file or assembly 'exchangeudfs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=777b97dde00f3dbe' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)

System.IO.FileLoadException:

at System.Reflection.Assembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)

at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)

at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)

at System.Reflection.Assembly.Load(String assemblyString)

We have 3 testing environments. 2 Windows 2003 servers called test and test2. Also a single Windows 2000 server called test3. Test and test2 have a full suite installed on them, web server, exchange 2007, sql server 2005, they are also domain controllers for their own domains.

We get the above error on test and test2 but it runs fine on test3. Test and test2 represent what our production environment is like. Test3 was just part of our troubleshooting process.

We have tried a lot to make this work. Here are some details on the things we have tried.

The database is set up to allow CLR Assemblies. This is part of the setup.sql.

The assembly's permission is set to external_access.

We have gone all the way to setting the file permissions on the dll to full control to the Everyone group.

We have tried different accounts to run the SQL Service. We've tried the system account, the local admin account and a seperate user account.

The database we are using is a fresh brand new database. Therefore it does not fit into the bug reported in this article:

http://support.microsoft.com/kb/918040

I am really at a loss to where to go from here. Any ideas on why this 'out of the box' solution is causing us so many headaches would be appriciated.

Thanks,

Tim

Which box did you compile your changes on? Do the full assembly identities match for the exchangeudfs assembly and all the dependents?

|||

I compiled the assembly on another seperate development machine. I'm not sure I know how to answer your second question.

|||

Fro whatever reason I recompiled it and it magically started working. Not sure why.