Specified cast is not valid errors

Hi all
Sometimes, but not always, I'm finding that the Layer.Add, Cell.GlueTo and Window.Select methods throw errors similar to:
Specified cast is not valid at System.StubHelpers.InterfaceMarshaler.ConvertToNative(Object objSrc, IntPtr itfMT, IntPtr classMT,
Int32 flags) at Microsoft.Office.Interop.Visio.IVLayer.Add(Shape SheetObject, Int16 fPresMems)
I'm using VB2010, Visio 2007 and currently testing on Windows XP 32 bit. The program is a stand-alone .exe program using Visio via .NET interop. The same program, with the same data can run several times without problem and then once this error
has been thrown, the same error will be thrown every time until the Visio file is closed and re-opened.
This VB2010 code was derived from a VB6 program which has been working fine for 2,000+ users over a period of about 15 years.
Unfortunately I've not been able to replicate these problems in a small test program which is making the debugging process rather tedious and it's another aspect of this problem which is worrying and confusing me.
The program is adding a 100 or so shapes from a stencil and gluing lines between them. I've tried playing with the settings of such properties as DeferRecalc, EventsEnabled, InhibitSelectChange, LiveDynamics, ShowChanges and UndoEnabled as I thought
Visio might be having a problem updating the screen or allocating memory to the undo manager or something. I've also tried Application.DoEvents.
I've re-written some of my code to avoid using Window.Select which I was using to select shapes to create groups. I guess I could also re-write the code to avoid using GlueTo, but I don't think I can always avoid using Layer.Add.
Any thoughts or comments would be much appreciated.
Best regards
Roger Billsdon

Hi Paul
Many thanks for your reply and I hope all is well with you.
I spent quite a lot of time trying to replicate the problem in a small test program created from scratch. All the offending methods (Window.Select, Layer.Add and Cell.GlueTo) worked fine in the test program, as indeed they often do in my main program.
I carefully compared all the project references and everything else I could think of in both the test and my main program. I added loops in the test program so that it added many shapes, etc in an attempt to create some stress on the Visio UI, Undo manager,
etc. Not being able to replicate the problem in a small test program is one aspect of this problem that is worrying and confusing me.
The main program is quite large (I guess about 60,000 lines of code) and contains code for many other functions. An alternative approach would be for me to take a copy of the main program and try chopping chunks out to degenerate
it into a small test program. However, at present I have a looming project deadline so I'm now putting my effort into recoding to eliminate the Window.Select, Cell.GlueTo and, where possible, Layer.Add method calls. Fortunately Visio provides alternatives
which seem to be working. For example, rather than Cell.GlueTo I'm setting the relevant cell formulae and instead of Window.Select to form group, I'm creating a shape, converting it into a group and then dropping the other shapes into this group.
Back in my VB6 programs I had some problems with select and group so I think this conversion is worthwhile, but I don't recall having had any problems with Cell.GlueTo or Layer.Add. Because I don't understand what's causing the problem I'm concerned that this
re-coding work is just fixing the symptoms without actually getting at the root cause.
In general I am finding rather more problems and performance issues with VB.NET Visio programs than I did over all the years I used VB3 and VB6 to program Visio.
Best regards
Roger

Similar Messages

  • Specified cast is not valid. (Microsoft.SqlServer.Smo) - degradation of v11

    I have Sql management studio 2014 SP1 and im working with my Azure SQL Databases.
    Previously all my databases and servers were on Sql Server 11.0 and thing were working fine, until a couple of days ago; 1 database on a server started throwing the specified cast is not valid error when you try to use management studio to Script table as.....
    and today all (3) of my databases on (different) servers are throwing that error 
    Earlier today I upgraded 1 of the servers to the latest azure sql database 12.0.2000.8 (it took a while since it can take up to 24 hours); and can verify that the same script table as... or any management studio function that will generate scripts, like
    Generate Scripts task does not throw this error.
    The issue with v11 started happening a few days ago and is now on all my v11 databases; management studio will not generate scripts.,  wanted to submit this as a bug., but there is no easier way to do so.
    screenshots below.
    error dump:
    ===================================
    Specified cast is not valid. (Microsoft.SqlServer.Smo)
    Program Location:
       at Microsoft.SqlServer.Management.Smo.Table.Microsoft.SqlServer.Management.Smo.IPropertyDataDispatch.SetPropertyValue(Int32 index, Object value)
       at Microsoft.SqlServer.Management.Smo.PropertyDispatcher.SetValue(Int32 index, Object value)
       at Microsoft.SqlServer.Management.Smo.PropertyCollection.SetValue(Int32 index, Object value)
       at Microsoft.SqlServer.Management.Smo.SqlSmoObject.AddObjectPropsFromDataReader(IDataReader reader, Boolean skipIfDirty, Int32 startColIdx, Int32 endColIdx)
       at Microsoft.SqlServer.Management.Smo.SqlSmoObject.ImplInitialize(String[] fields, OrderBy[] orderby)
       at Microsoft.SqlServer.Management.Smo.SqlSmoObject.OnPropertyMissing(String propname, Boolean useDefaultValue)
       at Microsoft.SqlServer.Management.Smo.PropertyCollection.RetrieveProperty(Int32 index, Boolean useDefaultOnMissingValue)
       at Microsoft.SqlServer.Management.Smo.PropertyCollection.GetPropertyObject(Int32 index)
       at Microsoft.SqlServer.Management.Smo.SqlSmoObject.GetPropertyOptional(String propName)
       at Microsoft.SqlServer.Management.Smo.Column.EmbedDefaultConstraints()
       at Microsoft.SqlServer.Management.Smo.Column.GetPropagateInfo(PropagateAction action)
       at Microsoft.SqlServer.Management.Smo.SqlSmoObject.GetPropagateInfoForDiscovery(PropagateAction action)
       at Microsoft.SqlServer.Management.Smo.SmoDependencyDiscoverer.GetScriptableChildren(List`1 propInfoList, PropagateAction propagateAction)
       at Microsoft.SqlServer.Management.Smo.SmoDependencyDiscoverer.SfcChildrenDiscovery(HashSet`1 discoveredUrns)
       at Microsoft.SqlServer.Management.Smo.SmoDependencyDiscoverer.Discover(IEnumerable`1 urns)
       at Microsoft.SqlServer.Management.Smo.ScriptMaker.Discover(IEnumerable`1 urns)
       at Microsoft.SqlServer.Management.Smo.ScriptMaker.DiscoverOrderScript(IEnumerable`1 urns)
       at Microsoft.SqlServer.Management.Smo.ScriptMaker.ScriptWorker(List`1 urns, ISmoScriptWriter writer)
       at Microsoft.SqlServer.Management.Smo.ScriptMaker.Script(Urn[] urns, ISmoScriptWriter writer)
       at Microsoft.SqlServer.Management.Smo.ScriptMaker.Script(Urn[] urns)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ScriptGenerator.ScriptCreate(SqlTextWriter sqlwriter, Server server, Urn[] urns, SqlScriptOptions options)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.ScriptNodeActionContext.Script(SqlTextWriter writer)
       at Microsoft.SqlServer.Management.UI.VSIntegration.ObjectExplorer.SqlScriptMenu.OnScriptItemClick(Object sender, EventArgs e)

    I'm also running into this exact issue with V11 and SQL Server Management Studio -- table "Generate Create Script" fails with "Specified
    cast is not valid. (Microsoft.SqlServer.Smo)". This just started happening recently with V11 and doesn't manifest with V12. I'm running SSMS with latest hotifxes (CU6 I believe). I don't have the option of an immediate move to V12.
    Microsoft SQL Server Management Studio 12.0.2480.0
    Microsoft Analysis Services Client Tools 12.0.2480.0
    Microsoft Data Access Components (MDAC) 6.3.9600.16384
    Microsoft MSXML 3.0 6.0 
    Microsoft Internet Explorer 9.11.9600.17728
    Microsoft .NET Framework 4.0.30319.34014
    Operating System 6.3.9600

  • Getting errors in MSMQ intermittent Specified cast is not valid on Sending

    I keep getting this error when I try and Send a message on a windows server 2008 R2 box. It works about 95% of the time but ever so often I get the following:
    Log Entry : 4:29:44 AM Friday, April 17, 2015
      :Transaction Failed [Specified cast is not valid.]
    Log Entry : 4:29:44 AM Friday, April 17, 2015
      :Stack Trace [   at System.Messaging.Interop.MessagePropertyVariants.Lock()
       at System.Messaging.MessageQueue.SendInternal(Object obj, MessageQueueTransaction internalTransaction, MessageQueueTransactionType transactionType)
       at ProdUwsCallbackService.ProdUwsCallbackService.SmsCallback(SmsCallbackRequest SmsCallbackRequest) in C:\NH Applications\VerizonNewProdGateway\WebProdUwsCallback\API\ProdUwsCallbackService.asmx.cs:line 318]
    This happens about 7 or 8 times a night and it processes about 500 to 1000 messages before this happens. At about 4:30 in the morning I receive a large spike or volume of messages and it seems to happen around that time.
    Here is the code snippet that is sending the MSMQ:
                                RxUwsCallbackVerizonProdMQ.Formatter = new XmlMessageFormatter(new Type[] { typeof(UwsRxMessage) });
                                //MessageQueueTransaction RxUwsCallbacVerizonProdTran = new MessageQueueTransaction();
                                try
                                    //RxUwsCallbacVerizonProdTran.Begin();
                                    //RxUwsCallbackVerizonProdMQ.Send(Message, Label, RxUwsCallbacVerizonProdTran);
                                    NHUtils.WriteLog(VerizonUwsLogFile, "Putting SMS Message into Message Queue: [" + Label + "]");
                                    lock (RxUwsCallbackVerizonProdMQ)
    RxUwsCallbackVerizonProdMQ.Send(Message, MessageQueueTransactionType.Single);
                                    //RxUwsCallbacVerizonProdTran.Commit();
                                catch (Exception ex)
                                    //RxUwsCallbacVerizonProdTran.Abort();
                                    NHUtils.WriteLog(VerizonUwsLogFile, "Transaction Failed [" + ex.Message + "]");
                                    NHUtils.WriteLog(VerizonUwsLogFile, "Stack Trace [" + ex.StackTrace + "]");
    The bold line is where the error is happening.
    This is running as a application under IIS7 on a Windows 2008 R2 box.
    Any help would greatly be appriciated on how to deal with this error or correct it. Thanks.

    Hi Reggie,
    MSMQ forum is better, I help you to move it here.
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Web controls 2.1 Fail with Specified Cast is not valid

    1) I loaded the 2.1 Beta .NET Webcontrols ..2) I removed the reference to the old Plumtree.WCFilter.dll from my project3) I added the new reference in its place4) I checked the GAC to see that WCLoader was the proper version5) Also noticed the reliance on J# redist 1.1 so I downloaded and installed this as well6) Any thoughts on why I am gettig invalid cast exception? When I access portlet in the portal it simply displays error, when I try to access portlet outside of portal I get cast exception.
    [InvalidCastException: Specified cast is not valid.] Com.Plumtree.Remote.Transformer.Config.WCConfig.Load(TextReader reader) Com.Plumtree.Remote.Transformer.Config.WCConfig.LoadAll(String confPath) Com.Plumtree.Remote.Transformer.PTTransformer.get_Config() Com.Plumtree.Remote.Transformer.PTTransformer.BeginRequestHandler(Object sender, EventArgs e) System.Web.SyncEventExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +60 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87
    Phil Orion | [email protected] | www.orionsmith.com

    I am still unable to get the 2.1 Webcontrols to work, can anyone provide some insight to overcoem the cast exception?.-There seem to be some additional configuration items in this release - Can anyone explain their purpose? -The installation also placed the image server files in the wrong location - I had to move them from the ptimages folder to the ptimages/RemoteGadgets

  • Async service keep stopping with Specified cast is not valid

    Hi there,
    Our organization currently is experiencing some failure on CRM 4.0 Async service.
    The error message is :
    failed while monitoring asynchronous operations queue. Exception: System.InvalidCastException: Specified cast is not valid.
       at Microsoft.Crm.Asynchronous.ServerOrganizationConfiguration.GetSdkBaseUrl()
       at Microsoft.Crm.Asynchronous.ServerOrganizationConfiguration.get_WebServiceEndpoint()
       at Microsoft.Crm.Asynchronous.CrmServiceFactory.CreateCrmService(Guid organizationId, Nullable`1 userId, CorrelationToken correlationToken)
       at Microsoft.Crm.Asynchronous.SdkPluginDescriptionProvider.GetPluginTypeDescription(Guid pluginTypeId, IOrganizationContext context)
       at Microsoft.Crm.Caching.PluginTypeCacheLoader.LoadCacheData(Guid key, IOrganizationContext context)
       at Microsoft.Crm.Caching.CrmMultiOrgCache`2.CreateEntry(TKey key, IOrganizationContext context)
       at Microsoft.Crm.Caching.CrmSharedMultiOrgCache`2.LookupEntry(TKey key, IOrganizationContext context)
       at Microsoft.Crm.Caching.PluginTypeCache.LookupEntry(Guid pluginTypeId, IOrganizationContext context)
       at Microsoft.Crm.Asynchronous.AsyncOperationCommand.GetPluginType(Guid pluginTypeId)
       at Microsoft.Crm.Asynchronous.EventOperation.InternalExecute(AsyncEvent asyncEvent)
       at Microsoft.Crm.Asynchronous.AsyncOperationCommand.Execute(AsyncEvent asyncEvent)
       at Microsoft.Crm.Asynchronous.QueueManager.PoolHandler.ProcessAsyncEvent(AsyncEvent asyncEvent)
       at Microsoft.Crm.Asynchronous.QueueManager.PoolHandler.InvokeHandlerInPool(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)
    It looks the GetSdkBaseUrl() function failed. Has anyone experienced it before?
    Cheers

    I don't know about your specific error, but the CRM 4.0 Async service was notoriously unstable.  That's why they added a monitoring service in later versions to keep it up.  However, for 4.0, I recommend going to the Service itself in the Windows
    Service area, and then tell the "behavior after failure" section to "Restart" every time it fails.  While not perfect, it will keep your Async service up and running even when it crashes.
    The postings on this site are solely my own and do not represent or constitute Hitachi Solutions' positions, views, strategies or opinions.

  • Specified cast is not valid

    Hello, I have the following code:
    if (dataTable.Columns.Count > 1)
    strXML = ChartFileNameandPath(chartType) + @"?dataXML=<graph caption='Report ; Summary' subcaption='" + ReportName(reportType) + "' xAxisName='Line Number' yAxisName='Pounds made' rotatelabels='1' slantlabels='1' showNames='1' showvalues='0' numberPrefix='$' exportenabled='1' exportAtClient='1' exportHandler='fcExporter1' exportFormats='PNG=Save as PNG' >";
    //Getting the Subtotal of PoundsMade based on the Line Number column
    //C# linq query
    if (reportType == ReportEnums.Clientsdata) {
    var query = from row in dataTable.AsEnumerable()
    group row by row.Field<string>("ClientName") into grp
    orderby grp.Key
    select new {
    Clientname = grp.Key,
    TotalAmountSpent = grp.Sum(r => r.Field<int>("TotalAmountSpent")) //error here, specified cast is not valid
    foreach (var grp in query) {
    strXML = strXML + "<set name='" + grp.Clientname.ToString() + "' value='" + grp.TotalAmountSpent.ToString() + "'/>";
    I get a error "Specified cast is not valid"
    Part of my store procedure where I'm grabbing it from is:
    SELECT ClientName,
    Mem_Name,
    Mem_Address,
    Mem_city,
    Mem_state,
    Sum(mv.AmountSpent) as TotalAmountSpent,
    (Sum(mv.AmountSpent)/ (CAST(s.TotalBusinessSales as decimal)) * 100) as PercentAmountSpent
    My question is: Am I getting an error because of TotalAmountSpent is an alias?
    Thanks,
    N

    ALTER PROCEDURE usp_Clienttransaction (@FromDate Varchar (30), @ToDate Varchar (30), @Active int)
    AS
    SELECT ClientName,
    Mem_Name,
    Mem_Address,
    Mem_city,
    Mem_state,
    Sum(mv.AmountSpent) as TotalAmountSpent,
    (Sum(mv.AmountSpent)/ (CAST(s.TotalBusinessSales as decimal)) * 100) as PercentAmountSpent
    FROM UnitedDiningClub.dbo.UDC_Member
    JOIN UnitedDiningClub.dbo.UDC_MemberVisits mv
    ON UDC_Member.Mem_ID = mv.MemberId
    JOIN UnitedDiningClub.dbo.UDClub_Client c
    ON c.ClientId = mv.RestaurantId
    INNER JOIN
    ( SELECT RestaurantId, sum(AmountSpent) as TotalBusinessSales
    FROM UnitedDiningClub.dbo.UDC_MemberVisits
    GROUP BY RestaurantId) s
    ON s.RestaurantId = c.ClientId
    GROUP by ClientName, Mem_Name, Mem_Address , Mem_city , Mem_state, s.TotalBusinessSales
    ORDER BY ClientName
    Thats the full procedure.
    Its coming from a sub query. Would an alias effect the results in c#?

  • Specified cast is not valid exception

    I have the following C# code (cut down for the post) that causes an exception (Specified cast is not valid) when I attemp the GetInt32 method call. FILE_HDR is a BLOB and I can read it just fine with GetBytes. This also happens on something like TO_NUMBER(FILE_ID, 'XXXXXXXX'). It seems like things do not work well when you define a column as a function. I can do this same thing with the MySQLDataReader without any problem.
    Can anyone tell me what I am doing wrong here?
    Thanks
    string SelectStatement = "select FILE_ID, DBMS_LOB.Getlength FILE_HDR)...."
    Cmd.CommandText = SelectStatement;
    Reader = Cmd.ExecuteReader();
    if (!Reader.HasRows)
    throw new Exception("Unit File List Query returned no rows");
    else
    totalBytes = 0;
    int HeaderLengthColumnOrdinal = Reader.GetOrdinal("DBMS_LOB.Getlength(FILE_HDR)");
    // Get the number of rows
    while (Reader.Read())
    RowCount++;
    totalBytes += (Int64)Reader.GetInt32(HeaderLengthColumnOrdinal); <- EXCEPTION
    }

    Hi,
    I was kind of thinking I could do something like this:
    CAST(DBMS_LOB.GetLength(BLOB_COLUMN) AS NUMBER(9))That should work OK as well. In fact, here is a small test:
    Database:
    SQL> create table test
      2  (
      3    clob_id number,
      4    clob_data clob
      5  );
    Table created.
    SQL> declare
      2    l_text varchar2(8192);
      3  begin
      4    for i in 1..8192 loop
      5      l_text := l_text || 'A';
      6    end loop;
      7    insert into test values (1, l_text);
      8  end;
      9  /
    PL/SQL procedure successfully completed.
    SQL> commit;
    Commit complete.C#:
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    namespace NumberTest
      /// <summary>
      /// Summary description for Class1.
      /// </summary>
      class Class1
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
          int tempValue = 0;
          string constr = "User Id=xxx; Password=xxx; Data Source=oramag; Enlist=False; Pooling=False";
          // create connection to db
          OracleConnection con = new OracleConnection(constr);
          con.Open();
          // create a command object
          OracleCommand cmd = con.CreateCommand();
          // set command object properties
          cmd.CommandText = "select cast(dbms_lob.getlength(clob_data) as number(9)) from test where clob_id=1";
          // get a data reader
          OracleDataReader dr = cmd.ExecuteReader();
          if (dr.Read())
            try
              tempValue = dr.GetInt32(0);
            catch (Exception ex)
              Console.WriteLine(ex.Message);
          Console.WriteLine("Value: {0}", tempValue.ToString());
          Console.WriteLine("Press ENTER to continue...");
          Console.ReadLine();
          // clean up objects
          dr.Dispose();
          cmd.Dispose();
          con.Dispose();
    }Output:
    Value: 8192
    Press ENTER to continue...Note that I am using Oracle Database 10g 10.2.0.2.0 and ODP.NET beta 2.102.2.10 (the beta for VS2005).
    Hope that helps a bit...
    - Mark

  • HP Client Security Manager 8.3.3.1786 - Specified cast is not valid

    I've recently installed HP Client Security and find usefull accessing the PC using my finger: it works.But I got a problem accessing all USB Drivers. I got the solution reading questions in this forum: I should modify a setting in HP Client Security Manager.But my HP Client Security Manager fails after authentication giving: Specified cast is not validMy PC windows software is updated according to Microsoft Update,  even HP tool says it's all updatedI've bought the PC a little more than a year ago so HP assistence says they can't answer me (but they wrote a note) Error details: at DPClientConsole.FirstBooleanToIntConverter.Convert(Object[] values, Type targetType, Object parameter, CultureInfo culture)
    at System.Windows.Data.MultiBindingExpression.TransferValue()
    at System.Windows.Data.MultiBindingExpression.Transfer()
    at System.Windows.Data.MultiBindingExpression.UpdateTarget(Boolean includeInnerBindings)
    at System.Windows.Data.MultiBindingExpression.AttachToContext(Boolean lastChance)
    at System.Windows.Data.MultiBindingExpression.MS.Internal.Data.IDataBindEngineClient.AttachToContext(Boolean lastChance)
    at MS.Internal.Data.DataBindEngine.Task.Run(Boolean lastChance)
    at MS.Internal.Data.DataBindEngine.Run(Object arg)
    at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
    at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

    @ssheaf 
    ‎Thank you for using HP Support Forum. I have brought your issue to the appropriate team within HP. They will likely request information from you in order to look up your case details or product serial number. Please look for a private message from an identified HP contact. Additionally, keep in mind not to publicly post ( serial numbers and case details).
    If you are unfamiliar with the Forum's private messaging please click here to learn more.
    Thank you,
    Omar
    I Work for HP

  • *An error has occurred: Specified cast is not valid.*  - Infoview Error

    Has anyone encountered this error when logging into Infoview or Report Datasources? 
    I've uninstalled and reinstalled Crystal Reports Server several times and have installed the Service pack1. I'm still getting the same error. I'm using Business Objects 11.
    Any suggestion is appreciated.  Thanks!
    URL:
    [<server>/businessobjects/enterprise11/InfoView/logon.aspx]

    I too am having this issue.  I have followed the support note (1205427) and re-installed .NET Web Component Adapter but the issue is still occurring.
    I am running release 1 of Crystal Reports Server XI Version 11.0.0.12825

  • SSRS runtime error - The specified operation is not valid

    I found a similar post here, but it didn't solve my problem. so i re-post it.
    i develop a report with vs2008. i have sql 2008 r2 on my local machine. when i preview the report on my local machine all fine. but when i deployed the report to sql 2008 ssrs server, i got "#Error" in my subtotal field. i opened the log file and found the
    error message:
    The specified operation is not valid. , ;
     Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: The specified operation is not valid.
    i used a formular in the expression:
    =Sum(IIf(Fields!flag.Value="S",Fields!Size.Value,0))
    can someone help?
    thanks

    I want to make my problem more clear:
    1. with the original formula: =Sum(IIf(Fields!Fundflag.Value="S",Fields!FundSize.Value,0)) works very well on my local machine with clicking on Preview. Once deploy to server, i got error.
    2.Shahfaisal, your formula works on both side, but not the result i except. because the size field in sp unioned from different source. i only want to subtotal when flag is "S".
    any help will be appreciated!
    Try this
    =Sum(IIF(IsNumeric(Fields!Size.Value)
    AND Fields!flag.Value="S",Fields!Size.Value,0))

  • Problem on using Crystal Report Viewer on windows application ("specified type is not valid ")

    Hi
    I am having problem on using Crystal Report Viewer on one of my windows application.
    I am not sure how to put the Crystal Report Viewer 11 Control onto the tool box.
    I could found a Crystal Report Viewer control on my computer, but it is version 8.5.
    I have also found another one which is Called Crytal ActiveX Report Viewer, i don't think it is the one I can use. As when I try to load a dummy report on to the Crytal ActiveX Report Viewer, It return an error. "specified type is not valid"
    Please see the Code sample below.
    private sub loadReport()
         Dim r as New ReportDocument
         'v is the name of the Crystal ActiveX Report Viewer Control
         r.Load("C:\Report1.rtp")
         v.ReportSource(r) <---It throw error on this line.
    End Sub
    Could you give me some advice about what have I done wrong, How to check if I have set up the Crystal Report Component correctly in my Visual Studio 2005 Standard edition.
    Thanks in advances.
    Many thanks
    Chi

    VS 2005 Standard and Express editions do not come with Crystal Reports; only the Professional and higher editions will have CR bundled. However, I believe you can purchase CR XI R2 Developer and it will give you the components you need to create a VS .NET 2005 application using the Standard edition.
    -MJ

  • TF244074: The specified argument is not valid: enterpriseProject

    Run a command to map Project Server project with TFS Team project:
    TfsAdmin ProjectServer /MapPlanToTeamProject /collection:"http://srv-shrp05-lv:8080/tfs/DefaultCollection/" enterpriseProject:"Team Project 1" /teamProject:"Team Project 1"  /workItemTypes:"Bug,Issue,User
    Story,Task"
    and got error:
    TF244074: The specified argument is not valid: enterpriseProject.
    I gave necessary permissions to TFS and Project App Pool accounts and don't know what else should I do?

    Did you ever get this figured out I am having the same issue?

  • The specified index is not valid for the given resource

    I am trying to follow the tutorial on how to get Labview working with Solidworks and the demo CNC robot that the example comes with. After I deploy all the axes and my computer and the assembly file I try and switch the scan engine to active mode but it won't let me. It pops up with an error;
    "An error occured while attempting to switch the I/O scan mode. The specified index is not valid for the given resource".
    I'm just trying to do a basic straight line move with one axis. Does anyone know how I can fix this? I updated softmotion with Sp1 already and did all the recommended updates.

    I talked to some of our developers to get some more ideas for this error. Try the following:
    Go to the file path C:\ProgramData\National Instruments\DeploymentFramework (it is a hidden file so you may need to change your settings to see it)
    Delete the contents of that folder.
    Restart LabVIEW
    Redeploy your axes and see if it works.
    If it does not, repeat the process but create a new project after LabVIEW restarts.
    Cameron T
    Applications Engineer
    National Instruments

  • Crystal report for visual studio 2010 data source object is not valid error

    Hello,
    I receive an "data source object is not valid" error when I want to print one CR document after setting an ADODB.Recordset on SetDataSource method of my report.
    On my developer station, this operation works without problem but on client station, I get this error.
    The redistributable package for client is installed on client side (CRRuntime_32bit_13_0_1.msi).
    Can someone help me?
    Thank you.

    Thank's for your answers
    Dim rsPkLst As ADODB.Recordset = Nothing
    Dim report As New crPickingList
    ' Fill ADODB.Recordset with SQL Statment
    If rsPkLst.RecordCount > 0 Then
          report.SetDataSource(rsPkLst) ' Error : The data source object is invalid
    EndIf
    This error appears during  "report.SetDataSource(rsPkLst)" instruction.
    ADODB drivers are already installed and my ADODB.Recordset is filled with good records.
    This project is an updated project from Visual Studio 2003 to Visual studio 2010 and the old version was running fine.
    Developer and client station runs under Windows XP SP3.
    On developer side I install CRforVS_13_0_1 (BuildVersion=13.0.1.220.Cortez_CR4VS).
    On client side I install CRRuntime_32bit_13_0_1.msi.
    Both stations use Microsoft .Net Framework 4.
    Move to ADO.NET is a solution but, for the moment, I do not have the time to change all applications from my company.
    (I get this error from all application updated from VS 2003 to VS 2010 developed since 2005)
    David.

  • Key not valid error message when trying to download software

    i cant download software for my envy 5532 keep getting error message ( key not valid for use in specified state ). 
    This question was solved.
    View Solution.

    This problem is related to Microsoft Update KB2918614
    The fix is to remove this update.
    How to remove a Windows Update in Vista
    If the fix works I recommend that you 'hide' it so that it doesn't get reinstalled automatically.
    Instructions below:
    If you don't want Windows to install an update, you need to hide it.
    Open Windows Update by clicking the Start button . In the search box, type Update, and then, in the list of results, click Windows Update.
    In the left pane, click Check for updates.
    When Windows finds updates for your computer, do one of the following:
    Click the link that tells you important updates are available if you have important updates to hide.
    Click the link that tells you optional updates are available if you have optional updates to hide.
    Right-click the update you don't want to install, and then click Hide update. The next time you check for updates, the update won't be automatically selected or installed.  If you're prompted for an administrator password or confirmation, type the password or provide confirmation.
    If you found my answer helpful please say thanks by clicking on the Thumb's Up icon. Thanks!

Maybe you are looking for

  • Interactive Report based on View

    Hello! I've just started to rewrite my Forms applications to Apex. Based on an existing view I want to create an Interactive Report, but there is only the choice between 'Table' and 'SQL statement'. Is there a way to use the view in a direct manner (

  • How do I delete a single line in a WAD input layout?

    Hello to all, I've created a standard delete function and I don't know how to "data bind" it to a single line of my web layout in order to only delete the selected line. Can anyone please help and explain how to do it? Thanks in advance for your help

  • ITunes 8.0.2 won't back up Library!

    I have updated to iTunes 8.0.2.20 the latest version. This seems to be a very buggy version. At first it would insist on backing up via my DVD-rom drive and not the DVD burner. I 'solved' that by attempting to burn a playlist, and that permitted me t

  • Keyboard problems

    I'm having trouble logging in to my Late 2008 15" MacBook Pro. I'm able to enter my password but when I press return a character is entered every time I press the key.  I have no idea what character the computer thinks that key represents all of sudd

  • Passing byte Arrays broken in 1.4?

    I have an application that I am porting from 1.2.2 to 1.4. Code that used to work fine is now broken. All byte arrays that are passed through the JNI have each element set to 0. Is this a known bug, or has something changed in the JNI API? Here is a