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

Display of few records should be formatted out by tab width

Status
Not open for further replies.

karnd

Programmer
Feb 1, 2003
190
0
0
US
Hi,

There are few records that should be formatted out on the report(CRXI) by "tab width" space. i am using an existing report to modify on an existing items.
So, the report should modify to the following format.

Product Name Balance
------------- --------
Consolidated Product A $1000
<tab> Child Product 1 $200
<tab> Child Product 2 $400
<tab> Child Product 3 $400
-----------------------------------------
Total $1000
------------------------------------------

And also, the Sum/Total should show only the 'Consolidated Product' Balance but should not add its Child Products.
Like wise, there would be number of similar records on the report.
How can we programatically control and display to get the above format.
Note:the Database should differenciate between Consolidated and Child Products like 'Con' and 'Child'.

Thanks in an advance for your valuable suggestions.


 
A running total allows you to add selectively using a formula. If you're not already familiar with Crystal's automated totals, see FAQ767-6524.

As for 'tab width', you can place fields where you please. You can also use two alternative detail lines, suppressing one or the other using a formula. (Right-click on the section and choose Format Section. Then choose the formula icon (x+2 and a pencil) for suppression.)

You could include a text string that says "<tab>", if that's what you want. I don't know of a way to include tabs as such.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Can't tell what fields you are using to return the above results, or what report sections you are using.

-LB
 
Hi,

I am using the Report field(no formula field) in case of "Product Name" for designing the report.And, it was in the detail section.
Note: <Tab> in the sense, some space given for those child products records.

So for <Tab> records appearing on the report, did have a refernce field.Using this field, the Child Products records should be further spaced out from the Consolidated Product.

Eg:
Product Name Balance
--------------------------------------------------
Consolidated Product $1000
Child Product 1 $200
Child Product 2 $400
Child Product 3 $400
----------------------------------------
Total $1000
and so and so forth records.
The Total should display only for Consolidated Product i.e.$1000
Please let me know, if i am not clear still.





 
Still can't follow that. In design view, what fields are placed in what report sections? Please identify.

-LB
 
In the design View on
1)Detail Section --> Product Name and Balance fields are placed.
2)Group Footer Section--> The "Total" is placed.
So, the total should be Sum(Consolidated Product's Balance) - Sum(Child Product's Balance).

I hope i am clear enough.Please let me know if not.

Thanks
 
If there is only one field that results in both the Consolidated Product and the Child Product, how do you distinguish them? Is there a second field in the table that defines which is which?

-LB
 
Hi,

Correct.For distinguishion btn them, there is a Second field. And, the value is, Field = Null for Children Products.

Thanks a lot.
 
Okay, then replace your product field with this formula:

if isnull({table.secondfield}) then
chr(9)+chr(9)+chr(9)+{table.productname} else
{table.productname}

To get the correct total per product, you could create a formula like this:

if not isnull({table.secondfield}) then
{table.amt}

Then insert a sum on this formula.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top