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

Crysal Report Format Problem 1

Status
Not open for further replies.

IT2003

IS-IT--Management
Mar 25, 2003
10
0
0
GB
Customer Name, Receipt no, Remarks are part of master table.
Item No, Description, Qty, Wt are part of child table.

Due to existing pre-printed form, I want/have to print Remarks next to the details as shown below.

I have to format the remarks as Can grow - unlimited.

The problem is: It is inserting the blank lines between Item no.01 and Item No.02. ( depaend on no. of lines remarks column takes)

Is it possible to format the report without breaking the detailed lines.


------------------------------------------------------------
Customer Name Receipt No: 123
XYZ

------------------------------------------------------------
item no Desctiption qty wt |Remarks
------------------------------- |---------------------------
01 Item 01 1 6 |This remarks column is from
02 Item 02 4 5 |the Master table.
03 Item 03 1 2 |
04 Item 04 1 1 |
|
|
|
|
|
------------------------------------------------------------

Tks in adv.
 
The only way I can think of doin this would be to use a formula to populate a variable with each detail line and display the records and the remarks in the group footer.

Which version of CR are you using, and I'll post the formula.

Reebo
Scotland (Sunny with a Smile)
 
Thanks for the reply,

I am using CR 8.5
 
Bugger! if you were using CR9 (as I hoped) this would be alot easier, the problem is CR8.5 has a limit to the number of characters it can return from a formula (255 I think). They fixed this limitation in CR9.
Oh well, let's assume that it's not going to be more than 255 characters, then add in the limitation after we've proved it works.

A little bit more information, I need:

Item Number Field type and length
Description Field type and length
Qty Field type and length
Wt Field type and length

Reebo
Scotland (Sunny with a Smile)
 
ItemNo - Integer 4
Description - Varchar (100)
Qty - Decimal (9,0)
Wt - Decimal (9,2)

Number of items per receipt between 1 to 10

and

Remarks - Varchar (200)




 
The reason I wanted the lengths was to be sure the layout would be ok.

Create a formula :

If {mastertable.ReceiptNo} <> NumberVar ReceiptNum then StringVar SetVar := &quot;&quot;;
ReceiptNum := {mastertable.ReceiptNo};
StringVar ItemNoVar := totext({ItemNo},0,&quot;&quot;)
StringVar QtyVar := totext({Qty},0,&quot;&quot;)
StringVar WtVar := totext({Wt},2,&quot;&quot;)
StringVar ItemVar := ItemNoVar&Space(5-Len(ItemNoVar))&{Description}&Space(101-Len({Description}))&QtyVar&Space(10-len(QtyVar))&WtVar
If SetVar := &quot;&quot; then
SetVar := ItemVar;
else
SetVar := SetVar&chr(13)&ItemVar

Try this first, and see how we go. you need to replace items in italics with correct field names, place this field in the detail to start with.


Reebo
Scotland (Sunny with a Smile)
 
Reebo,

As you mentioned earlier, this worked well if the Total length of all DetailLines ( in yr example SetVar) is less than 255.

wait,

I think I got the solution. Put the child columns in a sub report and place the subreport and remarks column of master table in Group footer of Receiptno group in the main report.

However I have not thought of your approach of adding detail line to a variable. This will certainly help me to think of solving the problem in a different dimension.

Thanks a lot for sparing yr time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top