Solved

QReport and reusable bands

Posted on 1998-10-14
12
277 Views
Last Modified: 2010-04-06
I need a report with a title band and a "body" (the rest of the report).  The title band is the same for all reports in one project (inherited from a form in the object repository).  This title band is different for each project.

But the body remains the same throughout all my projects.  So how can I share part of my report in all my projects ??

If I use the object repository then a new form would have to inherit something from two forms (inherit the title and the body).  Is this possible ??  And is there another way to achieve this result ??
0
Comment
Question by:lecossois
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
12 Comments
 

Author Comment

by:lecossois
ID: 1342803
Your answer contains some good ideas, but it's not exactly what I'm looking for :

Copying the files for each project would mean that modifications to the original report have to be done for each project.  But that could be solved by keeping the original report in one directory, and adding the files from that directory.  That way there is never more than one copy of the report.

As I explained in the question, the title is defined in a form that resides in the object repository.  Normally, I create a new form that inherits the title band, and then I add the rest of the report.

Your answer suggests to do it the other way round.  First create the report, and then "apply" the title.  But is it possible to inherit properties of a form (through the object repository) *after* the new form has been created ?

0
 
LVL 4

Accepted Solution

by:
dwwang earned 100 total points
ID: 1342804
Hi, this is dwwang again and the answer is also yes.

You must do that in the "reverse" order:

create your form with the shared QR body, then right click the for and select add to repository.There you can select the name and where to add to the repos. By doing this, the body can be shared by all projects.

After that, open one specific project and then new a form by inherit from the shared-body form, then add your shared (in this project) title band to the form and save it.

Next step will be what you are already doing now-- create forms by inheriting the per-project-shared form.
0
 

Author Comment

by:lecossois
ID: 1342805
When you say "then add your shared (in this project) title band to the form", does that mean that the title band gets inherited, or do you means just copy and paste ?  If not inherited, any changes to the report needs to be done in every report (of a project).

Otherwise, how can I inherit the title band after the body (I don't know how to do it with the object repository).

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 4

Expert Comment

by:dwwang
ID: 1342806
Hi, sorry for not revisiting this tpic for long time.

Yes, when I say "then add your shared (in this project) title band to the form", I mean just copy and paste, but maybe you miss the third step, which is "Do what you are already doing now-- create forms by inheriting the per-project-shared form."

I mean that after you copy and paste the title band on the form (which  has the detail band on it), you should again put this form (with now has two bands) to the object repository, then in your project, create new forms by inheriting from this two-bands-form, that will do the trick.
0
 

Author Comment

by:lecossois
ID: 1342807
When I have the final report (with the two bands), I don't need to put that in the object repository, because it is the final result that I am looking for.  There is no need to inherit from that form.  Your solution would require me to do any modification in the title band in all reports for a project, which is exactly what I would like to avoid.

I think you misunderstood my question, but that is due to my bad explanation of the problem.  I'm sorry for that, but let me try to explain it again.

So I need a report with two bands : one inherited from a "title" report, one inherited from a "detail" report.  The title band is used within one project (a different title for each project).  The detail band is used once in each project, but is used in several projects.  The report with the two bands is the final result, and any modifications to the title or detail band should be visible in that report.

I hope this makes it clear.  If not, I will have to try to explain it in another way.
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1342808
Well, I think you explained your ideas clearly, but the problem is how many report are there in each project?

You said :"I don't need to put that in the object repository, because it is the final result that I am looking for."

So what's the difference between reports in your single project?(since their title and detail band are all the same)

If their are any (differences between several reports in one project), you can just put the form (which you think to be the final one) to object repository, and let those different forms inherit from it, so you can do necessory modifications to those new forms, while keep all the forms with the same title band.

Still remember last question, now it's all the same ideas, the only different is take one more step.

0
 

Author Comment

by:lecossois
ID: 1342809
Let me give you an idea of the number of projects.  There are about 20 different reports, that are used in each project.

For each project, these 20 reports come back, but the title band is different for each project.  That title band is the same WITHIN the project.  A detail band will come back ONCE in each project.

So when you look at one project, the detail band is different for each report, but the title band is the same.

When you look at all the projects, you see the 20 reports coming back in each project, but with a different title band in each project.

So there are never two reports with the same title/detail combination.  Putting such a report in the object repository wouldn't make sense, because there is never going to be a form that inherits from it.



0
 
LVL 4

Expert Comment

by:dwwang
ID: 1342810
OK, finally I get it, actually I had thought of that kind of situation, but didn't expect it to come true -- a two dimensional structure.

Due to the limitation of visual inheritance, you must solve that problem in a combined way, that is, to use both inheritance and instances. Below is my method:

1. Still create form with the title band and the quick report, (for use by inheritance)

2. Create a form with all you 20 detail bands, all properly designed on look.

3. In each of your project, inherit from the title-band form as well as USE the form with detail bands.(don't forget to set the form creation order, to create the detail-band first, then the final report)

The final report form should look like this:

uses detailform,...
.


private
    mydetailband:TQRBand;
.....

in the form.oncreate event, write
  mydetailband:=DetailForm.neededDetailBand;
  mydetailBand.Parent:=Myquickrep;
  //set other properties if necessary;

Above are only some points of making all these work, you can try it, and give some comments if meet problem.(I already havd a simple test and it works well)
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1342811
Do this help?
0
 

Author Comment

by:lecossois
ID: 1342812
I'm sorry Dwwang, but I have a busy week.  I will look at it this weekend.  I will let you know Monday if it works.
0
 
LVL 4

Expert Comment

by:dwwang
ID: 1342813
Hi, never mind, I don't mean a hurry, the last sentecnce "do this help" is just for the purpose of turning on the mail notification function here.

By the way, the method I suggested may not be easy to use, good luck.
0
 

Author Comment

by:lecossois
ID: 1342814
Thank you Dwwang !!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses
Course of the Month7 days, 2 hours left to enroll

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question