Username:
Password:
Crystal Reports XI: Beginner Tutorials

Designing a Basic Report / Inserting Objects into Reports

Subtitles of the Movie

In this movie we're going to learn how to Insert an object into a Crystal Report. Using Report1, our report that points at the Employee Table of our Test Database, go ahead and scroll over until you find the Middle Name column. Go ahead and click on any field, aside from the Title field. Go ahead and press Delete. Congratulations! You've just learned how to delete stuff off of a report. But now let's say we, during our report creation process with the Report Wizard, we forgot to add a few fields we may need. Let's say we forgot the Last Name as well. Go ahead and click on that, and press Delete. In order to Insert a field into the database you need to go to the View Menu and click on Field Explorer if it's not already visible. If it's already visible you're one step ahead. Now your Field Explorer can be placed in many ways. Floating as you see before you on the screen, and fixed. In this exercise we're going to go ahead and leave it floating. Your Field Explorer lists all the fields available to you to actually pull into your report. The very first section are your Database Fields followed by your Formula Fields, your SQL Expression Fields, Parameter Fields, Running Total Fields, Group Name Fields, and Special Fields. In this case all we're dealing with are Database Fields. If you go ahead and click on that icon it'll collapse all the tables and by definition collapsing again will show you all the fields in those tables that are available to you. Notice how the fields that are already check-marked actually show up on our report, EmployeeID, Type, and First Name are already present. In order to add the fields that are not present, the ones we have just deleted, the Middle Name and the Last Name, simply click and hold down, drag your mouse over, and find a place to put it. You'll notice I have some gray Guidelines that appear as I'm dragging objects. That's to help me line it up with the rest of the report objects. If I release the mouse button now my Middle Name column appears as well as the data within it. Now, I would recommend you actually do this in Design view because clicking on Design view and pulling my Field Explorer Window a little bit down and out of the way, you can see how my Middle Name field overlaps slightly with my First Name field. Now, this is a problem, especially if you're printing because they're going to overlap and if a First Name takes up the entire box, well, then it's kind of muddled and hard to read the end of the first name and the beginning of the middle name. What you can do at this point is click on the field and notice it turns a nice highlighted color. On my system it's blue, in your system it may be slightly different, but a highlight is a highlight, and go ahead and hold the mouse button down, pull it over until it lines up with that nice Guideline. And now the fields are completely separated. Now we're going to scroll over and we're going to add Last Name. Go ahead and click on Last Name in Field Explorer, hold the mouse button down and drag your field to where you think it needs to be. Now you can overlap the page slightly but we don't want to do that. Notice how the outline of the box kind of overlaps our Middle Name. That's okay. We'll fix that in a second. Go ahead and release the mouse button, and now it appears. But we still have the same problem. We have two overlapping fields that technically when printed will overlap each other and become illegible. Go ahead and click on Middle Name. Notice how the box has now been highlighted. Go ahead and drag your mouse. As you're inside the box it has the four arrows if you will, telling you that you can move this. As you drag your mouse across the field it changes from the four pointing arrows to two pointing arrows. Once it's there go ahead and click and hold the mouse button down. You can then drag the field back to the size that you want and you don't have to worry about overlapping. Now we can do the same thing with our Last Name. Click on the Last Name field, drag the mouse over, notice that once you hit that left-hand edge in the center it turns to a single double arrow. Go ahead and click and hold the mouse button down, and drag it to the next Guideline, and now we have enough space between the two. You can also play with the size and the lengths in this point. Go ahead and click on Preview. Now we have Middle Name and Last Name not overlapping and spaced apart. As you can see, inserting a field is as easy as drag and drop. The only thing you have to worry about is layout and positioning.

Tutorial Information

Course: Crystal Reports XI: Beginner
Author: Kurt Dunlap
SKU: 33966
ISBN: 1-935320-29-7
Release Date: 2009-02-10
Duration: 6.5 hrs / 95 lessons
Work Files: Yes
Captions: Available on CD and Online University
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 81,350 Video Tutorials (20,800 free)
  • Video Available as Flash or QuickTime
  • Over 782 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available