Interactive report and dynamically go to 2nd page

weiwei
edited 4:06AM in FastReport .NET
I have a very simple interactive report. It has two pages.
Click a link on report page 1 takes you to report page 2.

Now when I generate the report dynamically in code, I want to go to page 2 directly, is it possible? and how?

I tried something like
report1.SetParameterValue("MyReportNumber", 2);

before call report1.prepare(), but it doesn't seem to work.

Comments

  • weiwei
    edited 4:06AM
    wei wrote: »
    I have a very simple interactive report. It has two pages.
    Click a link on report page 1 takes you to report page 2.

    Now when I generate the report dynamically in code, I want to go to page 2 directly, is it possible? and how?

    I tried something like
    report1.SetParameterValue("MyReportNumber", 2);

    before call report1.prepare(), but it doesn't seem to work.

    No help? I thought the response time is normally pretty fast.
  • edited 4:06AM
    Hello,

    You may add another report tab using the previewControl.AddTab method.
  • weiwei
    edited February 2012
    AlexTZ wrote: »
    Hello,

    You may add another report tab using the previewControl.AddTab method.

    Hi Alex, I am not trying to added another report tab to previewControl though.

    I am trying to generate the report directly and dynamically, do u know what I mean?

    the code snipe is

    Report report = new Report();
    report.RegisterData(dataSet, dataSetName);
    report.Load(templateStream);
    report.SetParameterValue(name, value);
    report.Prepare();
    report.Export(new HtmlExport(), context.Response.OutputStream);

    BUT this will only export the first reportpage of the report, can I directly export the 2nd reportpage instead???
  • edited 4:06AM
    Hello,

    Try this:

    (report.Pages[0] as ReportPage).Visible = false;
    (report.Pages[1] as ReportPage).Visible = true;
    report.SetParameterValue(name, value);
    report.Prepare();

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.