"File Save Failed" error when working with Crystal Reports in VS2008 - vb.net

Occasionally while attempting to save a Crystal Report that I'm working on in VS2008, a dialog titled "File Save Failed" pops up saying "The document could not be saved in C:\Users\Phillip\AppData\Local\Temp{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}.rpt. It has been saved in C:\Users\Phillip\AppData\Local\Temp\~zzz{YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY}.tmp."
If I OK the dialog, I get a "Save File As" dialog. If I specify the correct location of the report file, I'm asked if I want to replace the existing file. If I say "Yes", I get an error message saying "The operation could not be completed. The system cannot find the file specified." Even if I specify a completely different filename, in a different folder (e.g. C:/test.rpt) I get the same "operation could not be completed" error.
Sometimes if I wait a moment, then try to save again, it works fine. More frequently, however, I keep getting the "Save File As" dialog. My only option then is to close the report and discard my changes.
This is an intermittent problem - much of the time, saving the report works just fine. Any ideas?

Copernic Desktop Search sometimes locks files so that they can't be written. Closing the program resolves the problem. Perhaps the same problem occurs with other search engines too.

I had a problem VS2010 and Crystal which may be related
Suddenly saving was not working (asterisk never went away) - then VS would crash on trying to exit the report form (presumably trying to save).
I found that by changing the tab to preview the report (at the bottom) which I rarely do due to the fact that it is rarely accurate enough - I could save from there.
Saving during the preview removed the (dirty) astersisk in the top tab and allowed me to exit the form cleanly.
Too early to tell if the report is still ok - I too have had to recreate reports in the past.
Though once I did download the demo for the full Crystal which allowed me to mend a report so that is sometimes worth it too.

sounds like a job for process moniter. you should be able use process moniter to see what's really hapening and why.
http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx
Or you could install VS2008 sp1 and cross your fingers. (I'd do both)

Related

Why does compiling to ACCDE cause every form to throw reserved error -3034 on first open?

So, I have an MS Access front-end that I'm compiling to an ACCDE, which I want to distribute. When running it from an ACCDB file, everything works fine. I have a welcome form with links to a bunch of different forms. Some I call with DoCmd.OpenForm, with others I create an instance of the form with Set frm = New Form_Name, and then show it with frm.SetFocus and frm.Visible. While testing and developing a number of different things, opening forms hasn't been a problem for what feels like an eternity.
But then I compiled the ACCDE, and for some reason, opening forms has stopped working. While the welcome form miraculously works just fine, opening any other forms from that welcome form generates an error 3000 with a description which is something along the lines of "reserved error (-3034); there is no message for this error" (might not be 100% accurate since I'm translating from German). This is regardless of if I call it with DoCmd.OpenForm or create a new instance.
Here's the weird part: this only ever happens once for every form after compiling. That means, if I launch the form again after the error, even after closing the front-end entirely, then it works. I've checked over and over again and there are no variables being used, so there isn't the chance of some variable being uninitialized. Now, I could just execute every form on the ACCDE file after compiling it, but that seems like a ridiculous workaround. Plus, it doesn't make any sense, either, since I'm not storing any data in the front-end.
And oddly enough, this happens with all forms except the welcome form. The welcome form is launched by a macro, but I've ruled that out, since some of the forms that I launch from the welcome form used to be launched with macros, and I had the same problem there. The biggest difference between the welcome form and the other forms is that the welcome form is an unbound form.
Oddly enough, Google has not led me to any people with the same problem. Has anyone else ever had this problem or know what could be causing it? This isn't only happening on my computer, in fact, I was alerted to the problem after I had distributed an alpha version of the front-end. I'm using Access on office 365, version 1908, in case it makes a difference.

Why does my VBA procedure sometimes stop in debug mode?

I have a button click event in an Access form that sometimes opens the VBA editor with the 'On Error...' line highlighted as if it is in debug mode. I can F5 to continue the rest of the procedure and it works fine.
It doesn't happen everytime. It seems random except there seems to be a pattern that it happens on the first click of this button right after the file is opened. Not everytime though.
Any thoughts on this or previous experience with the same thing happening and subsequent solution? What might be causing this? It's a terrible user experience.
Well, before running any code (hold down shift key during startup to prevent any code from running).
Now, ctrl-g (jump to VBA IDE). Now from tools. Choose
debug->Clear all Breakpoints
Like this:
Now, open up any code module - hit enter key to "dirty" the code. Now choose debug->Compile (first menu option). It will say Compile "my app name".
Make sure the code compiles. If it does not, then stray break points can still exist.
Next up, you need to check/change the default behavior for a error.
While STILL in VBA editor/IDE
From menu bar choose tools->options. The default is "Break on Unhandled errors"
If you have break on ALL Errors? Well then code that even assumed to trap or even on-error resume next code it BLOW UP and stop. Often developers will say try for existence in a collection, and we error tap to "mean" the element is not in that list. However, the THIS assumes that the default Error trapping setting was not change.
So, double, and then triple check this setting. You can develop for years, and even have some code ASSUME to error out. But that years of development code assumed the default (break on unhandled Errors. If you have break on all errors, then your are toast, and you find all kinds of breaking of code. (the idea of that option is to LET you debug code with error handling without having to disable errors. And with say on-error resume next, you in effect can't debug parts of code anymore.
Now, if above steps don't fix your issues?
Then the next step is to de-compile your application. This will remove the compiled (binary) part of the application. Once you do this, then you do a full re-compile.
To de-compile, you can't do this from the IDE, and you have to use a FULL qualified path to your existing version of access. Say like this:
"C:\Program Files (x86)\Microsoft Office\Office14\MSACCESS.EXE"
"c:\MyCoolApp\Invoice.accDB" /decompile
Now, when you run above, you REALLY must not let any startup forms or code run. (hold down shift key. Now exit access/application. Now re-launch (and again no code to run on startup).
Now, at this point I high recommend a Compact+ Repair (and AGAIN no startup or code to run). So even on the C+R, you have to hold down shift key.
If you during the decomp, start application, then C+R allow ANY code to run, then you have to start over again at the first decompile step.
Ok, now you done the C+R. Now ctrl-g, and now debug-compile.

Error : Unable to open module file System Error &H80070002&

I am working on a web based dynamic vb form which is of around 20,000 lines suddenly my system got shutdown due to power loss, When I reopened the system then I found my .vb file is only left with Hexadecimal-Binary kind of text as in the screen shot.
When I am running the code in Visual Studio it is running fine and show the form in web browser but I need to edit it as I am in development phase.
On opening the file in notepad it is showing blank page with lots of blank lines.
I have tried to recover using 'restoring previous versions' but I found 'There are no previous versions available'.
I also have tried to recover using 'Open system restore' in which I found a list of restore point but even after successful completion issue is remain same.
Error screen shot
I didn't any solution for this problem.
I have some my code in distributed manner so I merge those pieces of code and wrote rest of the code.
If any body knows better solution than this, please share it.

Automation Error / Catastrophic Failure when debugging VSTO project

I'm building a document-level VSTO customization for an Excel 2016 workbook, and I'm encountering this error repeatedly in the development process. Basically, Visual Studio 2015 builds the project, Excel loads the workbook, and immediately Excel displays an "Automation Error / Catastrophic Failure" message. It kicks me into the VBA editor, but there's no code on the screen to edit.
I read in a few places that the error means there is something wrong with the "References" settings in the VBE, but it won't let me open that screen, the option is grayed out. Anything else I try to do just pulls that error up again. The only way out is to stop the process through Visual Studio. If I open the source workbook directly from the project folder, the same problem occurs, and I have to quit Excel via Task Manager.
This problem has been coming and going over the past 24 hours; last night and this morning it wasn't happening for some reason, so I was having no issues running and testing my project, but now the problem is back. If anyone has an idea of what could be causing this problem (bearing in mind it must be something that has not been constant over the past day), I'm all ears. Even just an idea of what to look for would be helpful, as I don't even know what this error means or what kinds of things to look for. This is my first VSTO project and I've been pretty excited by what I was able to accomplish when this error wasn't coming up every time, so I'd like to eliminate the problem permanently.
Edit: I should point out that the reason I included VSTO in the question title is that this workbook was totally fine before I started the VSTO project. But I saw this error when I tried to run the VSTO project for the first time, yesterday.
So, I think I "kinda-sorta" figured out my own problem. I'm still not 100% sure what caused it in the first place, but I'll leave this here for anyone else who runs into the same issue someday:
When you get this error, don't despair like I did because the VBE window has no code highlighted as the problem area. Look through ALL the VBA code in every object/module/sheet; in my case, I eventually found a function highlighted as the cause of the problem. I was able to bypass the error temporarily by turning off automatic calculations, and I commented out the offending function. It broke some things in my workbook to do so, but it gave me the opportunity to debug my VB.net code in Visual Studio, and when I uncommented the "problem" VBA function after doing so, it all worked perfectly fine.

"Action - Go to report" in VS2008 reportviewer not working

I have an SSRS report which drills through to sub reports via actions. The report functions correctly in the VS environment, and correct once deployed to the server and viewed through a browser.
The report however is also viewed inside our in-house app via a Microsoft.Reporting.WinForms.ReportViewer - and while it renders on screen correctly, clicking the element that would normally take me to a sub-report no longer functions.
I have had a look around and there seemed to be an issue around VS2010 SP1 where this stopped working, however I'm currently stuck with VS2008. This seems to be the majority of results I'm getting.
Anyone have any ideas?
Many thanks.
OK have found issue.
The text box in question had three place holders. A reference No, A date and an age. I wanted to trigger the sub report if someone clicked on the reference no. While this worked fine in VS and IE, it failed to work in the Microsoft Report Viewer control.
I have now set the action against the containing text box, rather than against a single placeholder/expression within that box. While this has solved the immediate issue that I have, it would not work if you wanted multiple actions from different placeholders in a single text box.
But for now, I'm all good, and all solved.