Recent

Author Topic: [SOLVED] LazReport inside a tab How to do?  (Read 11102 times)

lazguy

  • Jr. Member
  • **
  • Posts: 78
[SOLVED] LazReport inside a tab How to do?
« on: April 26, 2010, 06:29:19 pm »
How can I view a LazReport report inside a Tab in a TNotebook or TPageControl or TTabControl?

Thank you very much in advance.
« Last Edit: June 17, 2014, 07:10:36 am by lazguy »

jesusr

  • Sr. Member
  • ****
  • Posts: 496
Re: LazReport inside a tab How to do?
« Reply #1 on: April 27, 2010, 12:01:01 am »
Connect the TfrReport.Preview property to a TfrPreview component which you have dropped into the corresponding page container.

When calling TfrReport.ShowReport it will use the Preview component linked to the TfrReport.Preview property instead of a stand alone preview.

lazguy

  • Jr. Member
  • **
  • Posts: 78
Re: LazReport inside a tab How to do?
« Reply #2 on: April 27, 2010, 01:53:47 pm »
Thank you, Jesusr.

I use Lazarus in both Windows and Linux Environments. I am using Lazarus version 0.9.28.2 beta for windows 32.
I use lazreport 0.9.5

I don't have this component TfrPreview in any pallete. I look for this component in the web without success.

Can someone help me how can i install this TfrPreview?

Thank you very much again.

Zoran

  • Hero Member
  • *****
  • Posts: 1949
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: LazReport inside a tab How to do?
« Reply #3 on: April 27, 2010, 06:41:18 pm »
I read this topic and got interested in this preview component, too.

At first, I couldn't find it either, but... when I moved the mouse pointer on component pallete, from frDesigner (which appeared to be the last component on LazReport tab) slowly to the right -- another component icon appeared! That was it!

Now it is there, and I can't reproduce its dissapearence any more, not by uninstalling and reinstaling lazreport package.

Strange...
Swan, ZX Spectrum emulator https://github.com/zoran-vucenovic/swan

Zoran

  • Hero Member
  • *****
  • Posts: 1949
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: LazReport inside a tab How to do?
« Reply #4 on: April 27, 2010, 06:59:15 pm »
I think that I understand now what it is. When you work on a data module instead of a form, then you don't see it.

This appearing with mouse movement, which I described in previous post, happens after switching from data module to a form.

TfrPreview descends from TPanel, so it is normal that it cannot be dropped on a data module.

Lazguy, see if this helps you.
Swan, ZX Spectrum emulator https://github.com/zoran-vucenovic/swan

lazguy

  • Jr. Member
  • **
  • Posts: 78
Re: LazReport inside a tab How to do? New: Where can I find TfrPreview?
« Reply #5 on: April 27, 2010, 10:02:52 pm »
Zoran, Thank you,

but my lazreport palette ends at TfrDesigner after that only appear the PDFExport from PowerPDF.

FortesReport4Lazarus from Sourceforge have this component, but it is buggy at the moment. (it seems linux only bug).

Please, any one can solve this problem or knows other report component for Lazarus that can be viewed inside a TNotebook?

Thank you very much in advance.

jesusr

  • Sr. Member
  • ****
  • Posts: 496
Re: LazReport inside a tab How to do?
« Reply #6 on: April 28, 2010, 05:03:30 am »
Lazarus 0.9.28.2 does not have the TfrPreview component in LazReport palette, two options, upgrade to a more recent lazarus version. The other way is trying to manually apply the changes described in this patch http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=rev&root=lazarus&revision=21605 on your own copy (only the changes on the lr_* files are necesary, keep a copy just in case) and recompile lazarus.

lazguy

  • Jr. Member
  • **
  • Posts: 78
Re: LazReport inside a tab How to do?
« Reply #7 on: May 01, 2010, 12:50:32 am »
Thank you very much, jesusr!!!!!!

I was able to make the TfrPreview "appear" at the palette on both Lazarus for Windows and Lazarus for Linux. Your link helped me a lot.

But....

On Windows vista everything is ok.

On Linux, when i open the project edited on windows the following error is displayed:

Stream = TfrmMonthlyReport: Root = : TfrmMonthlyReport
Component Class: TfrPreview
Error reading ScrollBox1.OnMouseWheelDown: Invalid value for property
Stream position: 768


On Linux when I drop the TfrPreview component on a blank form (new project) the following error is displayed:

Error creating component: TfrPreview
Error reading ScrollBox1.OnMouseWheelDown: Invalid value for property


So I can't use the TfrPreview on linux.

My distro is Ubuntu 9.10, but soon I will upgrade to 10.04.

I tried some things in the hope to solve the problem without success. Thats why I had delayed a little to write here at the forum again.

Is there something I can do to solve the problem, or should I wait for a new release of lazreport?

I apreciate your help. You are helping me a lot, jesusr. Thank you very, very much.

Thank you in advance.

lazguy

  • Jr. Member
  • **
  • Posts: 78
Re: LazReport inside a tab How to do? SOLVED
« Reply #8 on: May 15, 2010, 12:55:30 pm »
Hello Everybody!!!

I updated my Ubuntu to 10.04 and installed Lazarus for Linux version 0.9.28.2-8

Now everything seems ok. I can use lazreport inside a tab with TfrPreview on both Windows and Linux.

I would like to thank everybody for the valuable help.

PROBLEM IS SOLVED.

 

TinyPortal © 2005-2018