cancel
Showing results for 
Search instead for 
Did you mean: 

.RPT does not initially load data from ADO.NET XML data source

Former Member
0 Kudos

Using Crystal Reports for Visual Studio (version 13.0.10) from within VS 2013, when I create an .RPT file that uses a database connection to an ADO.NET XML file as a data source, if I Preview the report, I initially see "dummy" data (colors, days of the week, etc.) displayed instead of data from the XML file.

If I then go back to the Main Report tab, select Database Expert and click OK on the dialog box (without making any changes to the data source), then Refresh Report Data in the Preview selecting "Prompt for new parameter values", only then will it load data from the XML file.

My questions are as follows: how can I get it to load data from the XML file from the start?  Am I doing something wrong or is this a bug?  (and if it's a bug, will it be fixed in the next service pack).

In case it helps, I have also attached the XML data file (Test2013.xml)

Thanks in advance for your help!

Accepted Solutions (1)

Accepted Solutions (1)

former_member188030
Active Contributor
0 Kudos

Hi Trevor,

Could you check if you have 'Save data with report' option checked for the report in CR designer inside VS IDE.

The option is at the top of report window when previewing the report.

- Bhushan

Senior Engineer

SAP Active Global Support

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Getting started and moving ahead with Crystal Reports .NET applications.

Former Member
0 Kudos

Thank you for your response.  I did have "Save data in the report" unchecked - and it did work a little better once I checked it per your suggestion.  With this checked, once I got the XML data loaded, it stayed loaded (even if I close and re-open the report).

However, even with "Save data in the report" checked, in order to get the XML data initally loaded, I still have to do what I did before (i.e. go back to the Main Report tab, select Database Expert and click OK on the dialog box and click Refresh Report Data in the Preview selecting "Prompt for new parameter values"). The report still starts off with the "dummy" data (colors, days of the week, etc.) when it is initially created - even when the XML file initially selected as the data source and "Save data in the report" is initially checked.

Is there any way to get the report to start off with the correct data source from the beginning?  And if this is a bug, is this something that would be fixed in a service pack?

Thanks again for your help!

0 Kudos

Hi Trevor,

Makes no sense. How are you creating the new report?

How are you previewing the report, in the VS IDE Report Design and View tab or running your app?

I added a new report to my main test app:

Dropped some of your fields onto the report and hit the Main Report Preview tab and get data:

I then ran my app and I also see data:

Need more info on steps to reproduce.

When you created the Report did you select New Item, Crystal Reports... Database wizard and browse to your XML file? If not do it that way...

Don

Former Member
0 Kudos

Here is how I get the problem - it happens in the Visual Studio 2013 IDE (the report actually shows the correct data from my web app - at run time I pass it a DataTable and that overrides the XML and works fine):

,

1)  From the VS2013 IDE, I added a new Crystal Report item to my VS project

2)  I then selected "Using the Report Wizard" and "Standard" and clicked OK

3)  From the Standard Report Creation Wizard, on the Data tab I selected the XML file (note that the file was already pre-selected from a prior attempt to create a report - orignally from selecting Create New Connection -> ADO.NET (XML)) and then Next

4)  From Fields, I then selected some Fields and then Finish (for this example, I don't need Groupings or Record Selection or Report Style).

5)  I then selected "Main Report Preview" - and I get the "dummy" data (until I go back into the Database Expert and refresh in the Preview).

I hope this gives you some more information to go on.  I'm not exactly sure what you are doing differently (are you not using the "wizard"?)

Anyway, thanks for your help!

Former Member
0 Kudos

FYI, I also tried creating a blank report instead of the wizard.  One time it worked and the XML data came up right away - but I tried it a few more times and I still had the "dummy" data appearing first (until I went into Database Expert and refreshed).

0 Kudos

Hi Trevor,

Thank you for explaining. That is the way it has always worked, that I recall. The viewer built into the VS IDE is the old Embeddable Designer control and ActiveX viewer. IT IS FOR SAMPLING only, it was never intended to show you exactly what you will see when the application is run in either a WEB or Windows Desktop application in RELEASE mode.

So it does not matter what you see in the Preview Tab in the IDE and that it doesn't show actual data unless you try setting/updating the connection info, the real test is running it in Release Mode.

So it appears this is only a problem in the VS IDE Viewer for you. It's how it works, nothing we are going to change...

Thanks again

Don

Former Member
0 Kudos

OK - just wondered what your "official" role is - are you a member of the Crystal Reports for Visual Studio support team (and an SAP/Business Objects employee)?  Thanks.

0 Kudos

Hi Trevor,

Unlike Ludek who always adds his signature I don't, but Yes I am a SAP Employee and work on the SDK team and I have been with Crystal Reports for 17 years now and started in the SDK team and have been supporting it ever since.

I'm the CR for VS Resource person ( semi-Nexus - I work directly with the Developers and handle all ( mostly ) of the escalations and Enhancement requests for this SDK )

Thanks again

Don Williams

Senior Support Engineer

AGS Primary Support

Global Support Center Canada

Former Member
0 Kudos

Thanks for clarifying.  One last question - could we make the the Embeddable Designer and Viewer available in a custom .NET application (web or Windows) to users so that they can develop reports without requiring them to have Visual Studio?

0 Kudos

No, it's not included in any redist package and for use in VS IDE only and will not work by itself.

If they want to design reports they have to purchase CR Designer themselves.

Give Sales a call and they can possibly set you up as a reseller... Something they will have details about.

Thanks again

Don

Answers (0)