Subreport content is lost when applying a custom dataset

<p>Hello everybody, </p><p>Linked subreport shows data properly in Report Designer preview mode. But if I apply a custom dataset to the subreport in runtime (the query text is exactly the same, though), the subreport becomes empty. What&#39;s the problem could be there? </p><p>Thanks in advance, Alexey</p>

<p>Maybe the linking is breaking when you attach the dataset at runtime.  Does it work for a regular un-linked subreport? </p><p>Rob Horne<br /><a href="/blog/10">Rob&#39;s blog - http://diamond.businessobjects.com/blog/10</a></p>

Similar Messages

  • Content of the subreport is lost when applying a custom dataset

    <p>Subreport displays correct data when I make a preview in Report Designer.</p><p> </p><p>When I substitute subreport&#39;s dataset by a custom one (exactly the same query, though) in runtime, the subreport becomes empty. </p><p> </p><p>What&#39;s the problem could be there?<br /></p>

    More than likely, the problem is that the dataset is not matching the data types that the report is expecting. I suspect if you export the report to rpt file format, you will see that all the fields are stripped out - when you open that exported report in the designer. A cool way to check this out is to write out the dataset to XML as:
    myDataset.WriteXml(xmlPath, XmlWriteMode.WriteSchema)
    Do the above just before you set the dataset to the report. Then open the report in the CR designer and use the ADO .NET XML driver (Database menu -> Set datasource location) to point at the xml you just created. If you get filed mapping dialog, that will tell you where the report is confused as to which field is which.
    Ludek

  • Applying a custom dataset to the subreport fails

    System.Runtime.InteropServices.COMException (0x80040203): The communication channel has not been created.
       at CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.ReplaceConnection(Object oldConnection, Object newConnection, Object parameterFields, Object crDBOptionUseDefault)
       at CrystalDecisions.CrystalReports.Engine.Table.SetDataSource(Object val, Type type)
       at CrystalDecisions.CrystalReports.Engine.Table.SetDataSource(DataTable dataTable)
    exception raises when I try to pass a custom Dataset to a subreport's table via Table.SetDataSource.
    Does anybody knows what happens?
    ps: CR for MS VisualStudio 2005

    I use Visual Studio 2005 and Visual Basic, making a report web site with aspx
    ..NET. The code listed below is in a separate class supporting an aspx. Here
    is the core of my code
    I have report and subreport in my web page
    At startup the report including its subreport shows up fine. If I need a
    refresh, e.g. change to 75% size, go to another page or similar, the code is
    run again but then fails on the statement
    Report2.SetDataSource(SubreportDataValues)
    and the exception message is "The communication channel has not been created."
    It is a System.Runtime.InteropServices.COMException that occurred in
    CrystalDecisions.CrystalReports.Engine.dll
    If I "let it run", my web page shows up with a message saying:
    This group section cannot be printed because its condition field is
    nonexistent or invalid.
    Format the section to choose another condition field. Error in File
    C:\DOCUME1\JAKKI\LOCALS1\Temp\MainReport
    {8E62F51C-012E-410F-BF4A-CBF9E9AB52D5}.rpt: Invalid group condition.
    I believe this is a bi-effect of the real problem. The real problem, I
    think, is that the communication between the Crystal subreport (i.e. report
    engine) and my data is lost in the postback. (I insert "my own" data into the
    two arraylists and store them in session variables for persistance. Changing
    the order of SetDataSource (main report before subreport or vice versa) has
    no effect.)
    I guess the question is "How can I retain (or re-establish) the
    "communication channel" (I don't know the details about what that is -
    between what?) (for the subreport) across web page refresh (i.e. postback)"?
    When I look at the web pages of Business Objects (the vendor of Crystal
    Reports) it looks as this is a bug in Crystal Reports, but that a fix (patch)
    can not be installed as long as I use Crystal Reports embedded in Microsoft
    Visual Studio.
    Is there any Microsoft or Business Objects professionals (or other) who can
    tell me how to get around this problem? Advise a method to retain a subreport
    in a main report across postbacks?
    Please help me.

  • Problem when applying a custom stamp, it shows on my document on the screen but when I print it, the stamp is not there.

    I have my pdf open, I created a custom stamp.  Applied the stamp to the document and I see it.  Save my document and then do either a print preview or print it and the stamp is not showing!  This method of applying stamps used to work but something has changed.  I thought it even worked when using Acrobat Standard X but can't be sure.  Really need help as even documents I created previously with stamps applied and I have proof that they printed with the stamp, won't print with the stamp on it.  Thank you.

    You don't even need to use a third party tool.
    Open the JavaScript Console (Control+J)
    Type the text string below in the JavaScript Console and hit Control+Return key.
    this.flattenPages();
    It will flatten all of the annotations and fields within the document to ensure that all the comments and stamps print.

  • Pictures lost when applying update

    I recd an alert that an upgrade was available and followed the prompts.  Once complete I came to see all of my pictures were gone.  My contacts remained but not pictures.  Is there any way to retrieve them??  Maybe uninstall the upgrade if possible???  Bear with me as I am by no means a guru on BBs.....thank you!!!!

    Sorry, I hate these Over The Air wireless updates. You should ALWAYS do a backup of the device before performing any operating system upgrade. There needs to be a warning that loss of data can occur.
    Anyway, do this now, go to your Media Icon, press the Menu key > Explore.
    Look in ALL folders, everywhere, and see if you find the images.
    You sure you didn't have these saved to the Media Card? Or you don't even have a Media Card in the device?
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How can i view and apply new custom patterns without going to preset manager? i had this facility but have now lost it

    how can i view and apply new custom patterns without going to preset manager? i had this facility but have now lost it.  i design patterns but am fairly new to photoshop. i used to be able to click on the drop down menu in patterns in the 'fill' box but cannot now do this.  have i inadvertently clicked on something to turn this facility off?  i now have to go to 'preset manager' and manually move my new design to the first box and click 'done' so that i can use it.

    Which version of photoshop are you using?
    After you define a custom pattern it should be added to the bottom of whatever patterns are already loaded.
    For example, if you define a custom pattern and then go to Edit>Fill>Pattern, the newly defined pattern should have been added to the existing loaded patterns.

  • SG 7.1x158 crashes when applying custom look with Premier Dynamic Link

    The sequence opens just fine, and I'm able to create a grade for a selected clip.  However, when I save the custom look and then try to apply it to any other clip, SG crashes.  Odd thing is that I've tried a couple of the example looks and they don't crash.  Crash only occrus when I choose any of the custom looks I've saved. 
    Only workaround I see at this point is to apply the look using Lumetri in Premier, which seems to work just fine.
    Anyone else run into this problem?
    --Ken

    Hi,
    This is a known issue when applying custom looks with masks. We are working in a solution, please keep tuned.
    Thanks,
    Fran

  • What styles are lost when importing/converting PS text to editable text?

    In CS5.5, when I import a PSD file with one or more text layers (retaining layer styles and editable layer styles) some of the layer styles change upon import.
    In addition, after import, in the Comp panel, sometimes there are no visual differences between that display and the display in PS. But in individual style layers in the Timeline panel, things have changed. Most typically, strokes with gradients are changed either to a solid color (gray or red) or to a simple white-to-black gradient. How is it the display can show a gradient when the stroke layer shows a solid color?
    When the text layers are converted to editable text, those changed style properties kick in.
    I'm guessing some or all of this has to do with AE text not being able to have a gradient for the fill or stroke? That being the case, is there a work-around?
    If this goes beyond not being able to use a gradient for fill or stroke, what are the "rules"? What styles are lost/changed upon import and when converting to editable text?
    Jeff Sengstack

    > In addition, after import, in the Comp panel, sometimes there are no visual differences between that display and the display in PS. But in individual style layers in the Timeline panel, things have changed. Most typically, strokes with gradients are changed either to a solid color (gray or red) or to a simple white-to-black gradient. How is it the display can show a gradient when the stroke layer shows a solid color?
    After Effects includes the entire Photoshop rendering engine, so any PSD and its layer styles should render fine (i.e., just like in Photoshop). If it doesn't, please submit a bug report.
    But After Effects does not include the entire UI from Photoshop for creating and modifying layer styles.
    The layer styles feature in After Effects exists primarily to provide fidelity between what you see in Photoshop and what you see in After Effects---not so that you can add and modify layer styles in After Effects. The UI in the Timeline panel is therefore a barebones implementation that doesn't include many of the features of layer styles in Photoshop. As you observe, there are many cases in which the representation in the Timeline panel is much more simplistic than what is in the Composition panel.
    This separation between the UI and the ability to render with good fidelity is most apparent with pattern overlays. See this video for a good demonstration of how to use layer styles in After Effects by tapping into these features in Photoshop:
    http://library.creativecow.net/articles/harrington_richard/photoshop_layer_styles_with_ae. php
    > In CS5.5, when I import a PSD file with one or more text layers (retaining layer styles and editable layer styles) some of the layer styles change upon import.
    How, exactly, do they change? A screenshot would be useful.
    If it's what I'm suspecting, then the page that Mylenium points you to has the clue:
    "When a layer style is applied to a vector layer—such as a text layer, a shape layer, or a layer based on an Illustrator footage item—visual elements that apply to the edges of the contents of the layer apply to the outlines of the vector objects, such as text characters or shapes. When a layer style is applied to a layer based on a non-vector footage item, the layer style applies to the edges of the layer’s bounds or masks."
    When you convert between Photoshop text and editable text, you're changing the render order and also switching between raster images and vectors. This can affect appearance in many ways.

  • OK, I need to be able to have a linked TOC, and also have destinations created in FM10 that will not be lost when I 1. Save the book as a PDF. then 2.  need the PDF to be as small as possible, but without losing my destinations. Anyone know how to do that

    OK, I need to be able to have a linked TOC, and also have destinations created in FM10 that will not be lost when I 1. Save the book as a PDF; then 2. I need the PDF to be as small as possible, but without losing my destinations. Anyone know how to do that??
    I had been saving as a PDF and then reducing the size of the PDF by printing it as a PDF with a degree of image compression. I write manuals with a LOT of screen captures and line art that needs to be clear. So it is a balancing act between image clarity and PDF size. The PDFs on the web need to be smaller - sure you can undertsand.
    Anyway, when I print the PDF again, I lose both my destinations and bookmarks.
    Anyone know of any way to avoid that?

    Control the images by creating a custom PDF Job Options and then selecting it in the PDF Job Options drop-down of the PDF setup dialog box (File > Save as PDF...)
    Create the custom PDF Job Options file with Distiller. If you do not have Distiller, open the Printing Preferences of the Adobe PDF printer. Start with the Smallest File Size Job Options settings and Edit.

  • Error when reassigning a custom task process

    Hello!
    I have an error when reassigning a custom task process.
    That is what I see at the workflow history: Task assigned to xxx was delegated by xxx. Coments: xxx
    However in the second line of the history an error is shown with the following information:
    Event type: error
    User ID: System account
    Description: An error has occurred in nameofthetask
    No new task is created for the user who the task was reassigned to.
    Any help would be appreciated

    Hi,
    From the error message, I
    guess that you come across an OOTB Approval
    Workflow.
    When you define your workflow, there is a section "Enable content Approval Workflow Activities", where you can check "Update the approval status after the workflow is completed (use
    this workflow to control content approval)". If you check this option, and you do not have content approval enabled on the library level, you get the system account error message. If you do not check it, everything works fine.
    Or you can go to the document library settings and go to Versioning Settings Page, set "Require content approval for submitted items to?" to yes and everything should be fine.
    Refer to  the following blogs about the similar issue:
    http://mossnwss.blogspot.com/2008/10/workflow-error-system-account-error-has.html
    https://sharepointtechs.wordpress.com/2011/11/18/workflow-error-an-error-has-occurred-in-approval/
    Besides, here is a similar post, you can use as a reference:
    https://social.msdn.microsoft.com/Forums/en-US/fff5ee1f-904b-4a95-989f-c5a079cdf666/workflow-error-system-account-an-error-has-occured-after-workflow-completed-moss-2007?forum=sharepointcustomizationlegacy
    Best Regards,
    Lisa Chen
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How Nokia Lost Me as a Customer

    Dear Nokia,
    I am not sure if this is the right place to post this message, but I am tired of not being heard by any of the other means of communication with the company.
    I bought a Nokia Lumia 900 around April 2012 (right after release) for full price and off-contract. The phone works great and looks even better. In terms of functionality, wp7.5 is great and in my honest opinion way better than iOS and Android. In fact, I was thrilled to hear Nokia had gone with Windows Phone, which definitely factored into my desicion to buy the Lumia originally.
    However, what I did not know, was the extent of neglect that Nokia would put me through after that. I am a student, and about 3 months after I bought the phone, I left the US to begin a study abroad program in Spain. When I tried to unlock my Lumia 900 for international use, I hit a brick wall. As it turned out, the Lumia 900 is an AT&T exclusive, so while Rogers users (in Canada) and in other networks around the world could unlock theirs without an issue, AT&T users were STUCK until the magical date of October 8th (the date at which the phone would become eligible for unlock). 
    We are now at October 17th, and despite my numerous attempts to obtain an unlock code, my phone is still locked. This is what my experience has been: AT&T asks for my IMEI #, then claims that the phone is indeed eligible for unlock, but they cannot for whatever reason find the code. After HOURS on the phone, they "opened a case" for it, for which I never received an answer. AT&T also recommended calling Nokia. Off to call Nokia. Nokia says that they do not have the unlock codes, and that I should call Microsoft. Off to call Microsoft. Microsoft says that they do not have the codes, and that I should call AT&T. Needless to say how much time has been wasted on this and how stressful, frustrating and futile the effort has been.
    This entire issue is not even to mention the fact that my phone will not be able to support Windows Phone 8. Which essentially means that I am stuck, overseas, with an obsolete phone that I can't use and can't sell.
    Thank you Nokia for at least venting my frustration. Unfortunately though, you have lost a previously passionate customer.
    Best,
    Max S

    Hi maxisultan,
    Thanks for your post and welcome!
    Sorry to hear about your experience obtaining an unlock code. Providing unlock codes is the responsibility of the carrier and Nokia Care will not be able to assist you with this. Besides that Nokia Support Discussions is a user to user support platform and not a 'direct to Nokia' support channel.
    I understand that being in Europe will make it more difficult to communicate with AT&T but unfortunately there is no other option. I will however forward your post internally and ask for this to be looked into. You are obviously free to contact Nokia Care USA directly to voice your opinion on this to them as well. You could ask them to also forward this. You can reach them through voice, mail or chat using the 'Contact us' link on this page.
    Press the 'Accept As Solution' icon if I have solved your problem, click on the Star Icon below if my advice has helped you!

  • How to keep Uploaded file's content between calls-content is lost in region

    hi,
    UploadedFile content lost when saving to pageFlowScope.
    the use case is to upload a binary file into db. jdev 11.1.2.3
    i try to start from
    http://tompeez.wordpress.com/tag/affiledownloadactionlistener/
    and instead of making all the handling in inputFile's ValueChangeEventListener(),
    i'd like to split functionality between inputfile and a run button.
    user chooses a file using inputFile
    then in backingbean of the request scope
    UploadedFile file = (UploadedFile) valueChangeEvent.getNewValue();
    Map<String,Object> pageFlowScope = adfFacesContext.getPageFlowScope();
    pageFlowScope.put("uploadedfile",file);
    in button's ActionEventListener i try to recall UploadedFile.
    Map<String,Object> pageFlowScope = adfFacesContext.getPageFlowScope();
    UploadedFile file;
    file=(UploadedFile)pageFlowScope.get("uploadedfile");
    what i found out is fileName=file.getFilename() still shows the original filename, but...
    file.getLength() returns 0;
    at the same time, when called from ValueChangeEventListener() file.getLength() gets the actual number of bytes
    what might cause the content to disappear?
    i tried to change backing bean's scope to pageFlowScope without any success
    Edited by: grodno on Feb 28, 2013 4:26 AM
    Edited by: grodno on Mar 1, 2013 12:49 AM

    This will not work as the stream will not be available after the request.
    You can set the value propety of the af:inputFile directly to the pageflowScopeBean like
    <af:inputFile label="File"
                                    value="#{pageFlowScope.fileData}" id="if1"/>
       private UploadedFile fileData;
        public void setFileData(UploadedFile afile)
            this.fileData = afile;
        public UploadedFile getFileData()
            return fileData;
    public actionListener(ActionEvent av) {
            // and in the action listener
            // TODO aktuelles bild kann nicht über getBildNr() geladen werden
            if (getBildDatei() == null)
                return null;
            UploadedFile file = getBildDatei();
            //work as usual
    }Be careful with putting the UploadFile in pageFlowScope as this scope is too broad. You should use ViewScope.
    Timo

  • C# COM server events "lost" when raising events while Excel is in edit mode

    I posted this question on StackOverflow (http://stackoverflow.com/questions/23798443/c-sharp-com-server-events-lost-when-raising-events-while-excel-is-in-edit-mode) but did not receive a good answer, so I'm trying my luck here.
    I have an in-proc COM server written in C# (using .NET Framework 3.5) that raises COM events based on this example: http://msdn.microsoft.com/en-us/library/dd8bf0x3(v=vs.90).aspx
    Excel VBA is the most common client of my COM server.  I’ve found that when I raise COM events while Excel is in edit mode (e.g. a cell is being edited) the event is “lost”.  Meaning, the VBA event handler is never called (even after the Excel
    edit mode is finished) and the call to the C# event delegate passes through and fails silently with no exceptions being thrown.  Do you know how I can detect this situation on my COM server?  Or better still, make the event delegate call block until
    Excel is out of edit mode?
    I have tried:
    Inspecting the properties of the event delegate – could not find any property to indicate that the event failed to be raised on the client.
    Calling the event delegate directly from a worker thread and from the main thread – event not raised on the client, no exceptions thrown on the server.
    Pushing the event delegate onto a worker thread’s Dispatcher and invoking it synchronously – event not raised on the client, no exceptions thrown on the server.
    Pushing the event delegate onto the main thread’s Dispatcher and invoking it synchronously and asynchronously – event not raised on the client, no exceptions thrown on the server.
    Checking the status code of the Dispatcher.BeginInvoke call (using DispatcherOperation.Status) – the status is always ends with “Completed”, and is never in “Aborted” state.
    Creating an out-of-proc C# COM server exe and tested raising the events from there – same result, event handler never called, no exceptions.
    Since I get no indication that the event was not raised on the client, I cannot handle this situation in my code.
    I have tested this with Excel 2010 and Excel 2013.
    Here is a simple test case.  The C# COM server:
    namespace ComServerTest
    public delegate void EventOneDelegate();
    // Interface
    [Guid("2B2C1A74-248D-48B0-ACB0-3EE94223BDD3"), Description("ManagerClass interface")]
    [InterfaceType(ComInterfaceType.InterfaceIsDual)]
    [ComVisible(true)]
    public interface IManagerClass
    [DispId(1), Description("Describes MethodAAA")]
    String MethodAAA(String strValue);
    [DispId(2), Description("Start thread work")]
    String StartThreadWork(String strIn);
    [DispId(3), Description("Stop thread work")]
    String StopThreadWork(String strIn);
    [Guid("596AEB63-33C1-4CFD-8C9F-5BEF17D4C7AC"), Description("Manager events interface")]
    [InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
    [ComVisible(true)]
    public interface ManagerEvents
    [DispId(1), Description("Event one")]
    void EventOne();
    [Guid("4D0A42CB-A950-4422-A8F0-3A714EBA3EC7"), Description("ManagerClass implementation")]
    [ComVisible(true), ClassInterface(ClassInterfaceType.None)]
    [ComSourceInterfaces(typeof(ManagerEvents))]
    public class ManagerClass : IManagerClass
    private event EventOneDelegate EventOne;
    private System.Threading.Thread m_workerThread;
    private bool m_doWork;
    private System.Windows.Threading.Dispatcher MainThreadDispatcher = null;
    public ManagerClass()
    // Assumes this is created on the main thread
    MainThreadDispatcher = System.Windows.Threading.Dispatcher.CurrentDispatcher;
    m_doWork = false;
    m_workerThread = new System.Threading.Thread(DoThreadWork);
    // Simple thread that raises an event every few seconds
    private void DoThreadWork()
    DateTime dtStart = DateTime.Now;
    TimeSpan fiveSecs = new TimeSpan(0, 0, 5);
    while (m_doWork)
    if ((DateTime.Now - dtStart) > fiveSecs)
    System.Diagnostics.Debug.Print("Raising event...");
    try
    if (EventOne != null)
    // Tried calling the event delegate directly
    EventOne();
    // Tried synchronously invoking the event delegate from the main thread's dispatcher
    MainThreadDispatcher.Invoke(EventOne, new object[] { });
    // Tried asynchronously invoking the event delegate from the main thread's dispatcher
    System.Windows.Threading.DispatcherOperation dispOp = MainThreadDispatcher.BeginInvoke(EventOne, new object[] { });
    // Tried synchronously invoking the event delegate from the worker thread's dispatcher.
    // Asynchronously invoking the event delegate from the worker thread's dispatcher did not work regardless of whether Excel is in edit mode or not.
    System.Windows.Threading.Dispatcher.CurrentDispatcher.Invoke(EventOne, new object[] { });
    catch (System.Exception ex)
    // No exceptions were thrown when attempting to raise the event when Excel is in edit mode
    System.Diagnostics.Debug.Print(ex.ToString());
    dtStart = DateTime.Now;
    // Method should be called from the main thread
    [ComVisible(true), Description("Implements MethodAAA")]
    public String MethodAAA(String strValue)
    if (EventOne != null)
    try
    // Tried calling the event delegate directly
    EventOne();
    // Tried asynchronously invoking the event delegate from the main thread's dispatcher
    System.Windows.Threading.DispatcherOperation dispOp = System.Windows.Threading.Dispatcher.CurrentDispatcher.BeginInvoke(EventOne, new object[] { });
    // Tried synchronously invoking the event delegate from the main thread's dispatcher
    System.Windows.Threading.Dispatcher.CurrentDispatcher.Invoke(EventOne, new object[] { });
    catch (System.Exception ex)
    // No exceptions were thrown when attempting to raise the event when Excel is in edit mode
    System.Diagnostics.Debug.Print(ex.ToString());
    return "";
    return "";
    [ComVisible(true), Description("Start thread work")]
    public String StartThreadWork(String strIn)
    m_doWork = true;
    m_workerThread.Start();
    return "";
    [ComVisible(true), Description("Stop thread work")]
    public String StopThreadWork(String strIn)
    m_doWork = false;
    m_workerThread.Join();
    return "";
    I register it using regasm:
    %SystemRoot%\Microsoft.NET\Framework\v2.0.50727\regasm /codebase ComServerTest.dll /tlb:ComServerTest.tlb
    Excel VBA client code:
    Public WithEvents managerObj As ComServerTest.ManagerClass
    Public g_nCounter As Long
    Sub TestEventsFromWorkerThread()
    Set managerObj = New ComServerTest.ManagerClass
    Dim dtStart As Date
    dtStart = DateTime.Now
    g_nCounter = 0
    Debug.Print "Start"
    ' Starts the worker thread which will raise the EventOne event every few seconds
    managerObj.StartThreadWork ""
    Do While True
    DoEvents
    ' Loop for 20 secs
    If ((DateTime.Now - dtStart) * 24 * 60 * 60) > 20 Then
    ' Stops the worker thread
    managerObj.StopThreadWork ""
    Exit Do
    End If
    Loop
    Debug.Print "Done"
    End Sub
    Sub TestEventFromMainThread()
    Set managerObj = New ComServerTest.ManagerClass
    Debug.Print "Start"
    ' This call will raise the EventOne event
    managerObj.MethodAAA ""
    Debug.Print "Done"
    End Sub
    ' EventOne handler
    Private Sub managerObj_EventOne()
    Debug.Print "EventOne " & g_nCounter
    g_nCounter = g_nCounter + 1
    End Sub
    This problem also occurs for a C++ MFC Automation server that raises COM events.  If I raise the COM event from the main thread when Excel is in edit mode, the event handler is never called.  No errors or exceptions are thrown on the server,
    similar to my C# COM server.  However, if I use the Global Interface Table to marshal the event sink interface from the main thread
    back to the main thread, then invoking the event - it will block while Excel is in edit mode.  (I also used COleMessageFilter to disable the busy dialog and not responding dialogs, otherwise I'd receive the exception:
    RPC_E_CANTCALLOUT_INEXTERNALCALL It is illegal to call out while inside message filter.)
    Knowing that, I tried to do the same on my C# COM server.  I could instantiate the Global Interface Table (using the definition from pinvoke.net) and the message filter (using the IOleMessageFilter definition from MSDN).  However, the event still
    gets "lost" and does not block while Excel is in edit mode.
    Here's my additional C# code to try to make use of the Global Interface Table:
    namespace ComServerTest
    // Global Interface Table definition from pinvoke.net
    ComImport,
    InterfaceType(ComInterfaceType.InterfaceIsIUnknown),
    Guid("00000146-0000-0000-C000-000000000046")
    interface IGlobalInterfaceTable
    uint RegisterInterfaceInGlobal(
    [MarshalAs(UnmanagedType.IUnknown)] object pUnk,
    [In] ref Guid riid);
    void RevokeInterfaceFromGlobal(uint dwCookie);
    [return: MarshalAs(UnmanagedType.IUnknown)]
    object GetInterfaceFromGlobal(uint dwCookie, [In] ref Guid riid);
    ComImport,
    Guid("00000323-0000-0000-C000-000000000046") // CLSID_StdGlobalInterfaceTable
    class StdGlobalInterfaceTable /* : IGlobalInterfaceTable */
    public class ManagerClass : IManagerClass
    //...skipped code already mentioned in earlier sample above...
    //...also skipped the message filter code for brevity...
    private Guid IID_IDispatch = new Guid("00020400-0000-0000-C000-000000000046");
    private IGlobalInterfaceTable m_GIT = null;
    public ManagerClass()
    //...skipped code already mentioned in earlier sample above...
    m_GIT = (IGlobalInterfaceTable)new StdGlobalInterfaceTable();
    public void FireEventOne()
    // Using the GIT to marshal the (event?) interface from the main thread back to the main thread (like the MFC Automation server).
    // Should we be marshalling the ManagerEvents interface pointer instead? How do we get at it?
    uint uCookie = m_GIT.RegisterInterfaceInGlobal(this, ref IID_IDispatch);
    ManagerClass mgr = (ManagerClass)m_GIT.GetInterfaceFromGlobal(uCookie, ref IID_IDispatch);
    mgr.EventOne(); // when Excel is in edit mode, event handler is never called and does not block, event is "lost"
    m_GIT.RevokeInterfaceFromGlobal(uCookie);
    I’d like my C# COM server to behave in a similar way to the MFC Automation server.  Is this possible?  I think I should be registering the ManagerEvents interface pointer in the GIT but I don't know how to get at it? I tried using Marshal.GetComInterfaceForObject(this,
    typeof(ManagerEvents)) but that just throws an exception: System.InvalidCastException: Specified cast is not valid.
    Thanks.

    Hi Jason-F,
    I’ve found that when I raise COM events while Excel is in edit mode (e.g. a cell is being edited) the event is “lost”.  Meaning,
    the VBA event handler is never called (even after the Excel edit mode is finished) and the call to the C# event delegate passes through and fails silently with no exceptions being thrown.
    Do you mean you didn't raise EventOne event? EventOne handler like following?
    ' EventOne handler
    Private Sub managerObj_EventOne()
    Debug.Print "EventOne " & g_nCounter
    g_nCounter = g_nCounter + 1
    End Sub
    After test your code, here is my screenshot
    And here is my execute log in C# ComServerTest.
    ManagerClass1/1/2015 5:48:11 PM
    DoThreadWork()1/1/2015 5:48:12 PM
    ManagerClass_EventOne()1/1/2015 5:48:17 PM
    ManagerClass_EventOne()1/1/2015 5:48:22 PM
    ManagerClass_EventOne()1/1/2015 5:48:27 PM
    ManagerClass_EventOne()1/1/2015 5:48:32 PM
    ManagerClass_EventOne()1/1/2015 5:48:37 PM
    ManagerClass_EventOne()1/1/2015 5:48:42 PM
    ManagerClass1/1/2015 5:49:56 PM
    DoThreadWork()1/1/2015 5:49:56 PM
    ManagerClass_EventOne()1/1/2015 5:50:01 PM
    ManagerClass1/1/2015 5:50:04 PM
    If i misunderstand you, please feel free to let me know.
    Best regards,
    kristin
    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.

  • Part of path lost when importing autogenerated files

    Hope someone can help as can't find anything on the forum about this.
    Have two Framemaker 8 books, one of which contains all the files for a future publication, including LOT, LOF and IX.  This is the full publication but most of it is still heavily in draft.  The second book represents the first release of the publication and has only a small subset of agreed content.  The idea is that the publication will grow in time.
    The second book is in a subdirectory below the directory containing the first book and the full set of files.  It has its own LOT,LOF and IX.  It also links up to a few of the files above, the ones that are in the first release. The LOT, LOF and IX contain contain references only to these few content files. Have done it this way rather than put everything in one directory, as there will be a number of subsets, with multiple PDFs produced for review from each before the finalised PDF containing the current content to be released at any one time, and don't want them all in the same directory with the management problems that would introduce, and risk of people selecting the wrong version of a LOT, LOF etc. The content files with the actual text in are not duplicated in this subdirectory; the book just links to them in the directory above itself.
    All was well on one PC but needed to work on a second also. This second one has a different directory structure and it isn't possible to change it because of the different policies in place.  So copied the main directory and the other subdirectory beneath to the new PC.  All appeared OK; the lower level book found the files above etc.
    To clarify the structure on the second PC is this:
    \dir0\dir1\dir2\Content directory - place where the first book plus the preface, glossary/index and the other files in the draft book - the main body
    ..dir0\dir1\dir2\Content directory\dirA - place where the second book and LOT, LOF, IX are for the book to be published first (the .. represents some other directories from the root)
    (On the first PC, it was \dir0\dir1\Content directory\ and dir0\dir1\Content directory\dir A - and this is the shorter path from the root)
    When trying to generate the PDF on the second realised something had gone wrong and then found that the problem began in FMkr. The symptom is this:
    The LOT, LOF and IX autogenerated files are fine within the book, their links can be clicked and they go to the source files (in the directory above).  BUT these files aren't part of the actual publication.  The LOT and LOF are embedded in a Preface (one of the files in level above) and the IX is embedded in a Glossary and Index file (ditto). When these are imported into the Preface or Glossary as appropriate, whether by reference or by actually including the file, the result is the same - the links become non clickable and an error is saying that the file can't be found. The path is partly truncated - it excludes the directory where the files actually are.
    So for a link to the Introduction.fm file, FMkr says it is looking for it as ..dir0\dir1\dir2\Introduction.fm and not ..dir0\dir1\dir2\Content directory\Introduction.fm where it actually is.
    This occurs even if the whole structure is copied elsewhere to a place higher in the hierarchy. It isn't possible to reproduce the structure on the first PC because of the configuration of the second PC.  Have tried taking the LOT etc. out of the second book then regenerating them from scratch - they are fine, the links in them are fine, but when imported into the other files, the links miss out the directory which actually holds the source files where the links point to. Must emphasise this did not happen on the first PC.
    Any ideas gratefully received.

    Thanks Sheila, have now overcome my problem with editing the post (duh!)
    Hope the below is clear enough as cannot send an actual screen shot. Have discovered that the number of directories above in path is a red herring because the problem now happens back on the original pc when the book and files are copied back to it.
    Have tried creating a test book with only the index, glossary/index and one content file linked from directory above (i.e. test book at dir c level) and it is OK in the autogenerated index but then does the same truncation when the index is imported into glossary/index, i.e. looks for the source file in dir A.  If the source file is copied into the test book directory, the file removed from book and then the local copy added back in and the book updated/import redone, the links work. so it will find it if the source files are in the same directory.  However, this always worked before with lots of test runs and a few real reviews too.
    Subject: FrameMaker General Discussion Part of path lost when importing autogenerated files
    It would be really helpful if you might do a screenshot  of the File Manager hierarchy of folders and insert them into your posting, maybe use callouts to annotate the various significant levels -- a visual would really, really make it much easier to interpret what you're describing.
    >
    Sorry, not coming out very clear compared to viewed on PC. Directories are A, B, C - Dir A caption "The Directory above the content directory. Links in the subset book in Directory C look in here after they are imported into other files in the subset book"
    Directory B says "Directory B, the content directory, with introduction, glossary/index and other content files, plus main book, main index, main LOT, LOF. Some of the content files in here are also linked to from the subset book in Directory C"
    Directory C says "Directory C containing the subset book with its own index, LOT, LOF, plus links to introduction, glossary/index and a couple of other files in Directory B.  The links to files in Dir B work in the autogenerated LOT, LOF etc, but not when imported into content files (linked files in directory B) although this used to work. They now look for the content files in Directory A instead"
    Hope that makes it clearer.

  • Illustrator Freezes when applying Overprint

    Dear friends:
    I have a MacBook Pro (2,4 Ghz, 2 Gb DDR2 SDRAM) since last august and, until yesterday, I hadnt had any major problems. Last weekend I decided to upgrade to Leopard, formatted my computer, installed and updated every program and I was very happy this morning when I started to work on several files in the usual need of overprint to be set.
    Unfortunately, much to my surprise, the use of this feature has caused an absolute freeze on Illustrator: I still hear my iTunes on the background but I cannot switch applications and, even if I wait fifteen minutes, Illustrator does not come back. I have upgraded to Illustrator 13.0.2 an hour ago: same problem. The worst part is that I have to restart the bad way my machine every time, because the system ignores my [cmd]+[opt]+[esc]. So I am very angry: just today I have mistreated my machine more than in the nine previous months. I have delete the prefs several times and always freezes when applying the overprint. I do not want to start with the ridiculous guessing (such as the customized shortcuts or the language of the OS, that I have set in Spanish). Does anyone have a clue? Is this a known issue?
    Best regards,
    Eduardo Guarniz I.
    ps. I have also updated the Leopard to Mac OSX 10.5.2.

    Dear friends:
    I have suffered another crash. I have deleted my preferences again, restarted having only Illustrator running and, again, freeze on overprint. As it happened a couple of seconds before 9:00 pm I could noticed that the time was announced (I have set my Date & Time pref that way) but the clock froze on the menu bar a 20:59. Another restart.
    Best regards,
    Eduardo Guarniz I.
    PS. Is there a chance of damaging my computer because of this? Because it is getting ridiculous and I have work to do?

Maybe you are looking for