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

Discussion in 'ASP .Net' started by JB, Aug 25, 2010.

  1. JB

    JB Guest

    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
    JB, Aug 25, 2010
    #1
    1. Advertising

  2. On Tue, 24 Aug 2010 18:44:06 -0700, JB <>
    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
    Registered User, Aug 25, 2010
    #2
    1. Advertising

  3. JB

    JB Guest

    Re: CrystalReport won't scroll thru all records in ASP.NET appl da

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

    > .
    >
    JB, Aug 26, 2010
    #3
  4. Re: CrystalReport won't scroll thru all records in ASP.NET appl da

    On Wed, 25 Aug 2010 19:58:03 -0700, JB <>
    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.
    Registered User, Aug 26, 2010
    #4
  5. JB

    JB Guest

    Re: CrystalReport won't scroll thru all records in ASP.NET appl da

    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 <>
    > 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.
    > .
    >
    JB, Aug 27, 2010
    #5
  6. Re: CrystalReport won't scroll thru all records in ASP.NET appl da

    On Thu, 26 Aug 2010 16:07:03 -0700, JB <>
    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.
    Registered User, Aug 27, 2010
    #6
  7. JB

    JB Guest

    Re: CrystalReport won't scroll thru all records in ASP.NET appl da

    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 <>
    > 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.
    > .
    >
    JB, Aug 29, 2010
    #7
  8. JB

    JB Guest

    Re: CrystalReport won't scroll thru all records in ASP.NET appl da

    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 <>
    > > 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.
    > > .
    > >
    JB, Aug 31, 2010
    #8
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TiBTIFM=?=
    Replies:
    3
    Views:
    540
    David Jessee
    Aug 29, 2004
  2. David Dvali

    Records per page in CrystalReport

    David Dvali, Aug 26, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    434
    David Dvali
    Aug 26, 2005
  3. THTB
    Replies:
    0
    Views:
    173
  4. Replies:
    3
    Views:
    645
    Anthony Jones
    Nov 2, 2006
  5. Max Williams
    Replies:
    3
    Views:
    157
    Robert Klemme
    Jan 6, 2009
Loading...

Share This Page