Sie sind auf Seite 1von 12

Test Universe Data Export

Sample: Reporting with Crystal Report


in Visual Studio 2005
OMICRON Test Universe

Manual Version: TU_Data_Export_Crystal.ENU.2 - Year 2006


© OMICRON electronics. All rights reserved.
This manual is a publication of OMICRON electronics GmbH.
All rights including translation reserved. Reproduction of any kind, e.g., photocopying, microfilming, optical
character recognition and/or storage in electronic data processing systems, requires the explicit consent of
OMICRON electronics.
Reprinting, wholly or in part, is not permitted. The product information, specifications, and technical data
embodied in this manual represent the technical status at the time of writing and are subject to change without
prior notice.
We have done our best to ensure that the information given in this manual is useful, accurate, up-to-date and
reliable. However, OMICRON electronics does not assume responsibility for any inaccuracies which may be
present.
The user is responsible for every application that makes use of an OMICRON product.

2
OMICRON Test Universe Reporting with Crystal Report in Visual Studio 2005

Reporting with Crystal Report in Visual Studio 2005

Requirements for running the sample:


 Microsoft .NET Framework version 2.0
 Microsoft Visual Studio 2005:
o Microsoft Visual C# 2005
o Crystal Reports for Visual Studio 2005

Sample description
This sample shows how:
 TU Data can be read easily within the .NET Framework (C#) and
 Custom reports can be created (and designed) within a third party reporting component.

The exported document will contain a State Sequencer with multiple shots used to test an under voltage
relay (between two voltages U1 and U2 that are read from XRIO). The external application reads the
exported result data and shows a report with a graphical representation of the trip time depending on the
voltage.
Sample for exporting Test Data to C# / .NET-coded application software
 We assume an Undervoltage relay with inverse-time tripping characteristic t,trip = f(V) with V <
Vnom (e.g. AREVA PU321 with characteristic set for inverse-time undervoltage tripping)
 Set the max. test voltage Vmax and the min. test voltage Vmin as well as the max. expected trip
time tmax in User Parameters section of Test Object
 Run test: 10 voltage shots evenly spaced between Vmax and Vmin will be generated in State
Sequencer
 Export the Data to XML
 Import in Excel or .NET application
 Get graphical representation tact = f(Vtest) of the tripping curve in the external application

Note:
1. The naming of the parameters may differ, according to the registry settings (e.g. VL1-E).
2. The sample documents can be found in the Test Library.

3
OMICRON Test Universe Reporting with Crystal Report in Visual Studio 2005

Creating the sample

1. Export the data


The sample OCC document XMLSample_Excel_NET.occ can be run with a CMC and the proper relay
connected or in stand-alone fashion without any connected devices (Demo mode). The following
screenshots assume Demo mode, so they do not represent realistic inverse-time values but just the
simulated Demo mode values. Open this file by double-clicking it or by selecting Open Existing Test
Document form the Test Universe Start Page. After running the test, export the data using the file name
XMLSample_Excel.XML.

2. Creating the project


Steps to create the VS2005 Crystal Report project:
1. Open the Visual Studio 2005 and select the File menu and then New and Project.
2. In the New project dialog select the Visual C# Windows from the Project types and Crystal
Reports Application from the Templates. Set the name for the project to XMLSample_NET and
click OK.
3. Then the Crystal Reports Gallery is prompt. Choose to create a new Crystal Report document
Using the Report Wizard. Choose the Standard Expert and click OK.
4. In Standard ReportCreation Wizard dialog from the Avaiable Data Sources click the Create
New Connection and then the ADO.NET item.
5. In ADO.NET dialog use the browse button to select your XML file in the File Path and click
Finish.

4
OMICRON Test Universe Reporting with Crystal Report in Visual Studio 2005

6. In Standard ReportCreation Wizard dialog under the ADO.NET item you have a data source
named TestUniverseExport. Select the TestUniverseExport data source and click the ">>"
button to have it in the Selected Tables. Under the TestUniverseExport you can see the tables
contained in the XML document.

5
OMICRON Test Universe Reporting with Crystal Report in Visual Studio 2005

7. Click Next to see how the tables are linked together.

6
OMICRON Test Universe Reporting with Crystal Report in Visual Studio 2005

8. Click Next to select the fields you want to display in your report. After selecting the fields click
Finish.

7
OMICRON Test Universe Reporting with Crystal Report in Visual Studio 2005

3. Creating the report


A new report document CrystalReport1.rpt is created and opened in the report designer.

Run the sample to see the result: Go to the Debug menu and click Start Without Debugging.

8
OMICRON Test Universe Reporting with Crystal Report in Visual Studio 2005

We need to obtain the amplitude of the voltage only for the Undervoltage state and also to remove the
duplicates generated by the adding of the Tact and MeasNumber column (for each value of the voltage
the whole range of Tact values were added)
All odd states are prefault and all even states are fault states so the values corresponding to the
Undervoltage are the ones having the ProgOrderNumber 2,4,6,…

 Filter the data for the report


To filter the values we need to return to the design mode (by closing the current execution of the program).
1. Filter the Name column after VL1-E - go to the Crystal Reports menu and open the Report and
then click on the Select Expert and add a new select after the Name and click OK.

2. Filter the amplitude of the voltage to display only the fault states. Go to the Crystal Reports
menu and open the Report and then click on the Section Expert.
3. Select the Details from Sections and click the formula button besides Suppress(No Drill-Down).
4. In the Formula Workshop dialog write the following formula:
IIF({AnalOutSignal.ProgOrderNumber} = (2*{Seq_Measurement.MeasNumber}), False, True)
and then click the Save and close button.

9
OMICRON Test Universe Reporting with Crystal Report in Visual Studio 2005

5. Click OK for the Section Expert dialog.


6. Run the sample to see the result: Go to the Debug menu and click Start Without Debugging.

As mentioned above, these screenshots show the randomly generated OCC Demo-mode results.
Testing a real inverse-time relay Tact should result in a gradually decreasing time-over-voltage
characteristic.

10
OMICRON Test Universe Reporting with Crystal Report in Visual Studio 2005

 Modifying the XML Data Source.


Execute the test again e.g. with different relay settings and do the XML data export. Refresh the
application from the Refresh button to see the changed results in the data bound Crystal report.

11
OMICRON Test Universe Reporting with Crystal Report in Visual Studio 2005

Support

When you are working with our products we want to provide you with the greatest
possible benefits. If you need any support, we are here to assist you!

24/7 Technical Support – Get Support


www.omicron.at/support
www.omicronusa.com/support

Offering our customers outstanding support is one of our top priorities. At our
technical support hotline, you can reach well-educated technicians for all of your
questions. Around the clock – competent and free of charge.

Make use of our 24/7 international technical support hotline: +43 59495 4444.

Additionally, you can find our Service Center or Sales Partner closest to you at
www.omicron.at or www.omicronusa.com.

Customer Area – Stay Informed


www.omicron.at/customer
www.omicronusa.com/customer

The customer area on our website is an international knowledge exchange


platform. Download the latest software updates for all products and share your own
experiences in our user forum.

Browse through the knowledge library and find application notes, conference
papers, articles about daily working experiences, user manuals and much more.

OMICRON Academy – Learn More


www.omicron.at/academy
www.omicronusa.com/academy

Learn more about your product in one of the training courses offered by the
OMICRON Academy.

OMICRON electronics GmbH, Oberes Ried 1, 6833 Klaus, Austria, +43 59495

12

Das könnte Ihnen auch gefallen