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

J

JB

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
 
R

Registered User

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
 
J

JB

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 said:
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
.
 
R

Registered User

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.
 
J

JB

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
 
R

Registered User

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.
 
J

JB

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
 
J

JB

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top