Skip to Content

How to configure a Crystal Report in Vinyl

Almost any page in Vinyl can be converted into a Crystal Report. Anytime you want to generate a PDF document that contains data on a page in a Vinyl Application, you can use Crystal Reports.

  1. Create the Vinyl application page with all Business Objects you want to use in the report, follow the same steps you would to create a standard Vinyl Dynamic page
  2. From the application page go to the Action Drawer > Design this page
  3. Click the Edge Case tab from the Page panel
  4. Select Report as the Page Type
  5. Select Crystal Report as the Type
  6. Click Save
  7. Click on the file located next to XML Schema to download it
  8. Open Crystal Reports, create a new blank document
  9. If you aren't prompted to create a data source connection, go to the Database tab and click Database Expert

    Cr 3

  10. From the Database Expert, click Create New Connection > ADO.NET (XML)

  11. Upload the XML file downloaded from your Vinyl Page into the file path field and click Finish
  12. Click the >> button in the Database Expert window to bring your tables into the Selected Tables window
  13. Click OK

    Cr 4

  14. If you have multiple panels on your Vinyl page that require binding, the Links tab will appear in the Database Expert and you must link the tables just as you have your panels linked on your Vinyl Page

    Cr 5

  15. Your fields should now appear on the Database Fields area of the Field Explorer on your Crystal Report

  16. You are now ready to add fields to the Crystal Report
  17. There are different sections on a Crystal Report, and they all have different uses:

    • Report Header - Content appears just at the beginning of the report (ex/ Company Logo)
    • Page Header - Content appears at the beginning of every page
    • Details - The content of your report
    • Report Footer - Content appears at the very end of the report
    • Page Footer - Content appears at the end of every page (ex/ Page number)
  18. Once the report is ready to be tested, save the report. It is recommended to save a new version of the report every time a change is made, so you can go back if you don't like the changes you make

  19. Once the report is saved, go back to your Vinyl page. In the Page Edge Case settings, upload your file in the XML Upload field of the Report Options section
  20. Click Save
  21. Run the page. The expected output is the Crystal Report is returned.

    Cr 6

Important notes and tips

  • If you make any changes to the Vinyl page design, you must save a new XML Schema and update the datasource that is connected to the Crystal Report in the Set Datasource Location section under the Database tab. Upload the XML the same way you did when you initially created your report, and remap all of the tables by clicking on the new version of the table (bottom) and clicking the old table (top), then click the Update button. Then save once all the tables are remapped.
  • If a Control on the Vinyl page is an HTML Control, Crystal reports won't read it as HTML by default. To correct this, right click on the field in Crystal Reports, click Format Field, and then under the Paragraph tab change the text interpretation to HTML.
  • Crystal Reports doesn't support most image formats. If you're adding an image to a Crystal Report, the easiest thing to do is convert all the images to .BMP file type before placing them on a report. Any other image format, no matter the image size, will increase the size of your Crystal Report file significantly and in turn will make your application release package larger than it needs to be.
  • If you are using two Panels on a Page, and either of the Panels is bound to the other, they will not need the Linking option for Databases within Crystal Reports as they are already linked within Vinyl.
  • The Crystal Reports data is using the actual displayed value from the Controls in Vinyl, so if your Control is a List Object you will receive the data from the list and not the UUID used to index the list.
  • You may get an error in Crystal Reports saying there are multiple starting points if the data objects from each Panel are not linked in Crystal Reports, and that this is usually not supported. This is not an issue in Vinyl, and is fully supported in Vinyl.