.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

AD Reporting DateTime Attributes

Posted By:      Posted Date: September 19, 2010    Points: 0   Category :ASP.Net
 

Been working on a AD reporting tool using c# and came across a interesting issue - The tool querys AD for available classses then for the selected class gets the attributes for that class,  the problem is datetime values are int64 but they are not the only int64 values so without hardcoding any mappings how do you determine a attribute is a datetime ?   Queries are saved in xml config file,  results can be exported to html or csv.  Have a look - http://spf.vergesys.com/Shared%20Documents/Dev/adQuery.zip




View Complete Post


More Related Resource Links

Reporting Services DATETIME execution slowdown

  

Our reports typically have an @paramStart and @paramEnd as a datetime parameter to our SQL.  In one very long query, we found that the report took many minutes, possibly an hour or more, to run.  Running the query through SQL Server Management Studio 2008 was approximately 20 seconds.  We eventually added the following code to the RDL file:

 

DECLARE @localStartTime      datetime

DECLARE @localEndTime        datetime

 

SELECT @localStartTime = @paramStart, @localEndTime = @paramEnd

 

And replaced all other references of @paramStart and @paramEnd to their local equivalent.  With only that change, the query went from mega-minutes to seconds.  This appears to have something to do with dynamic SQL handling datetime variables versus fixed strings as we can repeat this somewhat in SSMS by changing our @paramStart with a ‘9/29/10’ and @paramEnd with ‘9/30/10’.

 

Any clue why we are having this issue?  Is there a better way for us to work around the issue?  Anybody else experiencing slowdowns with datetime parameters?

 

Thanks,

Terry Steyaert


How to format datetime & date with century?

  
Execute the following Microsoft SQL Server T-SQL datetime, date and time formatting scripts in Management Studio Query Editor to demonstrate the usage of the multitude of temporal data formats available and the application of date / datetime functions.

http://www.sqlusa.com/bestpractices2005/centurydateformat/

Essential SQL Server Date, Time and DateTime Functions

  
The essential date and time functions that every SQL Server database should have to ensure that you can easily manipulate dates and times without the need for any formatting considerations at all.

Integrate Reporting Services with Silverlight and RIA Services

  
One of the most wanted future features in Silverlight is the possibility to create business reports using Reporting Services. In this article, I will show how to use the existing Reporting Services technology with Silverlight and RIA Services combination.

datetime server

  

Hi,

I'd like to have the date and time from server.

DateTime.Now Is ok?

Must be something else?


thanks.




Getting users list reporting to manager from LDAP

  

Dear All,

I need to get list of users reporting to a particular manager from the Active directory.

In the active directory there is manager property with contains the data in the following way.

CN=Gegore Lid,OU=IT,OU=Sales,OU=XXXXX,OU=XXXX,DC=YYYY,DC=intra


Please help me in building the filter condition.


I am using the following

pUserName="Gegore Lid";

strSearch = "(&(objectClass=user)(objectCategory=user)((Manager cn=" + pUserName + "))";

DirectorySearcher dSearcher = new DirectorySearcher(dEntry, strSearch);

            //Account properites to load
            string[] arrPropertiesToLoad = { "displayName", "department", "manager", "sAMAccountName", "EmployeeNumber", "Title" };
            dSearcher.PropertiesToLoad.AddRange(arrPropertiesToLoad);

          SearchResultCollection sResultColl = dSearcher.FindAll();

 the above code is not returning any result.


Please help me in this.


Regards

Prakash



Getting list of users reporting from specific Manager from Active Directory

  

Dear All,


I am have requirement like displaying all the user information reporting to specific manager from Active Directory.


Please help me regarding this.


Regards

Prakash


Reporting Services SQL 2005 .Net 4 compatibility?

  

I've been working on my first asp.net application and for the most part it's been pretty smooth.  Right now I'm having trouble getting reporting services working under SQL Server 2005.  I developed the site with Visual Studio 2010 and didn't think about any of the .Net 4.0 compatibility issues that have arisen.  I'm having no problems with the site communicating with SQL Server 2005 for the regular database stuff.  The only problem I'm having is with setting up Reporting Services.  I have the .Net 4.0 framework installed on the server, however Reporting Services is still using 2.x.  I'm not sure if this is a problem with SSRS or with IIS.  When i go to localhost/Reports it's reading my web.config for my application and throwing an error: "Parser Error Message: Unrecognized attribute 'targetFramework'."  This is referring to a line in my web.config where targetFramework is set to 4.0.


Software that I'm using:

  • Visual Studio 2010
  • SQL Server 2005 Standard
  • IIS 7.0
  • .Net 4.0

Any suggestions?  


(Microsoft.Reporting.WebForms.ReportViewer) is not compatible with the type of control (Microsoft.Re

  

 I am trying to use ReportViewer 9 in Visual Studio 8 but I get this error when I try to run the page:

The base class includes the field 'ReportViewer1', but its type (Microsoft.Reporting.WebForms.ReportViewer) is not compatible with the type of control (Microsoft.Reporting.WebForms.ReportViewer).

Please help if you can!

Thanks


Reporting services in 2008 r2 how to get a report in a print button click event in my c#.net page

  

how to  get a report in my c#.net page button lick event also steps to call a report from asp.net to reporting services

 

Thanks in advance


System.DateTime.AddDays: Value to add was out of range.

  

I'm getting the following error:

[ArgumentOutOfRangeException: Value to add was out of range.
Parameter name: value]
   System.DateTime.Add(Double value, Int32 scale) +7657639
   System.DateTime.AddDays(Double value) +19
   ...

The line from which this error originates has the following code:

expires = Now.AddDays(30)

It occurs irregularly and irreproducably. The server date/time is correct and set to GMT. I've heard that it could be some curiosity to do with timezones, but that is speculative.

It seems that we're some time from the year 10,000 yet, so I can't understand why adding thirty days to the current time could cause this! Any ideas? Culture settings perhaps?


Custom Attributes + Reflection

  

I recently started messing around with custom attributes and reflection. In my code below GetCustomAttributes never return a list (it should return atleast one):

Am i defining the custom attrib wrong?

public class GOrder:IOrder
    {
        [RESTParamAttrib("cert_product_id_string")]
        public string CertProductIDString { get; set; }


        public string GetRESTParams()
        {
            string data = string.Empty;
            try
            {
                System.Reflection.MemberInfo inf = this.GetType();
                object[] attributes;
                attributes =  inf.GetCustomAttributes(typeof(RESTParamAttrib), true);
                foreach (Object attribute in attributes)
                {
                    RESTParamAttrib attrib = (RESTParamAttrib)attribute;
                    data = data + string.Format("\nData: {0}", attrib.Param);
                }

            }
            catch (Exception ex)
            {

                throw ex;
            }

            return data;
        }
    }

    public class RESTParamAttrib:System.Attribute
    {
        public RESTParamAttrib (string param)
        {
            Param = param;
        }

        public string

SQL Server 2005: Jazz Up Your Data Using Custom Report Items In SQL Server Reporting Services

  

Custom report items in SQL Server 2005 Reporting Services address your needs for custom reports without the pain of doing it from scratch.

Teo Lachev

MSDN Magazine October 2006


Cutting Edge: Reporting Task Progress With ASP.NET 2.0

  

The progress bar is great for keeping users informed about the progress of a task. Unfortunately, there's no progress bar element built into ASP.NET, so Dino Esposito solves that problem with his ProgressPanel control.

Dino Esposito

MSDN Magazine September 2006


Data Points: Report Controls in SQL Server 2005 Reporting Services

  

Reporting has always been one of the dark arts of development. The tools typically seem to do just enough to get you to a certain point, then leave you to find workarounds to solve more complex issues.

John Papa

MSDN Magazine July 2006


Data Points: Designing Reports with SQL Server Reporting Services 2005

  

Many applications require some degree of integration with a reporting tool. A good solution, SQL ServerT Reporting Services 2005, provides Web-based reports and can be integrated into both Windows® Forms and Web-based applications.

John Papa

MSDN Magazine June 2006


Reporting Services: Deliver SQL Server Reports To SharePoint To Enhance Team Collaboration

  

The solution covered here includes a custom SharePoint Web service that accepts SQL Server-generated report files and, through the WSS object model, stores the file in the appropriate library for enhanced collaboration possibilities.

Ed Hild

MSDN Magazine March 2006


Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend