[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1284
  • Last Modified:

How to add a formless QuickReport

In existing Windows application project there are several "formless" reports previously created by earlier developers using QR version < 5. I now need to add yet another "formless" report but fails to when trying.
So please, how can I add a new formless QuickReport to my project?

I've already tried these two alternatives and neither work:
1. Creating a new Form -> copying the DFM text from a prev. report into the new form. Since it is created as a Form, the Form properties won't match the ones of a TQuickRep component.
2. Trying to copy on of the "formless" in Win explorer and add the copy to my project.

I've also been in contact with QR support with this non-understanding answer:
Hi,
you have a 'formless' report. You must register TQuickrep as a form. This is described in the FAQ at www.quickreport.co.uk and in the attached.
I also recommend you remove the standard version completely and re-install the prof. There is advice
on installing at the website also.
0
perco754
Asked:
perco754
  • 13
  • 12
1 Solution
 
George TokasCommented:
For as far as I understand since I don't use Quick Reports....
Drop a new TQuickReport to the project or create one at runtime...
Modify the properties and add data and display...
I think that Quick Reports is a VCL component as I saw from the demo I downloaded...

George Tokas.
0
 
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
What do you don't understand about their answer?
I assume that you're talking about adding a TQuickReport template to the Ide repository.

In Delphi we do as described there (on qusoft) as follows

To use formless reports and add them to the repository, follow these instructions -
 
1. Create a new package, give it a new name
2. Add that is requires QR4StdDesD2006.dcp or QR4DesignD2006.dcp (change '2006' to '2007' for BDS 5.0)
3. Add a new unit
---------------------------- new unit code ---------------
unit ICTestCustomModule;
 
interface
 
uses QuickRpt;
 
procedure Register;
 
implementation
 
uses DesignIntf, DesignEditors;
 
procedure Register;
begin
  RegisterCustomModule(TQuickRep, TCustomModule);
end;
 
end.
4. In project manager right click on the package and click install.

Formless report created with earlier versions will now work in the IDE.

To add the template to the repository - open the formless template and right click on it.
Choose 'Add to Repository'.





0
 
perco754Author Commented:
No, adding a QuickReport template is not my primary wish but I'm willing to do it if that's what it takes.
I just wanna add another QuickReport that looks like the previous ones all created using Borland C++ 6.0.
I've already tried the "solution" you provided (got it from QR support team) but didn't manage to pull it through as you can see (attached .jpg file) watching the errors I got when trying to compile it.

qr-report.JPG
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
Well, the repository adding is just a more on. once you can open a formeless Tquickreport you could add it to the repository to have it ready to work in the future.

Anyway, your problem is that you have to add at least DesignIntf and DesignIde dcp's to the Requires section

Take a look at the package i've created in my D2010pro


RequiresForQuickRep.png
0
 
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
@DesignIntf

Sorry, was meaning the Design time QuickReport package that is already installed.

In my case I've called it QR4Design2010
0
 
perco754Author Commented:
Ok thanks, I've been adding all packages except the one you call QR4Design2010, I cannot find any .dcp with a similar name on my PC.
When compiling I got answer if I want to add QR5RunC2007? I said YES and recompiled with this single error (see attachement)


qr-report-2.JPG
0
 
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
Ok, the name QR4DesignD2010 is the name that I've assigned to my package when I've recompiled it from D 2007 (yes, I've recompiled it by myself instead of buying the new one with unicode support by qusoft).
Anyway I guess that you should have two packages
The runtime that contains the components is QR5RunC2007.bpl
You should have a designtime package also, I guess named QR5DesignC2007.bpl
so you should have the compiled dcp also, as called as the bpls

What you have to do now is toremove from the required list the QR5RunC2007 and add instead the QR5DesignC2007 (this because the Module we are going to register needs the designtime package to make it available from Ide in designtime)

Last you need to add the dcp path (usually the same of the bpl) into the Package options search path

Take a look at attached picture
 
SearchPath.png
0
 
perco754Author Commented:
Ok, but no, I don't have any QR5xxxxC2007.dcp only .bpl so I don't how to add this one sorry!

qr-report-3.JPG
0
 
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
Well, I forgot that we're talking about c++

To step back (I mean at this picture point)

Replace the QR5RunC2007 with QR5designC2007

Add the path for the bpl into the search path
0
 
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
Umpf, didn't added the picture :) Ok, look at your qr-report-2.JPG above
0
 
perco754Author Commented:
Ok thanks again, but when I try to add the QR5designC2007.bpl I got another Error message saying QR5designC2007 already in search path.
Oooh sorry man, but I really miss working in Visual Studio environment, this IDE is freaking killing me. :(


error.JPG
0
 
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
Ahah, don't be afraid, we'll get it.
We're getting confused just because at the start it added the runtime package instead of the designtime
Because now it's saying that the desing bpl is already in the search path so don't add it anymore to the search path, but just replace the QR5runC2007 with the QR5designC2007 in the required list.

This should now compile it fine
0
 
perco754Author Commented:
Sorry, As you can see, there's still compilation error complaining not finding the file. As you also can see, the search path does not contain anything (???)


qr-report-4.JPG
qr-report-5---project-options.JPG
0
 
perco754Author Commented:
And when swapping Design with Run I still get error :(


qr-report-6.JPG
0
 
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
Strange. Why are you compiling in debug mode? Maybe this skip some compiler option and maybe some path is lost.

Also: are you saving this new package into the same dir of the QR bpls?
0
 
perco754Author Commented:
No difference if I change to release mode. Same error.

No, the project is saved in default RAD Studion/Project location.
0
 
perco754Author Commented:
@ Second answer:
My Documents\RAD Studio\Projects
0
 
perco754Author Commented:
Maybe I need to save somewhere else in order to work?
0
 
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
Just to see if it can find the dpc fine try saving it into the same dir of the QR5designC2007.bpl that is in your case C:\Program Files\GodeGear\RAD Studio\5.0\Projects\bpl
0
 
perco754Author Commented:
Same result (compile error) after saving project to suggested location.
0
 
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
So there should be something related to the dcp output path. How is stored into teh Tools - Options - Library section?

0
 
perco754Author Commented:
Here's what's stored under Directories->Library path:

C:\Program Files\Quickrep5C;C:\Program Files\CodeGear\RAD Studio\5.0\lib;$(BDS)\RaveReports\Lib;C:\Program Files\CodeGear\RAD Studio\5.0\Quickrep5C;C:\Program Files\CodeGear\RAD Studio\5.0\Quickrep5C;C:\Program Files\CodeGear\RAD Studio\5.0\Quickrep5C;c:\program files\kbmmemtable\source;c:\program files\kbmmemtable\source\d2007\win32;$(BDSCOMMONDIR)\Dcp;$(BDSCOMMONDIR);c:\program files\codegear\rad studio\5.0\quickrep5c\bpl;c:\program files\codegear\rad studio\5.0\projects\bpl
0
 
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
well, you got these redundant paths into
C:\Program Files\CodeGear\RAD Studio\5.0\Quickrep5C;C:\Program Files\CodeGear\RAD Studio\5.0\Quickrep5C;C:\Program Files\CodeGear\RAD Studio\5.0\Quickrep5C
Maybe added by the installation program.
Then the onr for the bpls c:\program files\codegear\rad studio\5.0\quickrep5c\bpl

Anyway from the picture posted by you I can see that the bpls are in C:\Program Files\Codegear\Rad Studio\5.0\Projects\Bpl so add this path to the Library Path and let's see if not it compiles right
0
 
Ferruccio AccalaiSenior developer, analyst and customer assistance Commented:
mmm, found now that it's already in your library path.
There's a cross installed version of quickreport?
Try removind the c:\program files\codegear\rad studio\5.0\quickrep5c and c:\program files\codegear\rad studio\5.0\quickrep5c\bpl from the path...
It seems that the compiler look first there and don't find anything
0
 
perco754Author Commented:
Thanks,
Due to time deadlines etc. I need to proceed fast and therefore I can't wait any longer for a solution.
Instead what I had to do was to take an old not-in-use-report and change it to fit the present customer requirements.

However, in the future, it would be very convenient to know how-to make an additional formless report from scratch.

Thanks again for your efforts!
All the best,
Peer
0
 
perco754Author Commented:
There were remaining issues not being solved.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 13
  • 12
Tackle projects and never again get stuck behind a technical roadblock.
Join Now