Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_professional thread: Crystal Report error on empty datatable


Message #1 by "Sean Marchiafava" <smarch@c...> on Mon, 10 Mar 2003 17:43:28
I have designed a crytal report (9.0) based on a dataset created from an 
xml schema.  I dynamically feed the dataset to the report during 
runtime.  If the datatable of the dataset contains records then the 
report runs fine.  If it is an empty datatable the report crashes.  I 
don't see any onNoData handler or anything in the code behind for the 
report to catch this.  I know I can handle it with the exception handler 
for the view control but this is a subreport and I want the rest of the 
report to still view.  I assume the report is requiring that the fields 
be present in the returned dataset and is failing when they are not there.


Example
This Works fine
<DiagnosticOrders>
    <EKGs>
      <EKG>
        <DateTime>12:00</DateTime>
        <Order>12 Lead</Order>
      <EKG>
    <EKGs>
</DiagnosticOrders>

This crashes
<DiagnosticOrders>
    <EKGs>
    <EKGs>
</DiagnosticOrders>


Thanks,
Sean 

  Return to Index