Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 5th, 2007, 03:33 PM
Registered User
 
Join Date: Feb 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Facing problem using crystal report in VS 2005

Hi,

I am working on Visual Studio 2005 using C#

I am creating report using inbuilt crystal report services

I am using crystal report viewer on my aspx page

When ever I run the page first time my report shows good results

As soon as i click on the export button or pagination button or zoom drop down from the crystal report viewer control

My page refreshes and nothings works properly.

If I change the zoom then it works for the first time, then it does not change and pagination comes in the way

1/ 1+

and if I click export and print option than the page refreshes and it is not working properly

Below is my code for cs and aspx code

My code behind code


    protected void Page_Load(object sender, EventArgs e)
    {

            CrystalReportViewer1.DataBind();
            Page.Title = "Student Progress Report";
            // Button2.Attributes.Add("Onclick", "pickDate('txtFromDate')");
            GenerateReport();
            //CrystalReportViewer1.Visible = false;
    }


    protected void GenerateReport()
    {
        string strreportPath = ConfigurationManager.AppSettings["reportPath"].ToString();

        string strDatabaseUsernameForReports = ConfigurationManager.AppSettings["DatabaseUsernameForReports"].ToString();
        string strDatabasePasswordForReports = ConfigurationManager.AppSettings["DatabasePasswordForReports"].ToString();
        string strDatabaseServernameForReports = ConfigurationManager.AppSettings["DatabaseServernameForReports"].ToString();
        string strDatabasenameForReports = ConfigurationManager.AppSettings["DatabasenameForReports"].ToString();

        ReportDocument report = new ReportDocument();
        report.Load(@"" + strreportPath + "ImageReport.rpt");

        report.SetDatabaseLogon(strDatabaseUsernameForRepo rts, strDatabasePasswordForReports, strDatabaseServernameForReports, strDatabasenameForReports);

         report.SetParameterValue("@username", "Dinesh Bali");

        CrystalReportViewer1.ReportSource = report;

        CrystalReportViewer1.Visible = true;
    }



        below is my aspx page the code is

        <CR:CrystalReportViewer ID="CrystalReportViewer1" runat="server" AutoDataBind="true" />


Please help me at the earliest

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[2005] Crystal Report Exception Error snufse .NET Framework 2.0 3 February 26th, 2008 12:25 PM
Using Crystal in VB 2005 without Report Viewer csdunaway Crystal Reports 6 July 18th, 2007 11:48 AM
Crystal Report in VS 2005 shivvaamailak .NET Framework 2.0 0 April 6th, 2007 08:19 AM
Problem in Crystal Report in VS.NET 2005 SaeedNawazMalik .NET Framework 2.0 1 March 4th, 2006 03:59 PM
facing problem to export crystal report to PDF whi agarwal Beginning VB 6 0 November 12th, 2005 06:57 AM



All times are GMT -4. The time now is 04:04 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.