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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Two records at the same line

Status
Not open for further replies.

SkyMasterBRA

Programmer
Nov 21, 2002
12
BR
Hi all!

How can I display 2 columns like this:

Col1 Col2
record1 record2
record3 record4
... ...

In the col2 i´d like to move to next record to fill this.

And another question:

How can i "fill" the rest of the page when I have no records to show?

I´d like to show the rest of the grid in my report but with blank contents.

Thank in advance!
 
The answer to the first question is to use Format - Section, and format the details section to have multiple columns (across then down). Size the column so that only two records fit per line.

The second issue would require that you have some extra dummy sections, formated the same way. These should only print when needed. This will be tricky depending on if your report has groups or multiple pages. If you have an understanding of CR variables you could do a page count, and then determine which of these lines to print based on the number of records printing on a page. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Hi Ken, thank you!

I did what u told me, it works fine...but there is a problem.

In one report I have no column names...but line names, how can I fill the report only after a certain space, that will be the columm with the line name, the report is something like this:

Line Description | xrecord1 | xrecord2 | xrecorN | xrecord6
Line2 Desc... | yrecord1 | yrecordN.... | yrecord6

The records should star after line description, and I´ll have 6 fixed columns with records (or not) and 7 lines.

Could you or anyone else give me some tips?

Thank you all!
(there is more to come) :)
 
I couldn't follow that. Could you try again? Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
I need to let a space at the left side of the page o so start with the columns, just like this:

My Line1 Desc | record1 | record2 | recordN | record6

Where is "My Line1 Desc" I don´t have a column that must be repeated cause that´s the title os the line.
 
Where is your description coming from? Is it a a group value? Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Does it change or is it the same all the time? Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
It´s always the same text.

The "grid" looks like this (labels between []):

Code:
.....| code1 | code2 | code3 | code4 | code5 | code6
[Number]...| numb1 | numb2 | numb3 | ...
[Date].....| date1 | date2 | date3 | ...
[Time].....| time1 | time2 | time3 | ...

I´ll have only 6 records on each page...the details section is "fixed" and wont repeat on the same page, the rest of the page is filled with another things.

The next page will show:

[Code].....| code7 | code8 | code9 | code10 | code11 | code12
[Number]...| numb7 | numb8 | numb9 | ...
[Date].....| date7 | date8 | date9 | ...
[Time].....| time7 | time8 | time9 | ...

Got it?
 
:~

There is a "CODE" label in the first line, the forum changed it to CODE tag.
 
I think you are going to have to give me a concrete example. I don't get how the descriptions can be the saem each time if they are changing from number to date to time, etc. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
I solved half of my problem...i´m using a sub-report to show the columns, but now my details section from the main report doesnt show when I move to page 2.

This is because only the subreport has records to show...but...how can i solve this?

The main report have only fixed labels now and the sub-report have the records to show...it´s working, but now I need to know how to continue showing the fixed layout from section on main report.

I don´t know if you r understanding me, but...when I move to the next page, only the records appears, the lines and the labels (normal text) that are fixed disapear.

Thanks for you attention Ken!
 
sorry, I don't understand any of your questions after the first post. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Here we go...

I have the main report and the sub-report.

The main report have only the fixed layout that should be printed.

The sub report (inside the details section of the main) will have 7 columns.

When the sub report have more than 7 records I´ll have more than 1 page to show.

When I move to the second page (main), the layout from the details section on the main report disapear and only the records on the sub-reports remains there.

I need to continue with the layout (that are on the details of the main report) on every page.

Understood?
 
SkyMasterBRA,

It seems to me that you are trying to take the standard report layout with horizontal labels and vertical details and lay it on its side (transpose it). If this is not absolutely essential, you could create your report the usual way:

Code-----Number-----Date-----Time//Labels
Code1----Number1----Date1----Time1//Details
Code2----Number2----Date2----Time2//etc.

If the issue is that you want to limit the number of detail lines per page, because of information in the page footer for example, you could control the number of details by resizing the page footer, I think.

If you have to maintain your layout as you originally described, maybe the following would work (I'm not sure):
1-Create 4 detail sections, detail-a, detail-b, detail-c, detail-d.
2-Add text box to each detail section: Code, Number, Date, Time.
3-In detail-a, place your code field; in detail-b, place your number field; in detail-c, your date field; in detail-d, your time field.
4-In the format group section editor, for each detail section, use Ken's suggestion, and select multiple columns (across then down).

I'm not sure how to keep each detail section from wrapping on the page until all details are printed. Maybe you could use the "new page after" for each detail section and write a formula that would limit the number of records per page, e.g., count({code})>6. That's probably too easy to actually work!

Just brainstorming here.

-LB

"Fools step in where angels fear to tread"
 
Hi SkyMasterBRA,

I looked at your report and I think you almost have what you want. To get rid of the details that were wrapping below your chart, I just increased the page footer (dragged it down) until they moved onto the next page. You will have to move your graphics around in order to get the desired appearance.

I think you might be able to get the graphics to repeat on subsequent pages if you move your subreport aside, place a field in the details section that repeats for every record, e.g., {code} and then using format field, make the font white, and then reposition the subreport over it. I couldn't actually try this without data access, but it might work.

Good luck--let me know if it worked, if you have a chance.

-LB





 
SkyMasterBRA,

Me again. I tried to create a report similar to yours and discovered the key to making the labels repeat from page to page:

For the labels, format the detail section also for "use multiple columns" and also check off "new page after." This leaves only one set of labels on your first page, and none on the second. Next resize one of your labels to allow space for another field, e.g., {code} and place this next to the label within the column. You can make this field tiny because it's just a place holder, but before doing that, format the field and change the font to white (or the color of your paper). Resize your label to the desired size. And voila! the label repeats on the next page. I added a box, too, around the labels and that also repeated from page to page. Then just add your subreport, with detail section also set to use multiple columns, next to the labels.

The only problem you might have is that the labels will repeat beyond the end of your subreport. Maybe there is some formula that you could write to limit the "new page after" when you've reached the end of your subreport. (But I can't help you there).

As I mentioned above, resizing your sections will prevent wrapping of your subreport details on the same page.

Hope this helps!

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top