CppMax Homepage
Forum Home Forum Home > ReportMax > ReportMax
  New Posts New Posts RSS Feed - Report shows white page, no data
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Report shows white page, no data

 Post Reply Post Reply
Author
Message
Henner View Drop Down
Newbie
Newbie


Joined: 05 Oct 2015
Location: Herford/Germany
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote Henner Quote  Post ReplyReply Direct Link To This Post Topic: Report shows white page, no data
    Posted: 05 Oct 2015 at 3:28am
Hi there, I am new to ReportMax. Just downloaded the trial to give it a try.
I have read the tutorials, but I cannot get any data on my report page.
This is what I have done by now:
In the Report_SetDataSource event:
        Try

            Dim dsReport As New DataSet
            Dim cnString As String = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\MyFolder\backend\myDB.accdb;"
            Dim cn As New OleDbConnection(cnString)
            Dim cmdReport As New OleDbCommand
            Dim strsql As String

            strsql = "SELECT strArt_Default FROM tbl_Art"
            cn.Open()
            Dim daReport As New OleDbDataAdapter(strsql, cn)
            daReport.Fill(dsReport, "tbl_Report")
            cn.Close()

        Catch ex As Exception
            MessageBox.Show(ex.Message.ToString)
        End Try
'#############################

The query returns 6 rows with correct data inside.
In the Report_Art.rpm file I have a field control in the detail section which name is
strArt and the DataField property is set to strArt_Default (like SQL Statement above).
The ConnectionString and SQL Properties are empty in the Report_Art.rpm page.

Then I have Form1.vb with a ReportMaxViewer1 control which ReportFile property is set to
the full path of my Report_Art.rpm file
(i.e.: C:\Users\xxxx\Documents\Visual Studio 2013\Projects\ReportDesigner\ReportDesigner\Report_Art.rpm

There is no grouping in the report at the moment.
When I run the application, form1.vb shows the report viewer with a blank page.
I cannot see any data.

Can someone please tell me, what I am missing to do?

I am using an Access 2013 database with Visual Studio 2013 community edition..
The connectionstring above works like a charme in another application.
Thanks in advance
Henner
Back to Top
emadns View Drop Down
Admin Group
Admin Group


Joined: 06 Feb 2012
Status: Offline
Points: 130
Post Options Post Options   Thanks (0) Thanks(0)   Quote emadns Quote  Post ReplyReply Direct Link To This Post Posted: 05 Oct 2015 at 10:49am
You need to fill out the dataset parameter passed in SetDataSource function not a local dataset. So:

1. Do not declare dsReport
2. In daReport.Fill line, use daReport.Fill(dataset);

(dataset is the first function parameter)

Back to Top
Henner View Drop Down
Newbie
Newbie


Joined: 05 Oct 2015
Location: Herford/Germany
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote Henner Quote  Post ReplyReply Direct Link To This Post Posted: 05 Oct 2015 at 1:27pm
Thank you very much for your quick answer.
I changed
Dim dsReport as New DataSet to dataset=New DataSet
Then I corrected the daReport.Fill line.
Now Data are shown in the report.
I will start now some experience and excercises with reports and subreports.
If the tests fill my needs, I will purchase, I think.
Thanks again.
best regards
Henner
Back to Top
emadns View Drop Down
Admin Group
Admin Group


Joined: 06 Feb 2012
Status: Offline
Points: 130
Post Options Post Options   Thanks (0) Thanks(0)   Quote emadns Quote  Post ReplyReply Direct Link To This Post Posted: 05 Oct 2015 at 2:38pm
Great. Please let us know of any issues you experience.
Back to Top
Henner View Drop Down
Newbie
Newbie


Joined: 05 Oct 2015
Location: Herford/Germany
Status: Offline
Points: 28
Post Options Post Options   Thanks (0) Thanks(0)   Quote Henner Quote  Post ReplyReply Direct Link To This Post Posted: 05 Oct 2015 at 3:05pm
Sure I will do so.
I will start new posts for that.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.06
Copyright ©2001-2016 Web Wiz Ltd.