开发者

Quickreport property PreviewLeft does not exists

I have a program, which uses quickreports 5 to generate some reports. The program has always been compiled on one specific PC. Now i want to develop the program on other machines, i have a big problem with the quickreports.

Although i installed the same version of quickreports (5.0.2) on the new machines, i cant get the program to work on them. As soon as i open a form with a quickreport on the new machin开发者_Go百科es, i get the error:

Error reading FrmMyReport.PreviewLeft: Property PreviewLeft does not exist. ...

I can compile the program, but as soon as i use a form with a quickreport on it, i get this exception:

Project MyProject.exe raised exception class EReadError with message 'Property PreviewLeft does not exist'.

When i do a break here it stops in TCustomQuickRep.Create. After debugging it seems to happen in TCustomQuickRep.SetBandValues at the Line if assigned(FPage) and assigned(FBandList) and.

I also tried manual installation of the packages, with compile - install, added all possible directories to the library paths. Nothing works. I can't see a difference between the old machine, where it works fine, and the new ones.

I hope someone can help me to fix this problem. It's really important to be able to develop this application on new machines. Thanks for any help.


Are you positive that the old and the new machine do have the same version of QuickReport installed? Because the error message usually happens when you have component's description in DFM created with newer version than the one youre using, ie

  • version x of the component introduces new property PreviewLeft;
  • you're developing with version x, the property is saved into the DFM;
  • you compile / open the project with component version x-1 which doesn't have the property and streaming system raises exception as it can't find the property in the old version of the component.

It is also possible that the new version drops an (obsolete) property but in that case component vendor usually takes care to silently ignore the property during streaming so no exception is raised. So I suspect that you have actually an older version of the QuickReport installed in th new machine. I don't use QuickReport myself so I don't know when the PreviewLeft property was introduced and what for it is needed... if it is left coordinate for the preview window, then I'd say it is harmless to ignore it and clean it up from DFMs - the hard way is to open the reports one by one in IDE and press "Ignore" in error dlg, the easy way is to use some tool, ie I believe Jedi might have such a tool.

UPDATE The Jedi tool is called DFMcleaner, it is in jvcl\devtools\DFMCleaner directory in my Delphi 5 installation.


I've encountered situations where I've hacked/extended a 3rd-party library to add/correct some functionality. Then I move to a new PC (or download an update from the vendor) and lose my new properties. It's often months or years between foul-ups like this, so I usually lose half a day tracking it down, and then it's "D'OH! Deja-vu all over again". I have one component where I've actually added a property called something like

property ThisLibraryWontCompileUntilItsBeenHackedByChris : boolean;

When the compiler stops on that, I know where to look.

Chris

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜