cancel
Showing results for 
Search instead for 
Did you mean: 

Data from source not being displayed in report

Former Member
0 Kudos
63

Just to make sure that the dataset contains something I write it to an XML file just before the end if. When the report displays it's empty. (I'm not sure why but this editor decided that when I pasted in the code it needed to turn it all into a table so I'm not wrapping it in a code block.)

dbCmd.CommandText = "SP_WatchCalendar"
dbCmd.CommandType = CommandType.StoredProcedure
Try
dbCmd.Parameters.Add(New OracleParameter("vtext", OracleDbType.Long, ParameterDirection.Input)).Value = Trim(Replace(Session("drweekday"), "'", "''"))
dbCmd.Parameters.Add(New OracleParameter("vtext", OracleDbType.Int32, ParameterDirection.Input)).Value = Session("drLocid")
dbCmd.Parameters.Add(New OracleParameter("v_out", OracleDbType.RefCursor, ParameterDirection.Output))
dbCmd.ExecuteNonQuery()
Dim da As New OracleDataAdapter(dbCmd)

da.Fill(dsDutyRoster)

If Not dsDutyRoster.Tables(0).Rows.Count = 0 Then
dutyRosterRpt.Load(dutyRosterCR)
dutyRosterRpt.SetDataSource(dsDutyRoster)
dsDutyRoster.WriteXml(xmlPath + "\dsDutyRoster.xml", XmlWriteMode.WriteSchema)
End If
mySection = dutyRosterRpt.ReportDefinition.Sections("Section1")
myText = mySection.ReportObjects.Item("txtDutyWeek")
myText.Text = Session("drweekday")

The dataset is created from a stored procedure and being attached to a Visual Studio datasource that was created using a view.

(Visual Studio 10 and the associated Crystal reporting facility. The database is Oracle with 11g drivers on the client side.)

I have a number of other reports that I've recently developed that run fine, but I'm using actual views.

The object process is clearly filing the dataset as the output XML contains the data that I expected to see in the report. It's just not being displayed.

Any input would be appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Chris,

Try creating a new report off the XML file using the ADO.NET ( XML ) driver. Does that show data?

If it doesn't possible the XML schema layout is wrong.

Create a new report off the View in CR Designer and then export to XML.

Compare the XML formats.

Don

Former Member
0 Kudos

I'm closer I suppose, since I discovered that the procedure was not returning the proper column names and was missing a column, but the data is still not populating the report after fixing those issues. I get the various headers and the XML file has the proper data.

Can you provided a link on the ADO.NET driver usage?

Thanks

Chris

0 Kudos

No link, it's done all within Crystal Report Designer. Just export to XML format.

Don

former_member183750
Active Contributor
0 Kudos

This wiki may be helpful.

- Ludek

Answers (0)