Solved

Help With Crystal Reports

Posted on 2013-01-17
7
298 Views
Last Modified: 2013-01-19
I can't seem to figure out how to create this report. I am using vb.net and MySQL
1) I query the database and retreive Student Name, Homeroom and Sponsor information
2) I want to create a report that shows each student, followed by all their Sponsors, followed by a letter to all their sponsors. So it looks like this
Student #1
      Student #1's Sponsor #1 Name and address
      Student #1's Sponsor #2 Name and address
      Student #1's Sponsor #3 Name and address

New Page

Dear  Student #1's Sponsor #1 Name

Letter body

new Page

Dear  Student #1's Sponsor #2 Name

Letter body

new Page

Dear  Student #1's Sponsor #3 Name

Letter body

new Page


Then Repeat the above for student #2, 3,4, etc

I can create a report for the Student and their sponsor Information and I can create a report for the Letter and they work fine.

My problem is I can't create a report that will do both and print out in the correct format.

Can anyone help me here.

Thanks
Whiwex
0
Comment
Question by:whiwex
  • 3
  • 3
7 Comments
 
LVL 22

Expert Comment

by:Ido Millet
ID: 38789189
You can use a subreport for one of these purposes (probably to show all the sponsors and their addresses in the student header section.

And the main report can take care of the other purpose.
0
 

Author Comment

by:whiwex
ID: 38789313
I tried to this

Group Header Section
Subreport with student info

Details Section
Subreport with student letter

problem is it prints All the students and their sponsors

then
it prints all the letters

I need it to print the Student and all the sponsors then the letters for each sponsor then
Print the next student and all the sponsors then the letters for the sponsors
0
 
LVL 22

Accepted Solution

by:
Ido Millet earned 500 total points
ID: 38789326
You need to use a LINKED subreport (the link is the student ID) and use the link to restrict what it shows to info for just that student.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:whiwex
ID: 38789637
Ok I linked the subreport and it's just about working. Here's what i did

Group Header Section 1
The Student Report is in Here

Group Header Section 2
The Letters to the Sponsors are in Here

This works fine but there is always a blank page after the Student Report is Printed. So after the first Student theres a blank page then the sponsors Letters are printed. Then the next next Student is printed then a blank page then the sponsor letters.

I can't seem to get the blank page to not print.
0
 
LVL 22

Expert Comment

by:Ido Millet
ID: 38789674
Check New Page After and New Page Before properties for your sections.
Also check 'Keep Together' properties.
0
 

Author Comment

by:whiwex
ID: 38794337
Ok I got it to work buy removing the New Page After in the report header of the Sponsors Letters.

But because the Sponsor Letters are printed on two sides I need to check how many pages the Student the Student Report is. If the number of pages in each student is odd I need to add a empty page so that the letter doesn't print on the back Side of the Sponsor Letters. I have been tryiung to use PageNumber Mod 2 > 0 but it doesn't work.

I am actually working in the Student report which looks like this

Section1 (ReportHeader) Suppressed

Section2(Page Header)
Columns Headings

GroupHeadingSection1( Group Header #1 Sponsors.Student Name -A)

Section 3 (Details)
       Student Name Sponsor NAme

GroupFooterSection1( Group Footer #1 Sponsors.Student Name -A)

Section4(Group Footer)

Section5(Page Footer)


Section 4

Group Footer Section 1( Group Header #1 Sponsors.Student Name -A)

How do I add a new page after each student?
0
 
LVL 100

Expert Comment

by:mlmcc
ID: 38795531
I don't follow where you need the page break or page added?

I understand that when the report ends on a full odd page you need to print a blank page.

Which section is the end of the letter where you need to test the paging.

mlmcc
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
A short film showing how OnPage and Connectwise integration works.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now