Link to home
Start Free TrialLog in
Avatar of adembo
ademboFlag for United States of America

asked on

Crystal Report - Add multiple rows of the same data via parameter

Hello, I have Crystal Reports 2011 and I am creating a student transcript from an Excel export I get from our grading system. I had set this up to import into a SQL Database as i will be sending this report to multiple recipients who will not have the actual file, but will have access to the DB. That all works fine. What my challenge is that I have 10 rows for example that all have the same student name on it. Last Name is a field. First Name is a field, Course is a field, along with many others. So when I create my parameter using the selection of Last Name, it will only add the first row it finds. How do I tell it to add all rows for the same last name? So each row would be Students Name - Course on each line.

I have found some suggesting an All command that can be used in the parameter, but I do not see anywhere that I can insert a query command, as that article was talking about putting a command on the query value, but thats only a drop menu of defined criteria.

Thanks
Avatar of Mike McCracken
Mike McCracken

What tables do you have?

Is this a single table?

What other filtering is being done?

Can you show the SQL and the table links?

mlmcc
Avatar of adembo

ASKER

The tables are pretty generic. When I import the XLS in the DB it creates each unique table for the header on the sheet which I then see in crystal after I added that database with database expert.

StudentLastName - StudentFirstName - SchoolLocation - Grade - CourseName - CreditHours

So what I am doing was just dragging that particular field from the list from the database hierarchy in the right column list (forgetting the actual name of that view)  in crystal on the form I had created. So for example I have the line on my report that I want the last name, first name, course, grade. So I only dragged those particular fields on my report. So thats where I am seeing it only showing me the first line for that particular student. I swear one time it actually showed me all of them, but it was far too large for the box I am creating them in and with a few clicks i ended up losing them and since I dont know what I did, I am not able to get it back.

So on my report, it shows {StudentLastName} {StudentFirstName} {School Location} {Grade} {CourseName} {CreditHours} and those are all on one line. I then want it to show me all lines that match the last name, first name, and school which I had set up in the parameters to prompt for upon opening the report.

Thanks for looking at this!
Avatar of adembo

ASKER

So Im not sure how to answer if its a single table. I just imported the XLS file and the parent folder I see is some random characters it looks like. Then expanding it I can see all the column headers that were on the first line of my XLS sheet exactly the same as they were on the XLS sheet.

I am not purposely doing any filtering. Only the fact that I am only dragging the fields from the list on the right that I want.

I can send a screen shot of the table links when I get in tomorrow.
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of adembo

ASKER

I was indeed only using the group header, I will look at the detail section.


Thanks
Avatar of adembo

ASKER

Yes, that definately does allow it to display all the lines, so thats perfect, but the problem is that there is like a good inch in between each line. I need there to be no spaces in between them, so is this a setting I need to set somewhere?

Thanks so much
Make sure the detail section is only as large as the tallest field

You may need to suppress sections that have no objects like a group footer

mlmcc
Avatar of adembo

ASKER

Excellent, again a perfect solution. Thanks!