Prev: Blank aspx page
Next: ReportViewer 2010 SubReport
From: JB on 25 Aug 2010 22:58 Hello A.G. I agree with you but how do I get access firstPage + 1 to change it to currentPage + 1? Jeff -- JB "Registered User" wrote: > On Tue, 24 Aug 2010 18:44:06 -0700, JB <JB(a)discussions.microsoft.com> > wrote: > > > > >Hello Community > > > > Using CrystalReports embedded reporting in an ASP.NET application > >I create a table named reportDT. The table usually contains more > >than 10 rows which takes creates about 7 pages of reports. However > >after creating the report using CrystalReports it shows the first page > >containing 2 of the records which is fine then clicking the > >"Next" carat symbol on the toolbar CrystalReports shows the next page > >containing 2 records which is also fine, furthermore if I click the "End" > >carat symbol that is beside the "Next" carat symbol on the toolbar > >CrystalReports will show the last report page also containing > >2 records. The problem is that by clicking the "Next" carat on the toolbar > >stops scrolling after clicking the "Next" carat symbol after the 2nd page > >shows the 2 records and will only show that 2nd page no matter how many times > >I click the "Next" carat symbol on the toolbar. > > Since the Next value is always the same, it suggests that value is set > by using firstPage + 1 rather than currentPage + 1. > > regards > A.G. > > >Therefore it only shows the > >first page with 2 records and if I click the "Next" carat symbol it will show > >the 2nd page or if I click the "End" carat symbol it will jump to the last > >page which shows the last 2 records. > > > > That means it skips all pages containing rows "unless" I manually type > >in the textbox the number "3" and press return which will show the 3rd page > >of the report with 2 records and if I type "4" in the textbox it will take me > >to the 4 page containing 2 records, continuing entering the page numbers will > >take me all of the way to the last page containing 2 records. > > > > The questions is why doesn't clicking the "Next" carat on the toolbar > >stop scrolling thru the table creating the reports after the 2nd page? > > > > I create the table manually and then on the fly I create a dataset which > >is basically a copy of the table and then print from the dataset after it is > >created. Below is the dataset that the CrystalReports creates the report > >from: > > > > > >dataset1 = ReportFolder.PartFolder(screw); > >dataset1 .Tables[0].TableName = "reportDt"; > >dataset1 .WriteXml(@"c:\dataset1.xml"); > > > >fyi, I pass the report to ResponseHelper.Redirect > > > > Thanks > > > > Jeff > . >
From: Registered User on 26 Aug 2010 06:34 On Wed, 25 Aug 2010 19:58:03 -0700, JB <JB(a)discussions.microsoft.com> wrote: >Hello A.G. > > I agree with you but how do I get access firstPage + 1 to change it to >currentPage + 1? > > Jeff I must admit I didn't fully read the question and overlooked that this involved the Crystal Reports viewer. The error can only orginate with either the tool or the report. The CR viewer's paging is built-in and well-proven so the problem appears to be in the report and the data it contains. How is the report being generated and is the data in the report valid? The viewer is showing the correct pages but the data repeats itself from page 2 to the last page. i.e. page 1 contains 'ABCDE' page 2 contains 'FGHIJ' page 3 contains 'FGHIJ' page 4 contains 'FGHIJ' .... because the report's data is ABCDEFGHIJFGHIJFGHIJ.... I apologize for not being more thorough in reading your initial post. regards A.G.
From: JB on 26 Aug 2010 19:07 Hello A.G. Let me go over the problem: -The reports will show each page (pages 1 - 6) if I manually enter each page number into the textbox on the toolbar to scroll thru the pages. However, if I click the "Next" carat on the toolbar instead of entering the page number into the textbox on the toolbar to try to scroll thru, those same 6 pages will only show to the 2nd page of reports and gets stuck there. It is thought that since the report is in the Page_Load event it only goes to the 2nd page but if I execute the code from the Page_Init it will then scroll thru all the pages. So I created Page_Init event and copied the "ReportSource" command into the Page_init but it still only goes to the 2nd page when I click the "Next" carat. fyi, this problem just started happening after I first created the report it used to scroll thru all of the pages when I click the "Next" carat. Below is what I copied into Page_Init. any thoughts? protected void Page_Init(object sender, EventArgs e) { ReportDocument Report11 = new ReportDocument(); CrystalReportViewer1.ReportSource = Report11; CrystalReportViewer1.Visible = true; } Thanks Jeff -- JB "Registered User" wrote: > On Wed, 25 Aug 2010 19:58:03 -0700, JB <JB(a)discussions.microsoft.com> > wrote: > > >Hello A.G. > > > > I agree with you but how do I get access firstPage + 1 to change it to > >currentPage + 1? > > > > Jeff > > I must admit I didn't fully read the question and overlooked that this > involved the Crystal Reports viewer. The error can only orginate with > either the tool or the report. The CR viewer's paging is built-in and > well-proven so the problem appears to be in the report and the data it > contains. > > How is the report being generated and is the data in the report > valid? The viewer is showing the correct pages but the data repeats > itself from page 2 to the last page. i.e. > > page 1 contains 'ABCDE' > page 2 contains 'FGHIJ' > page 3 contains 'FGHIJ' > page 4 contains 'FGHIJ' > .... because the report's data is > ABCDEFGHIJFGHIJFGHIJ.... > > I apologize for not being more thorough in reading your initial post. > > regards > A.G. > . >
From: Registered User on 27 Aug 2010 14:49 On Thu, 26 Aug 2010 16:07:03 -0700, JB <JB(a)discussions.microsoft.com> wrote: >Hello A.G. > > Let me go over the problem: > Thank for your your patience. I guess I've been replying before my morning coffee. >-The reports will show each page (pages 1 - 6) if I manually >enter each page number into the textbox on the toolbar to scroll >thru the pages. However, if I click the "Next" carat on the >toolbar instead of entering the page number into the textbox on >the toolbar to try to scroll thru, those same 6 pages will only show >to the 2nd page of reports and gets stuck there. > >It is thought that since the report is in the Page_Load event it >only goes to the 2nd page but if I execute the code from the Page_Init >it will then scroll thru all the pages. So I created Page_Init event and >copied the "ReportSource" command into the Page_init but it still only goes >to >the 2nd page when I click the "Next" carat. > >fyi, this problem just started happening after I first created the report >it used to scroll thru all of the pages when I click the "Next" carat. > >Below is what I copied into Page_Init. any thoughts? > > protected void Page_Init(object sender, EventArgs e) > { > ReportDocument Report11 = new ReportDocument(); > CrystalReportViewer1.ReportSource = Report11; > CrystalReportViewer1.Visible = true; > > } > I was able to reproduce the issue you are experiencing. This resolved the issue in my test app. protected void Page_Init(object sender, EventArgs e) { CrystalReportViewer1.ReportSource=Server.MapPath("CustomerList2.rpt"); } regards A.G.
From: JB on 29 Aug 2010 15:07
Hello A.G. It seems like our tests are similar. I will give your test a try tomorrow. I forgot to mention there are also five reports so I will have to make 5 entries (1 for each) in Page_Init. thanks Jeff -- JB "Registered User" wrote: > On Thu, 26 Aug 2010 16:07:03 -0700, JB <JB(a)discussions.microsoft.com> > wrote: > > >Hello A.G. > > > > Let me go over the problem: > > > Thank for your your patience. I guess I've been replying before my > morning coffee. > > >-The reports will show each page (pages 1 - 6) if I manually > >enter each page number into the textbox on the toolbar to scroll > >thru the pages. However, if I click the "Next" carat on the > >toolbar instead of entering the page number into the textbox on > >the toolbar to try to scroll thru, those same 6 pages will only show > >to the 2nd page of reports and gets stuck there. > > > >It is thought that since the report is in the Page_Load event it > >only goes to the 2nd page but if I execute the code from the Page_Init > >it will then scroll thru all the pages. So I created Page_Init event and > >copied the "ReportSource" command into the Page_init but it still only goes > >to > >the 2nd page when I click the "Next" carat. > > > >fyi, this problem just started happening after I first created the report > >it used to scroll thru all of the pages when I click the "Next" carat. > > > >Below is what I copied into Page_Init. any thoughts? > > > > protected void Page_Init(object sender, EventArgs e) > > { > > ReportDocument Report11 = new ReportDocument(); > > CrystalReportViewer1.ReportSource = Report11; > > CrystalReportViewer1.Visible = true; > > > > } > > > I was able to reproduce the issue you are experiencing. This resolved > the issue in my test app. > > protected void Page_Init(object sender, EventArgs e) > { > > CrystalReportViewer1.ReportSource=Server.MapPath("CustomerList2.rpt"); > } > > > regards > A.G. > . > |