Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

designing the perfect report

Status
Not open for further replies.

dnesheim

MIS
Oct 22, 2003
4
NO
I have a rather intricate one-page-report (regards to the design), and a linked subreport that I need to assign a formula concerning the change of pages. What I want, is to be able to "command" the report to start all over again (including the report-header)whenever the number of records in the subreport is too large for my design to cope. Further elaborated; The data in the main-report should be the same as in "report 1", but the data in the subreport should be a continuance from the subreport included in "report 1".

Too give you a little help, I will try to show the design here;

-----------------------------
CustomerID: 152
OrderNo: 031229


-----------------------------
subreport
type quantity
AP 5
OR 2
KI 15
-----------------------------
Let's assume that this is at the end of the page. If further records are displayed in the subreport, I therefor want the next page to look as this:
-----------------------------
CustomerID: 152
OrderNo: 031229


-----------------------------
subreport
type quantity
CI 15
BA 2
PA 5
-----------------------------
the data in the mainreport should not change, but the subreport should display the remaining records.

Any help would be much appriciated!
-dag atle.-
 
Can you avoid using a subreport at all? Can you join the table that holds your Order information to the table that holds what appears to be order detail information?

If you are able to, you could then move the information that is in your Report Header into either the Page Header, or a Group Header which can then repeat on each page.

Can you shed some more light on the data situation?


~Brian
 
I agree with dbreed35...from the example show us there appears to be no necessity to use a subreport.

Perhaps you have made you report requirements simplified to illustrate what you want...if so...tell us what your report is really trying to do ... as described I would not recommend a subreport but rather put your column headers in a group and repeat the group header as often as necessary...starting a new page after that groups data is printed.

Jim Broadbent

The quality of the answer is directly proportional to the quality of the problem statement!
 
hehehe! you are absolutely right jim! The GIGO-principle can apply in any part of the beautiful world of comupters and information systems:) My design-example may be oversimplyfied. the reason I need to use a subreport (the way I see it) is that as we all know, CP works in a vertical way... regards to the concept of sections. to simply put the "sub-data" in the page or group header therefor will not work, as data from the mainreport need to be displayed horizontally with the sub-data. To show this in this message-window proved to be difficult for me, hence the somewhat "childish" look. but, to give you all a laugh, I will try again:) (PS: the dotted lines do not represent sections)

----------------------------------------------------
main_field_1 main_field_2
2538 prepayed
main_field_3
USD 2500
----------------------------------------------------

sub_field_1 sub_field_2 main_field_4
APPLES 540 california fruits
ORANGES 310
KIWIS 500
BANANAS 630
-----------------------------------------------------
main_field_5 main_field_6
reefer-transport 2003.5.25
-----------------------------------------------------

so, if the number of records in the subreport (apples and oranges) exceeds the space available, as the report is designed as a one-page report, I want the maindata to be displayed just as in page one, but the subdata should continue with its remaining records.

did this clarifye anything?

-dag atle.-
 
sort of...essentially you want the following

If a subreport returns data such that it splits over to a new page you want the previous information in the main report to repeat itself.

. but, to give you all a laugh, I will try again:)

the laugh has nothing to do with it frankly....we aren't doing this for laughs.

Now that you have described the look of the report that you want....describe the grouping

You have 6 main report fields showing....is this all that you have to report in the main report....or are we still laughing here???

Also...while you WANT the report to reside on one page, how many items can be listed in the subreport...and is it a linear list as you have it?...ie. are you making best use of the page???

Why is main_field_4 in the same area as the subreport fields.

An awful lot of data can be fitted onto one page if you are careful in the design of the report....you haven't convinced me from the data shown that it is impossible. Also I am still not convinced that a subreport is necessary from the information you have shown so far.

Describe the grouping of the main report and the max expected size of the subreport items listed....not just a "laughing example"

Jim Broadbent

The quality of the answer is directly proportional to the quality of the problem statement!
 
I don't understand why the important questions aren't being posed here, such as the version of Crystal, the relationship between that tables, and some example data.

If you joined the tables directly, grouped by Customer and order, and while creating the groups selected repeat group header on each page, I think that you'd get the same thing as your subreport only including the header info for each page.

In either case, follow the grouping portion to get the info to repeat on the next page.

-k
 
I am sorry if I gave the impression that I see this forum as an unprofessional forum for laughs. that was NOT my intention at all. looking at previous posts, I have seen that this forum definitly is of great value to CR-users. the reason I cannot display proper example-data, is that our customers see the data as sensitive.

To get back to the important questions raised by -k; I'm using CR 9.2. The report includes too many tables to describe all relations here. The tables are joined through a stored procedure and a temp-table is made for CR to retreive data from. the link between this temp-table and the table on which the subreport is based on, is maintained through a shared PK; TRO_ID. this means that the temp-table COULD include all the necessary data to make the final report, and the reason I have split up the tables, is too make the subreport that I still think is needed.

the links between the involved tables are not a problem to make, BUT as main report-fields are situated above, in line with, and below the subreport, I don't think that your suggestion can be used (bad problem-description from me off course, your suggestion can actaully be of use in another report I'm making at the moment:)

Jim:
You seem to be better at decribing the problem than I am! you are absolutely right; if a subreport returns data such that it splits over to a new page I want the previous information in the main report to repeat itself (short and accurate).

the subreport is linear, and the number of records can reach app. 50. The space-limitation pr. page regarding the subreport is app. 5 records.

the number of main report fields is app. 30

the main_field_4 is in the same area as the subreport fields simply because the requirements from our customers must be followed. several other main_fields are also horizontally aligned with the subreport.

the grouping of the main report is based on the PK TRO_ID... one TRO_ID pr transport, one customer pr. transport, several items(today displayed in the subreport) pr. transport. The grouping of the subreport is also based on the PK TRO_ID.

thanks for coping with my somewhat novice CR-language!
-dag atle.-

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top