none
Layout Local Report RRS feed

  • Question

  • Hello,

     

    I have a problems with a Local Report (.rdlc) called in C#.

     

    I have an header page, and in my report two TextBox. The first is a label in sigle line, and second is a multi lines TextBox.

    If TextBox2 takes less place that the rest of the page, then I have one page.

     

    If TextBox2 takes more place that the rest of the page and wich can displayed on one full page, then I have two pages, in first I have my TextBox1 and on the second I have my TextBox2.

     

    If my TextBox2 takes more place that the rest of the page and wich can't be displayed on one full page, then I have two pages, in first I have my TextBox1 and the begining of TextBox2, and on the second I have the end of TextBox2.

     

    How make for always begin on the first page, even if the TextBox2 takes more place that the rest of the page and wich can displayed on one full page ?

     

     

    Thanks...

    Friday, April 25, 2008 12:15 PM

All replies

  • Not so easy to understand your problem, but rectangle uses to simplify most of design pbs.
    Try to put your two textbox in a same rectangle.
    Friday, April 25, 2008 3:14 PM
  • Hello,

     

    I tried with a global rectangle, no changes.

     

    My problem : When a Text of a TextBox is between a particular number of lines, then LocalReport create two pages and the TextBox is entirely on the second page.

     

    If you want, I created a basic example ?

    Tuesday, May 13, 2008 1:54 PM
  • Hi,

    Let send the basic example... Maybe it can help.

    Regards
    Wednesday, May 14, 2008 6:35 AM
  • Ok, I see a little bit your problem... I've got a similar problem on a report that I solve by creating a datatable with needed value before launching the report.
    For me the only way to solve this is to replace your multiline parameter value by a report datasource filled by a datatable.

    _LocalReport.ReportEmbeddedResource = _NomRapport;

                // Get list of needed DataSources
                IList<string> list = this.reportViewer1.LocalReport.GetDataSourceNames();
                reportViewer1.LocalReport.DataSources.Clear();

                // For each DataSources, retrieve it from report definition
                Dictionary<string, DataTable> reportDataSources = GetDataSources(); // GetDataSources() retrieve <"ReportDataSource Name as it is declared in the report", "Datatable containing data">
                foreach (string datasourceName in list)
                    reportViewer1.LocalReport.DataSources.Add(new ReportDataSource(datasourceName, reportDataSources[datasourceName]));

    reportViewer1.RefreshReport();



    Wednesday, May 14, 2008 12:51 PM
  • My example is basic, but the report that I have a problem is more complex.


    My report uses parameters and DataSources Objects, but my problem is similar.

     

    Using a Binding object or parameters does not change how to display the lines in the TextBox. I searched an option in the TextBox but I found nothing.

    Wednesday, May 14, 2008 2:21 PM
  • There is no option at textbox level. Using a datasource instead of a pramater will allow you to use reportviewer table or list and therefore having correct page break.
    Wednesday, May 14, 2008 2:51 PM