Solved

Help With Crystal Reports

Posted on 2013-01-17
7
303 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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Import a txt file into a DataGridView and TextBox 20 52
write xml in vb.net 2 34
Parameter Requester showing comma in number field 7 36
Complex SQL statement in VB.NET 7 31
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

820 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