Skip to content
Home » Blog » Creating non-standard MadCap Flare reports

Creating non-standard MadCap Flare reports

Flare reports are great, no doubt about it. They allow you to find potential issues in your project and fix them faster and more efficiently. You can use them to find broken links, identify unused elements, like images, and identify undefined styles, just to mention a few.

Although you have such a wide variety of reports to pick from, it isn’t possible to cover all the scenarios. Different users look for different things, so sooner or later you’ll need data that isn’t covered by any of the built-in reports. For these cases, we wrote instructions for generating non-standard MadCap flare reports.

Standard MadCap Flare reports

Before we move to the procedure of creating non-standard reports, let’s have a quick look at what we can use out of the box.

Generally, we can divide Flare reports into two types – static and dynamic.

Static reports

Static reporting allows you to create custom reports based on the information contained in your project. These reports can be found in Project Organizer > Reports.

To add a new report, right-click Reports and select Add Report. Choose a predefined template or an empty report and select Add. In the Report Editor window, just select parameters according to your needs and hit Generate.

The report is ready! If you prefer, you can open it in the browser for easier analysis. For more information on static reports, refer to this topic in MadCap Flare documentation

Want to find out more?

Dynamic reports

Dynamic reporting is just a small set of reports in Flare that display information about your project in a separate window. These reports can be found under View > Project Analysis.

After you select a report, the Project Analysis window opens. You can switch between reports using the drop-down menu.

These reports look familiar, don’t they? You’re right, the same reports are available in the static form. So what’s the difference? Content-wise, there’s really no difference between the static and dynamic versions of the reports. The main advantage of the dynamic reports is that they refresh automatically each time you change your project. So you don’t have to regenerate them over and over again. It comes in handy, for example, when you’re fixing broken links one by one, and you want to see instantly whether your fix did the job.

For more information on dynamic reports, refer to this topic in MadCap Flare documentation.

Creating a non-standard MadCap Flare reports

Now, let’s move to the fun part – creating non-standard reports. You can use a combination of Flare features to find the data you need and then export it to a CSV file. You can view your CSV file in MS Excel.

What’s needed?

You need the following “ingredients” to prepare a non-standard report:

  • The Find and Replace in Files window in Flare
  • A good search query
  • MS Excel (or alternative software)

How to do it?

To prepare a non-standard report:

  1. In Flare, go to the Home tab and select Find and Replace in Files.
Find and Replace in Files window button - madcap flare
  1. In the Find and Replace in Files window:
    1. Type in what you want to find.
    2. Choose where you want to find it.
    3. Select the type of search (regular text, wildcards, regular expressions).
    4. Choose to look in the source code.
    5. Select Find All.
Find and Replace in Files window - madcap flare
  1. When the search is complete, go to the Find Results window and select Export results to CSV.
Export results to CSV button - madcap flare
  1. Save the file.
    Now, you have a CSV report that you can process in Excel. You can, for example, format the text as a table and then use filtering to extract the data you need.
Flare CSV file with search results - madcap flare

As you can see, the procedure is quite simple. But the hardest part is to find the right search query and pair it with the proper search parameters.

I don’t want to be the bad news guy, but here you need to dig into the source code a bit to identify strings that will be useful. MadCap Flare reports have their own XML tags for different elements. For example, when you use a variable named “CompanyName”, the following tag is added to the topic source code:

<MadCap:variable name=”Variables.CompanyName” />

If you know what tags Flare uses for specific elements, the search can become a very powerful tool for you. When you add regular expressions to the mix, you’ll become a Flare search master in no time. Of course, it’s going to take some time to learn this stuff, but it’s definitely worth the effort.

Examples of non-standard MadCap flare reports

To give you a head-start, we have two examples of non-standard reports that were useful for us in one of the projects.

Finding specific bookmarks

The standard static reports in Flare allow you to find all the bookmarks that are used and not used in your project. You can browse this report for specific bookmarks, but when you have lots of them, you may find it cumbersome. Also, the report is generated as an HTML file, which, unlike an Excel file, doesn’t offer powerful filtering and search options. In such a situation, you may use a search query based on a regular expression.

If you created your Flare project from a Word file that had a TOC, all the headings that are pointed to in the generated TOC will get a bookmark named _TocXXX, for example _Toc229539249.

To find all the bookmarks of this type in the content, set up the search parameters as follows.

Find in(content folder)
File typesAll Files
Find in source codeSelected
Search typeRegular Expressions

When you set the parameters, hit Find All, select Export results to CSV in the results window, and then save your report.

This report will show you:

  • the places where the _Toc bookmarks were added
  • the places that link to the _Toc bookmarks

If you want to find only places where the bookmarks were added, use <a name=”_Toc[0-9]+”> as the search query.
If you want to find only places that link to the bookmarks, use #_Toc[0-9]+ as the search query.

Finding links to source files

When you choose to link the generated files to the source file while importing a Word document into Flare, a special tag that points to the source document is added in the topics’ source code.

After some time, the source file can go missing, making the links to the source file invalid. In such a case, you may want to find all the places with the invalid links.

To do this, set up the search parameters as follows.

FindMadCap:sourceDocument=”<file path>\<file name>.docx”
For example, MadCap:sourceDocument=”C:\WordDocuments\AwesomeUserGuide.docx”
Find in(whole project)
File typesAll Files
Find in source controlSelected
Search typeRegular Text

When you set the parameters, hit Find All, select Export results to CSV in the results window, and then save your report.

If you’re not sure about the source file path and name, you can:

  • Search only for MadCap:sourceDocument. It’ll give you a list of links to all the source files (more than one file can be linked in the project) but you can do some sorting and filtering in Excel to find the right source file easier.
  • Go to Project Organizer > Imports and look for the import file associated with the source file. If it’s there, open it and get the file path and name.
Import file - madcap flare

Happy reporting!

Check also our other articles, e.g. about Jenkins documentation or company intranet examples.

Please rate this article

0 / 5 5

Your page rank:

Michał Bochenek

Michał Bochenek

Michał is our Krakow office’s Senior Author & Team Lead. When asked what he enjoys about his role, Michał states that he loves planning and implementing various strategies to deliver client projects successfully. Away from his work, Michal likes to spend his free time working on his music blog and YouTube channel, and also has a side hustle as a concert photographer.View Author posts

Home » Blog » Creating non-standard MadCap Flare reports

Want to find out more?