views:

125

answers:

2

hi all, I might be very stupid to ask this question. But I really hav no idea how to do it. My boss wants to get a crystal report and he wants 2 formats. that means he wants summary page on page 1 with one format and details page on page 2 with another format. So I have been thinking two ways. 1st way is to get 2 formats in 1 crystal report. I hav never done that before and I couldn't find it online. 2nd way is to do 2 crystal reports and combine them. I hav no idea how to do that also. So anybody can help? may b both of my ways may b wrong. Any suggestions?

+2  A: 

The ways I can think of (depending on the complexity of the summary requirements) are:

  1. Include value totals in the report heading, with a page break at the start of the first report group.
  2. Include a crosstab with the summary details in the report heading section.
  3. Insert a subreport in the report heading section.
Mark Bannister
A: 

Ok.. I m the one who asks the questions. I know what to do now. and for the sakes of others (beginners like me), I share my experience.
Crystal reports doesn't allow you to have 2 formats in 1 reports.
Cyrstal reports doesn't allow you to export 2 different reports (not subreports) at the same time.
So.. I would do like this.
First, if I want to get 2 different reports, like Summary Page on 1st page and Details Page on 2nd, I will use subreport. But subreport will redirect u to that report itself when u click on it.
I dun want that either.
So I will cover subreport with text object with no background.
But I can't adjust the height of that text object.
I will use this
IEnumerator ie = mycrystalreport.Section1.ReportObjects.GetEnumerator();

        ie.Reset();

        while (ie.MoveNext())

            if (ie.Current != null && ie.Current.GetType().ToString().Equals("CrystalDecisions.CrystalReports.Engine.TextObject"))

            {

                CrystalDecisions.CrystalReports.Engine.TextObject to = (CrystalDecisions.CrystalReports.Engine.TextObject)ie.Current;

                if (to.Name == "my_text_object ")

                    to.Height = "the number you want. might need to calculate";



            }

Good luck

william