DataSource VSTUDIO 2008

Hello everybody,

I design a FastReport in VSTUDIO 2008 and the Datasource is a XML-Schema. It is possible to Set the datasource at run-time? Charging a Dataset that repect the schema?

Thanks.

Comments

  • edited 2:35AM
    Hello,

    You may register the dataset using the Report.RegisterData method:
          FReport = new Report();
          FReport.Load(...);
          FDataSet = new DataSet();
          FDataSet.ReadXml("nwind.xml");
          FReport.RegisterData(FDataSet, "NorthWind");
    
  • edited 2:35AM
    Hello

    I have a problem with that code, i do it but it only show one row, i hope you can help me

    Report rpTest = ((WebReport)sender).Report;
    rpTest.RegisterData(dsdata);

    thanks
    Eliana M. L??pez
  • edited 2:35AM
    Hello,

    For WebReport please use StartReport event handler as described in the programmer's manual:

    "It can be done by using the StartReport event of the WebReport component. In this event handler, you can call the RegisterData and RegisterDataAsp methods of the report. The report can be accessed through the WebReport.Report property:

    webReport1.Report.RegisterData(myDataSet);"
  • edited 2:35AM
    i allready do that, this is my code

    protected void Page_Load(object sender, EventArgs
    {
    dsdata = clscities.Cities_List();
    WebReport1.Prepare();
    }

    protected void WebReport1_StartReport(object sender, EventArgs e)
    {
    Report rpTest = ((WebReport)sender).Report;
    rpTest.RegisterData(dsdata, "Datos");
    }
  • edited 2:35AM
    Check your report, probably you need to assign the datasource to the "Data" band. Unbound data band displays one row only.
  • edited June 2009
    hi again

    On vs or the report
    how can i do that???

    i have to register data in both sides??? because i thing i'm already doing it in vs using the registerdata, i have to do it in the report to???
  • edited June 2009
    Sorry, I don't understand your problem.

    When you create a new report, you need the datasource for it. You have to attach a data band to this datasource, if you want to print all datasource rows. If your data band is not attached to a datasource, it will print the first row only.

    See the programmer's manual, "Working with ASP.NET/Using the WebReport component"
  • edited 2:35AM
    thanks for all!!!

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.