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

Adding field create addition lines

Status
Not open for further replies.

dibar

Technical User
Aug 7, 2010
12
CA
I am very new to Crystal reports. I am using Crystal 2008.

I am trying to add a remarks field to my report. This field can have up too 256 characters in it. I need to display only the first 40 or 50 characters. When I add the field to the report it generates addition line items for each record.

Why is that and how can I fix it.

I tried using the LEFT command to select the first 40 characters, which does work as it should, but I still get additional line items for each record.

Hope I explained it clear enough.

Thanks
Bill
 
It means the table you are taking data from for the remarks field has multiple entries for the originl data set.

You must either find a way of linking this table to achieve a 1 to 1 relationship, or adding a filter to reduce records from remarks table to return one row or in Report Options slect distinct records.

Ian
 
I got it to display the one line of text and does not add extra records. However, when I do a count on the records it indicates 206 and there is actually only 163 in the report.

I am getting closer, but still need a bit more work.

What might be causing my count to be out?

Thanks
 
How did you get the report to display only one line? Did you use suppression or group selection? If so, you need to use a running total to count records. If you used group selection, you just do a count of some recurring field, evaluate for each record, reset never, and place it in the report footer. If you used suppression, you need to build the opposite of your suppression formula into the evaluation section->formula area of your running total.

-LB
 
I seem to be back to the beginning. The field I am adding is a text details field made up of four parts, accordning to the report guide.

I have attached a screen shot of my links, and a screen shot of a page from the document.

Every time I add ACT_REG.ACT_RMK to the report it addes records.

With the filters I have in place it should only show 157 records. When I add that field I get over 900 records.

Thanks
Bill
 
 http://www.mediafire.com/imageview.php?quickkey=irs53o4t24wz088&thumb=5
I can not open your attcahments and I don't think LB will open them either. You need to answer LB's question if you want us to help.

Ian
 
Sorry folks, yes the links are not working. First time with the media fire web site as well. I will work on that and see if I can get them to work.

Sorry LB, I did got all excited when I got it work show one line. Unfortunatly I played around in the report so much I can not remember how I got it to work. However Now I am back to where I started.

I did notice that no matter what field I put in there it would show multiple lines for each record. I changed one link and I was able to get my Service Department name in the report without creating multiple records. That makes me think it is the way I have the tables linked.

I will get a screen shot of my tables and links as well as a screen shot of the report uploaded to make it easier to see what I am refering too.

LB, you gave me some advice in your post, but I will need to get my book out to read up on what you told me. I am very new to crystal reports so thank you very much for you patients.

This site is awsome I must say. I really have learned a lot. You may not always get the exact answer but I always get enough information to point me in the right direction. I tend to retain the knowledge more if I have to figure it out myself. Once again GREAT STUFF.

Next post will have links to my screen shots.

Bill
 
You might want to insert a group on ref_no and move your detail fields there. Then remove the act_rmk field from the main report and instead insert it in a subreport that is linked to the main report on the group fields. In the sub, in the selection formula, add:

not isnull({act_rmk})

Place the sub in the group header for ref_no.

-LB
 
Thank you.

I will have to read up on subreports to understand what I am doing.

I will get back to you soon for a status update.

Thanks again

Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top