How Can I add some data to specific page ??

Hi

I have report and I know it's only 3 pages …. If I need to add some text data to page 2 .. How can I do that

Means How can I add text information (maybe from Parameters) to specific page .. Like only page 2

And thanks with my best regarding

Fraas



Answer this question

How Can I add some data to specific page ??

  • hushtech

    thanks Mr. jqsimple this my target :(
  • OberCanober

    thanks for the alswers

    but Mr.VASUSIVA How can I Hide the (textobject)

    please can you give me a code snippet

    thanks


  • chandrashekar

    hi

    In second page add text filed with instabce name textTitle and i n run time u can get to this filed and write in anything u want

    TextObject textTitle;

    textTitle = Report.ReportDefinition.ReportObjects["txtDetails"] as TextObject;

    textTitle ="HELLO ..."

    I hope its will help u



  • Dave_R

    Suppress the textobject (whatever the object you use) if page no<>2


  • Matja&amp;#382;

    Otherwise place the textobject in the section where you want. Rightclick the object. Go to Format.Enable the supress option and click 'X-2' (formula Editor) and write 'pagenumber<>2'. Hopefully it will help you


  • Glenn87

    You can try this:

    1. Add the TextObject where you'd like it to be displayed.
    2. In the code, add an event handler to the Navigate Event of the CrystalReportViewer object.
    3. In the new event handler, suppress(hide) the TextObject based on the CurrentPageNumber


    crystalReportViewer1.ReportSource = myReportDocument;
    crystalReportViewer1.Navigate += new NavigateEventHandler(crystalReportViewer1_Navigate);

    void crystalReportViewer1_Navigate(object source, NavigateEventArgs e){

    TextObject myTObj = (TextObject)myReportDocument.ReportDefinition.ReportObjects["Text1"];
    if (crystalReportViewer1.GetCurrentPageNumber() == 1)
    myTObj.ObjectFormat.EnableSuppress = true;
    }


    NOTE: You'll want to look at what GetCurrentPageNumber() returns for your report. It may return -1 for the first page then 1 for the second page, 2 for the third page, etc. In which case you need to test "== 1".

  • How Can I add some data to specific page ??