There was a problem loading the comments.

Custom Export Formats

Support Portal  »  Knowledgebase  »  Viewing Article

  Print
Did you know you could customize your Crystal Reports exports to Excel (XLS, XLSX) and Text (TXT) formats? Report Runner Batch (and therefore Report Runner Web Portal) allows for setting EXACT export options to match your Crystal Reports export options.

In your JNRRB.INI file, located by default in your shared/public documents folder, Jeff-Net\Report Runner Batch (not Program Files folder), look for the word "custom". By the way, you can easily edit INI files with any text editor like Notepad. For this example, we're going to look at the export options for "Export Excel Custom Option 1":

[Export Excel Custom Option 1]
' D = Detail
'GH = Group Header
'GF = Group Footer
'PH = Page Header
'PF = Page Footer
'RH = Report Header
'RF = Report Footer
' W = Whole Report'
'Set either ColumnWidthBasedOnObjects *OR* ConstantColumnWidthInPoints, but not both; delete whatever you're not using
ColumnWidthBasedOnObjectsInThe=W
ConstantColumnWidthInPoints=0

' N = None
' R = Once per report
' P = On each page
ExportPageHeadersAndPageFooters=R

'Set options below to either 1 or 0; 1=Checked; 0=Not Checked
CreatePageBreaksForEachPage=0
ConvertDateValuesToStrings=0
ShowGridlines=0

'Page Range Default Is ALL'
'Values are either ALL or a numeric range with a dash in-between (ie. 1-5); delete one of the lines below; don't keep both
PageRange=ALL
PageRange=1-5

'If you set ColumnWidthBasedOnObjectsInThe=GH above you must select which group
GH=1

'Optional (1=Checked; 0=Not Checked)
TabHasColumnHeadings=1

See how the settings above match the text and options from this Crystal Reports export window below?



Once you have your custom settings set, you can use them by selecting that custom option in your Report Runner Batch job export format settings. In the above example, you would choose "Excel - Custom #1 (JNRRB.INI)".

You can apply these same techniques for all of the other custom export options. You simply match the Crystal Reports export screen/window selections to the custom options in JNRRB.INI. Pretty simple once you see it, huh?

---

Using In Report Runner Web Portal

Do you use Report Runner Web Portal? If so, it's really simple to use a custom export option and use it in Report Runner Web Portal.

In your main Web Portal folder (C:\inetpub\www\YourWebPortalDirectory) is another folder called ExportFormatOptions. You'll see a couple of files called list.txt and complete - list.txt. List.txt is what populates your end users drop-down list of export options. Complete - List.txt is a full listing of export options that can be used in list.txt. We do not include all export options in list.txt by default, because we believe that many export options could overwhelm and confuse the typical end user who will be running your reports.

If you want to add an export option, though, it's as simple as copying the line from one file to the other. In our example above, we modified the Export Excel Custom Option 1 settings in JNRRB.INI. To make that specific export available to the end user, you would copy this line:

XLSN1|Excel - Custom #1 (JNRRB.INI)|xls

Note, you can modify the description here to be whatever you want. So, if you wanted it to say Excel - Custom A/P Format, you would change it to:

XLSN1|Excel - Custom A/P Format|xls

That's all there is to it!


Share via

Related Articles

© Support @ Jeff-Net