Blank Report?
Blank Report?
I have this code. But Still get nothing in viewer its just a blank report. Did I miss something?
Chged it to this:
sqlcon.Open()
Dim sql1 As String
Dim da As SqlDataAdapter
Dim ds As New DataSet
sql1 = "select ID,Deliverables,To_PM from PM70.Synopsis_Deliverables where(Estimate_Number=" & test & ")"
da = New SqlDataAdapter(sql1, sqlcon)
report.Load(Server.MapPath("~/Forms/Work_Orders/Photoworkorderprint.mrt"))
ds.Tables.Add("Synopsis_Deliverables")
da.Fill(ds, "Synopsis_Deliverables")
report.DataSources.Clear()
report.Dictionary.Databases.Clear()
'report.RegData("PM1", ds.Tables("Synopsis_Deliverables"))
report.RegData("Synopsis_Deliverables", ds)
report.Dictionary.Synchronize()
report.Compile()
'report.Render(True)
StiWebViewer1.Report = report
Chged it to this:
sqlcon.Open()
Dim sql1 As String
Dim da As SqlDataAdapter
Dim ds As New DataSet
sql1 = "select ID,Deliverables,To_PM from PM70.Synopsis_Deliverables where(Estimate_Number=" & test & ")"
da = New SqlDataAdapter(sql1, sqlcon)
report.Load(Server.MapPath("~/Forms/Work_Orders/Photoworkorderprint.mrt"))
ds.Tables.Add("Synopsis_Deliverables")
da.Fill(ds, "Synopsis_Deliverables")
report.DataSources.Clear()
report.Dictionary.Databases.Clear()
'report.RegData("PM1", ds.Tables("Synopsis_Deliverables"))
report.RegData("Synopsis_Deliverables", ds)
report.Dictionary.Synchronize()
report.Compile()
'report.Render(True)
StiWebViewer1.Report = report
Blank Report?
In your Work_Orders/Photoworkorderprint.mrt report template, what is the 'Name In Source' value set as for your Datasource?
The code posted below looks like it is expecting the Name In Source to be "Synopsis_Deliverables.Synopsis_Deliverables"
The code posted below looks like it is expecting the Name In Source to be "Synopsis_Deliverables.Synopsis_Deliverables"
Blank Report?
Thanks!!! That was it! WHEW!
Blank Report?
THIS WORKED. But...if I am setting datasource to nothing then why do I need to even have a datasource set if I am using another query in code?
sqlcon.Open()
Dim sql1 As String
Dim da As SqlDataAdapter
Dim ds As New DataSet
sql1 = "select ID,Estimate_Number,Deliverables,To_PM from PM70.Synopsis_Deliverables where(Estimate_Number=" & test & ")"
da = New SqlDataAdapter(sql1, sqlcon)
report.Load(Server.MapPath("~/Forms/Work_Orders/Photoworkorderprint.mrt"))
ds.Tables.Add("Synopsis_Deliverables")
da.Fill(ds, "Datasource1")
report.Dictionary.Databases.Clear()
report.DataSources.Clear()
report.RegData("PM1", ds.Tables("Synopsis_Deliverables"))
report.RegData("Datasource1", ds)
report.Dictionary.Synchronize()
report.Compile()
'report.CompiledReport.DataSources("Datasource1").Parameters("Estimate_number").ParameterValue = test
'report.Render(True)
StiWebViewer1.Report = report
sqlcon.Open()
Dim sql1 As String
Dim da As SqlDataAdapter
Dim ds As New DataSet
sql1 = "select ID,Estimate_Number,Deliverables,To_PM from PM70.Synopsis_Deliverables where(Estimate_Number=" & test & ")"
da = New SqlDataAdapter(sql1, sqlcon)
report.Load(Server.MapPath("~/Forms/Work_Orders/Photoworkorderprint.mrt"))
ds.Tables.Add("Synopsis_Deliverables")
da.Fill(ds, "Datasource1")
report.Dictionary.Databases.Clear()
report.DataSources.Clear()
report.RegData("PM1", ds.Tables("Synopsis_Deliverables"))
report.RegData("Datasource1", ds)
report.Dictionary.Synchronize()
report.Compile()
'report.CompiledReport.DataSources("Datasource1").Parameters("Estimate_number").ParameterValue = test
'report.Render(True)
StiWebViewer1.Report = report
Blank Report?
There are many ways to use StimulReports.
One way is for it to have it pull the data from a datasource for you (SQLServer, Access, Oracle, etc).
The other way is for you to push data into it as a datasource (DataTables, DataSets, Object collections, etc)
I'm not sure how you are using it, but if you have SQL Connections and SQL Data sources in your report template then instead of passing in a dataset you can just alter the report template's Sql connection string at runtime, set your parameters for your datasources and let StimulReports fetch the data for you and register the data for you.
The other approach is to fetch the data yourself in code from your DB and then register that data as a Datasource in the report.
One way is for it to have it pull the data from a datasource for you (SQLServer, Access, Oracle, etc).
The other way is for you to push data into it as a datasource (DataTables, DataSets, Object collections, etc)
I'm not sure how you are using it, but if you have SQL Connections and SQL Data sources in your report template then instead of passing in a dataset you can just alter the report template's Sql connection string at runtime, set your parameters for your datasources and let StimulReports fetch the data for you and register the data for you.
The other approach is to fetch the data yourself in code from your DB and then register that data as a Datasource in the report.
Blank Report?
So I am doing the fetch data with my own datasource. Is there a reason why th eprint page will not display.
Blank Report?
Hi
If possible to send sample report and data to support[at]stimulsoft.com, I think we could help you to find the reason of blank pages asap.
Thank you.
If possible to send sample report and data to support[at]stimulsoft.com, I think we could help you to find the reason of blank pages asap.
Thank you.
Blank Report?
Thanks. I should have phrased that correctly meaning Print Preview does not work. I am using demo if thats the issue. My other question is do I need to have a datasource selected in the IDE for the report or can I programatically state that in my code without the need to create the Datasource.clear() method. I uploaded my test report that I am testing with. I will upload one of my pages with crystal reports in it that I did so that you get an idea of what I am trying to accomplish.
- Attachments
-
[The extension text has been deactivated and can no longer be displayed.]
-
[The extension rpt has been deactivated and can no longer be displayed.]
-
- 343.photoworkorderprint.mrt
- (10.51 KiB) Downloaded 180 times
Blank Report?
Hi
Thank you very much for the samples.
I have sent reply to you by Email.
Thank you very much for the samples.
I have sent reply to you by Email.