CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2011
    Posts
    3

    Report Textboxes with Expressions Not Receiving Data from DataSet

    Using VS 2010 with VB

    I have a report that when sent to ReportViewer - Laboratory.ConcreteTestReportForm.Show()

    prints the form text as well as the database data per the expressions given for each textbox. No problem, printed report is perfect.


    However, when I print it directly to the printer (bypassing ReportView) - Laboratory.PrintReportModule.PrintTestReport.Main(), the form text prints fine, but the textboxes holding the database expressions are left blank.

    Here is my Load DataSet Function:

    Public Function LoadLIMSData() As DataTable

    Dim dataSet As New DataSet()
    dataSet.ReadXml("..\..\LIMSDataSet.xsd")
    LoadLIMSData = dataSet.Tables(0)

    End Function

    And here is my Run Sub:

    Public Sub Run()

    Dim report As LocalReport = New LocalReport()
    report.ReportPath = "..\..\TestReport.rdlc"
    report.DataSources.Add(New ReportDataSource("LIMSDataSet", LoadLIMSData()))
    Export(report)

    m_currentPageIndex = 0
    Print()

    End Sub

    It appears the dataset is not being read, but I cannot figure out why not.

  2. #2
    Join Date
    Jun 2011
    Posts
    3

    Re: Report Textboxes with Expressions Not Receiving Data from DataSet

    Buhler

  3. #3
    Join Date
    Jun 2011
    Posts
    3

    Re: Report Textboxes with Expressions Not Receiving Data from DataSet

    I am having a very difficult time getting help with this problem on any ado forum.

    Can someone suggest a firm who, for a fee, can help me? I have dozens of reports that are complete; however, I just want to skip the reportviewer page and print straight (as in FASTER) to the printer. Time is money on both sides of this issue.

    Thanks in advance.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured