locked
How to height of crystal report, and bind datasource RRS feed

  • Question

  • User-468333257 posted

    How to do all the above with a datatable/dataset

    I use a sql query to get dataset or datatable

    ReportDocument rptDoc=new ReportDocument();

    rptDoc.Load(Server.MapPath("CrystalReport2.rpt")); //must crystal report 2 be a empty report?

    Datatable dt=getsqlset();

    rptDoc.SetDataSource(ds);

    CrystalReportViewer1.ReportSource=rptDoc;

    Tuesday, October 9, 2012 12:42 PM

Answers

  • User-578610739 posted

    Hi Friend,

    report automatically taken height, width as per given content and page size (which you define in print option).So don't worry about this.

    For databinding see link.

    http://www.codeproject.com/Questions/462415/Create-crystal-report-through-Dynamic-DataTable

    http://msdn.microsoft.com/en-us/library/ms227881%28v=vs.80%29.aspx

    http://www.codeproject.com/Articles/166291/Generate-a-report-using-Crystal-Reports-in-Visual

    http://www.codeproject.com/Articles/28899/Crystal-Report-with-DataSet-and-DataTable-using-C

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 10, 2012 3:31 AM

All replies

  • User-578610739 posted

    Hi Friend,

    report automatically taken height, width as per given content and page size (which you define in print option).So don't worry about this.

    For databinding see link.

    http://www.codeproject.com/Questions/462415/Create-crystal-report-through-Dynamic-DataTable

    http://msdn.microsoft.com/en-us/library/ms227881%28v=vs.80%29.aspx

    http://www.codeproject.com/Articles/166291/Generate-a-report-using-Crystal-Reports-in-Visual

    http://www.codeproject.com/Articles/28899/Crystal-Report-with-DataSet-and-DataTable-using-C

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, October 10, 2012 3:31 AM
  • User-468333257 posted

    I wish to adjust the height as the user is viewing a web page with a crystal report viewer

    If the height is too long, the user has to scroll all the way down

    so far i tried editing the properties in the crystal report viewer but height doesn't change

    Wednesday, October 10, 2012 4:10 AM
  • User-578610739 posted

    Hi Friend,

    The height comes from pagesize which you define in design time. report viewer just show the data as you desing in crystal report file.

    If the height is too long, the user has to scroll all the way down

    Height is automatically adjust as per papersize's height, and break into the next page till all content will complete with footer and header margin.

    Ideally scroll not comes a4 size which is default paper size for all printer.

    in a3, a2 , it will comes. and you give the custom size for your solution .

    Actully not understand that why scroll is needed? because crystal report is make ready to the data at printing level.

    Thursday, October 11, 2012 3:38 AM