Solved

QReport and reusable bands

Posted on 1998-10-14
12
271 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
  • 6
  • 6
12 Comments
 

Author Comment

by:lecossois
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 4

Expert Comment

by:dwwang
Comment Utility
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
Comment Utility
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
Comment Utility
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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

Author Comment

by:lecossois
Comment Utility
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
Comment Utility
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
Comment Utility
Do this help?
0
 

Author Comment

by:lecossois
Comment Utility
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
Comment Utility
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
Comment Utility
Thank you Dwwang !!
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now