on 2013 Dec 05 5:20 PM
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.
Request clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
This wiki may be helpful.
- Ludek
User | Count |
---|---|
50 | |
9 | |
8 | |
6 | |
5 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.