Program with FastReport using MyDACDatabase doesn't work - delphi

I'm using the MyDACDatabase components to connect my report build with FastReport 4 to my MySQL database. I can edit it normally and test in the FastReport designer when using my Delphi's IDE, even compile the application, but when I open the form that have the report, I have the exception Class not found: TFrxMyDACDatabase not found. How can I fix this error?

Just for anyone else wondering, the same problem happened to me all I did was, was changed the Library path to include the location of FR5 and added frxmyDACComponents to the uses list again.

You should install FastReport X MyDAC Components from MyDAC 5 to be able to use the TfrxMYDACDatabase component. For more information please read the ReadMe.txt file in the %MyDAC%\Demos\Win32\ThirdParty\FastReport\FRX\ directory. %MyDAC% is the MyDAC installation path on your computer, X is the version of the Fast Report components that you use.
(Quoting from Something change in version 5 for tfrxMyDacDatabase (Version 4 no problem))

The solution is very simple. I realised that in the FastReport 4's tab I have a component named frxMyDACComponents in the pallete that I installed following the instructions in the MyDAC's Demos folder (in my case, placed into C:\Users\Public\Documents\Devart\MyDAC for Delphi 7\Demos\ThirdParty\FastReport\FR4\ReadMe.txt). When I placed this component in my form, 2 units were declared in the uses clause: frxDACComponents and frxMYDACComponents. Just that was needed to this problem. Thanks for the help of everyone.

Related

Delphi not opening projects

I have been using Delphi 2010 for some time with no issues but recently every time I try to open a project I get a dialog box asking me to open the project
with a folder that doesn't exist. How do I change the path Delphi opens projects.
Assuming you are using Windows...(up to 10 anyway)
Right click on the project's DPR and choose Properties.
What does the Opens with: line say? Mine says bdsLauncher.exe
If it says anything else, then you somehow had the system change it directly or indirectly. Virus, installation of some other text editor, whatever...not a big deal in any case. Do the same check for files with extensions DPROJ, GROUPPROJ, ...
If you need to change it, the file should be in a path similar to my C:\Program Files (x86)\Embarcadero\Studio\21.0\bin except that your version isn't 21.0
I did have issues once upon a time with XE7 where I had to set DPR to open with bds.exe, and DPROJ opened fine with bdsLauncher, but it was probably due to IT's setup of my laptop for someone else, and something with the Win 10 software reset (instead of a format or restore from clone) when they gave it to me. Installing an XE7 update fixed the problem, and it hasn't been an issue since we moved to 10.4

Can we use a lower version of Delphi (Delphi xe5) to edit a project file from the higher version (Delphi xe6)

Every time I run the .dproj file in xe5, I get an error "Exception EReadError in module StartCoatPro.exe at 000C0304. Error reading LineSeries1.Legend.Visible: Property Legend.Visible does not exist."
I tried looking for the Legend.Visible property under LineSeries1 in the .dfm file but I couldn't find it. Then I also tried to put a line, Legend.Visible = True, but doesn't seem to work too. Please help.
Thanks!
Project files are version-specific. You cannot edit an XE6 project in the XE5 IDE and vice versa, for instance.
But what you are experiencing is not a project problem, it is a DFM problem. You have an XE6 DFM that contains a value for a property that apparently does not exist in XE5. Do not try to edit DFM files across version boundaries, either. Newer versions tend to store new properties that cause errors in earlier versions.
Cross-version project management is tricky. Best not to share version-specific files at all, unless you use third-party tools to help you. For instance, there are tools available that manipulate DFMs to strip out newer properties when downgrading to an older IDE.

Delphi XE icons

I just installed Delphi XE and a few of the 3rd party components I use and some of the Component Icons are the default Delphi Icon.
I have tried the -nocache option on the IDE and that fixed most but not all.
anyone know why some are still displaying the default icon?
After your components installation try to delete all entries in the following registry keys and restart your IDE twice. Twice because the first time cache entries are created but not used yet.
HKEY_CURRENT_USER\Software\Embarcadero\BDS\8.0\Package Cache
HKEY_CURRENT_USER\Software\Embarcadero\BDS\8.0\Palette\Cache
According to your comment below it might have something to do with this issue.

How to install Virtual Treeview?

Virtual treeview by Mike Lischke seems so popular on the web and as third party component. I just downloaded version 4.8.7 on my machine.
I have Delphi 2010 and Delphi 7.0 in 2 partitions.
Aftter clicking installer of virtual treeview, a log file prompts, saying it has been installed successfully.
I check Delphi 2010, yes, it is on component palette showing 3 controls.
But when I start Delphi 7.0, IDE prompts 'Can not load VirtualtreesD7.bpl...'. I ignore it, and find that Virtual treeview design time package is in list but UNCHECKED. If I try to check it, again it promts "Can not load virtualtreesD7...".
I search whole Disk and find a VirtualTreesD7D.bpl, and manually add it in design time package list. It is on palette with 3 controls.
I tested it quickly and exit Delphi 7.0. But when I restart Delphi 7.0, again it prompts "Can not load VirtualtreesD7.bpl...", it is again not on palatte and not Checked in design time package list.
This is very simple question. Can you let me know how to solve it?
Thank you very much in advance.
Edit:
Thanks for comments.
I tested your comments, but not work.
New problem:
If I uninstall virtual treeview by clicking unins000.exe and reinstall it only in Delphi 7.0, the installer prompts in the last screen ''...completed.." and no error prompts. When I start Delphi 7, the virtual treeview design time package is not in package list. This is even worse than the last time (last time it is in package list but not checked).
I check very carefully one line by one line of that log file, it says:
...
...
VirtualTreesD7.dpk(39)
VirtualTreesD7.dpk(39)
VirtualTreesD7.dpk(41)
VirtualTreesD7.dpk(43)
**VirtualTreesD7D.dpk(32) Fatal: Required package 'VirtualTreesD7' not found**
Why?
Why it does not successfully install and does not prompts the error in installation in the last install screen.
How to solve this "Fatal...not found" problem.
Thank you all for help.
New Edit: (Is this Answer?)
Thanks for your help and suggestion first.
I take 2 hours to test and find a possible solution. It works on my machine and it can be installed in Delphi 7.0.
Steps:
1. uninstall virtual treeview by clicking unins000.exe from Delphi 7.0 ( you can separately install virtual treeview in Delphi 2010)
2. clicking newly downloaded VirtualTreeview setup 4.8.7.exe, install it in Delphi 7 folder, do not install it in default...Rad..path. Important: INGNORE ALL ERROR PROMPTS DURING INSTALLATION (INCLUDING ERROR PROMPT IN THAT LARGE INSTALLATION LOG FILE).
3. Go to $\Virtual Treeview, right click VirtualTreesD7D.dpk, select Open with Delphi 32 development environment. A window prompts for you to compile. JUST CLICK COMPILE, DO NOT CLICK INSTALL.
4. Go to Component -> Install Packages. Go to $\Bpl folder and manually add VirtualTreesD7D.bpl into Design Package. The three controls will appear in Palette.
5. Go to folder $\Bpl and YOU MUST COPY VirtualTreesD7.bpl (NOT VirtualTreesD7D.bpl) INTO $\Bin folder.
6. Close Delphi 7 and restart it, you will find that this component is on Palette and in Package list, it is in Design package list and CHECKED.
I personally feel that the installer of Virtual treeview needs improvements to free users from such trouble and test in installation. The installer needs rewrite.
This is my case of installation. I do not know if it can be generalized to all users.
Thank you all.
The IDE uses LoadLibrary (actually, LoadPackage) to load packages for components that are installed. This means that it follows the same logic for where it looks for files that LoadLibrary does.
The problem is that the IDE can't find the package using LoadLibrary's search logic - see the Remarks section here. So the solution is to add the folder to Delphi's Library Path (Tools->Options->Environment Options->Delphi Options->Library - Win32), or move it somewhere on the system PATH.
Ensure you have the folder where the virtualtrees.pas (\source) is located in the environment search path.
You may manually need to install the *.dpk file for Delphi 7. Open the D7.dpk, compile then open and install the D7D.dpk (Runtime first then Designtime package)
Haven't done it on Delphi2010 w/ Delphi7, but installing with just Delphi7 is fine.
*edited

Reportmanager and delphi 2010

does reportmanager (http://sourceforge.net/projects/reportman/) support delphi 2010?
Thanks
Alejandro Jourdan
It looks like the most recent download on SourceForge only has premade projects to compile native components up through Delphi 2009. I expect it should be easy enough to revise the D2009 project to compile under D2010.
Also, as you may know, you could use ReportManager with D2010 without having the native components at all.
You might get more complete and accurate answers in the Report Manager user group on Yahoo:
http://tech.groups.yahoo.com/group/reportman/
I managed to compile the latest 3.0 version with Delphi 2010 Professional. Not a really easy task.
In order to do so, you have to follow these steps:
Edit the .inc file and see if you can exclude unused libraries.
In my case I undefined IBX and used ZEOS for database.
Then you will get an error about IntPr being not defined. Replace it with Pointer.
You will get hundreds of FormatSettings not defined errors. You have to remove such identifier. I.e. go in search and replace and type: "FormatSettings." including the dot and in replace leave it blank. Repeat for the many files that will show the same error, or do a multi-file search and replace at once.
You will possibly get references to IBX units or packages even in case you removed it from the .inc file. You may just delete the offending lines.
You will get a nasty missing unit WinApi.Common... Remove it from the uses clauses, you don't have it.
At a certain point the above point will cause an undefined FOLDERID_Public.
Go to the const section of the offending file and add this:
FOLDERID_Public: TGUID = '{DFDF76A2-C82A-4D63-906A-5644AC457385}';
That should do it, now you are the proud owner of Report Manager 3.0!
Installed today in D2010 on XP without particolar problems.
First downloaded and installed ver. 2.9b executable file.
Second downloaded Delphi package, added source path to the library, opened and compiled group project file.
Received 3 errors (even the same error type): vcljpg Not Found.
Simply rename vcljpg with vclimg.
after that, compiled done, installed.

Resources