PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 1.00 average.

CrystalReport won't scroll thru all records in ASP.NET appl datase

 
 
JB
Guest
Posts: n/a
 
      25th Aug 2010

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. 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
--
JB
 
Reply With Quote
 
 
 
 
Registered User
Guest
Posts: n/a
 
      25th Aug 2010
On Tue, 24 Aug 2010 18:44:06 -0700, JB <(E-Mail Removed)>
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

 
Reply With Quote
 
JB
Guest
Posts: n/a
 
      26th Aug 2010
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 <(E-Mail Removed)>
> 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

> .
>

 
Reply With Quote
 
Registered User
Guest
Posts: n/a
 
      26th Aug 2010
On Wed, 25 Aug 2010 19:58:03 -0700, JB <(E-Mail Removed)>
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.
 
Reply With Quote
 
JB
Guest
Posts: n/a
 
      27th Aug 2010
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 <(E-Mail Removed)>
> 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.
> .
>

 
Reply With Quote
 
Registered User
Guest
Posts: n/a
 
      27th Aug 2010
On Thu, 26 Aug 2010 16:07:03 -0700, JB <(E-Mail Removed)>
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.
 
Reply With Quote
 
JB
Guest
Posts: n/a
 
      29th Aug 2010
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 <(E-Mail Removed)>
> 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.
> .
>

 
Reply With Quote
 
JB
Guest
Posts: n/a
 
      31st Aug 2010
Hello A.G,

I installed Crystal Reports for vs2008 Service Pack 1 because I had
a similar problem with SQL Server Reporting Services and there was a patch or
service pack for that too and when I used it, it made the SQL Server
Reporting
Service prolem disappear.

Your solution does work for alot of people but it didn't work for me
because my
reporting wasn't setup as straight forward as alot of reports usually are.

Thanks for all your help
Jeff



--
JB


"JB" wrote:

> 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 <(E-Mail Removed)>
> > 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.
> > .
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I use the scroll wheel to scroll through records - Access2007 Jim Roberts Microsoft Access 3 2nd Sep 2008 03:36 PM
In one appl. I have lost the vert. scroll bar.Tools no help =?Utf-8?B?Um9idC4=?= Microsoft Excel Worksheet Functions 1 17th Nov 2006 03:49 AM
bypass .Net not installed on PC - embed c# appl. in C++ win32 appl =?Utf-8?B?c3Rvag==?= Microsoft C# .NET 1 28th Jun 2006 01:46 AM
Windows desktop appl like browser appl Steve Richter Microsoft C# .NET 3 19th Apr 2005 10:24 PM
Please Help! What message should I get in my appl when somebody close appl from the Windows Task Manager =?Utf-8?B?UG9sYQ==?= Microsoft Dot NET 4 21st Apr 2004 03:47 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:45 AM.