E10 migration issue: BAQReportParameter.Filter1 "This field name is not known"

I’ve got a Crystal Report that appears to have not migrated correctly to E10. When I try to run the report, I get the following error:


Crystal Report Windows Forms Viewer


This field name is not known.

Details: errorKind

Error in File wgsj5rmfta2 3200_5108_{AB3BEBDA-3001-49B4-9BF7-4A636340071B}.rpt:

Error in formula Section_Visibility:

'{BAQReportParameter.Filter1} = ’ ‘’

This field name is not known.

Details: errorKind


OK


It is unclear to me how to fix this issue. I am familiar with setting the datasource location by creating a new XML data source using the XML created by attempting to run the report. But I don’t see this field anyway. This report is being created from a BAQ, and I see the displayed fields from the BAQ under BAQReportResult. But it is unclear to me how to look at what fields are going to BAQReportParameter. From the naming I suspect they are coming from the report screen that the report is run from - for instance, there is a filter tab which sets parameter for the report. But if I look at the field help for the screen, I see things like “EpiBinding = FilterList1”, with “DB Field” being fields from the database. This sort of information does not seem to be in Report Styles or Data Definitions, either.

Where are the fields going into BAQReportParameter coming from and how can I set up a proper binding in Crystal so this error goes away?

This is correct. Make sure the BAQ Report has a filter, and test the report in the BAQ Report maintenance screen. The XML created from that test should have the Filter param in it.

1 Like

I’m still not seeing “Filter1” after doing that. Maybe I’m doing something wrong somewhere, so I’ve created a detailed log of what I did:

I brought up the BAQ Report Designer (is that what you meant? I don’t see “BAQ Report maintenance” anywhere) and bring up the Report Id for the report in question, then under the Actions menu I choose Test Report Form. This brings up the screen for the report, under the Filter tab I make sure there is a filter and the click the “Print Preview” button. (I was previously selecting a filter, too, but I was doing it directly from the report instead of going through BAQ Report Designer). Then in Crystal Reports 2013 I open the report, and on the right side I open up “Database Fields” then right click on “BAQReportParameter” and choose “Set Datasource Location”. I select “BAQReportParameter” in the top half and then in the bottom half under “Replace with” I click “ADO.NET (XML)” and find the path of the last report I just tried to print and click on “Finish”. Then under the newly expanded “ADO.NET (XML)” I select “BAQReportParameter” and click on “Update”.

At this point I am presented with a “Map Fields” window. It still says I am missing “Filter1” (and Company, which is a weird one too but I was hoping if I can figure Filter1 out that one will be easy enough). And in the right pane it shows the fields I can choose from and I still don’t see “Filter1” (or "Company). I do see “Filter2” though, but since it doesn’t show might fields are mapped (nothing shows up under “Mapped Fields” in the bottom half) I don’t know what the difference is.

Anything obvious I am doing wrong here? If not, any suggestions as to the next step I could take to troubleshoot/fix this?

In BAQ Report Designer (sorry about the incorrect name earlier), what field is Filter1 working on?

Also, if you open the XML file generated by testing the form in BAQ Report Designer, does it have a field for Filter1, and is its value what you selected during the test?

Was the filter field re-named?

In the XML file I see Filter2, but not Filter1:

<Filter2>&lt;Part_RefCategory&gt;bat&lt;/Part_RefCategory&gt;&lt;Part_PartNum&gt;&lt;/Part_PartNum&gt;</Filter2>

So it seems to be referencing Part_RefCategory and Part_PartNum. In the report screen under the Filter tab there are two sub-tabs: “Part Type” and “Part Number”. The “Part Type” sub-tab has several columns, one of which is “Reference Category” which I assume corresponds to Part_RefCategory, and under the “Part Number” sub-tab there is a column “Part” showing a part number which I assume corresponds to Part_PartNum. I don’t understand why these are both getting “smushed” into Filter2 though instead of having their own field names, nor why they are combined from two different tabs.

I have been selecting a part type under the first tab only. (If I try to also select a part number under the second I get a different error in the system monitor, “No Records Selected” and I also don’t get an XML file generated.

I’m not sure how to tell what field Filter1 is supposed to be working on.

The report works fine under E9. The E10 report was created automatically during migration. There have been no manual changes to rename anything.

What do you see on the Filters tab in th eBAQ Report Designer?
one filter or two?

Here’s an example of a BAQ Report (happens to be SSRS, not CR), with just one Filter
image

It might be related to the following problem I posted a year or so ago.

Maybe the field that Filter1 was using in E9 is no longer selectable in E10 (just a theory on my part).

I see two filters:

These both correspond to the “Filter2” field.

What does a query of the table BAQRptFilter yield? EDIT: what are the Seq values for those two filters?

BTW - it looks like the filter numbers don’t get re-sequenced if you delete an earlier one. Here’s a shot of query results after removing the 2nd filter of a BAQ Report .

The sequence numbers are 1 (Part_RefCategory) and 2 (Part_PartNum). Do I read this to mean that the first one should be Filter1 and not combined with Part_PartNum?

That would be my guess.

I don’t make many BAQ reports with multiple filters. So how does having entries on different filter tabs work? Is it an AND? Like If you selected just one RefCat, and 20 parts (but only 3 of them with that RefCat), you’d get just the 3. Right?

So how does having entries on different filter tabs work? Is it an AND?

That would be my guess. If I supply either one of the filters I get the error about Filter1 being missing, but if I try to supply them both I get the “No Records Selected” error which sounds like the filter is being too restrictive and not returning anything to report on.

that snippet of XML you posted looks odd. Expanding it out makes it look like:

<Filter2>
	<Part_RefCategory>bat</Part_RefCategory>
	<Part_PartNum></Part_PartNum>
</Filter2>

I would have expected:

<Filter1>
	<Part_RefCategory>bat</Part_RefCategory>
</Filter1>
...
<Filter2>
	<Part_PartNum></Part_PartNum>
</Filter2>

What does the BAQRptFilter table look like?

What happens if you delete the RefCat filter and then add it back in?

How do I delete the RefCat filter and then add it back in? I assume it’s somewhere in the BAQ Report Designer but I am not seeing any way to delete or add rows in the Filters tab.

Ok, I apparently didn’t have something selected properly at first because the “delete” icon was grayed out, but then I got it. For good measure, I deleted both filters and added them back, then saved and went to test the report, but I get the same result and the same “Filter 2” tag as before.

I tried simply deleting the second filter, but this results in a single Filter2 entry:

<Filter2> <Part_RefCategory>bat</Part_RefCategory> </Filter2>

Then I removed the second filter, and while the main Filter2 tag is removed, I still see this separate tag under <xs:element name=“BAQReportParameter”>:

<xs:element name=“Filter2” type=“xs:string” minOccurs=“0” />

The report actually is quite large without any filters (68MB vs. just under 1MB previously) and it still hasn’t opened up in Crystal.

Then I added back the first filter, and got the same missing Filter1 error, with the added parameter still showing up in Filter2. I added back the second filter, and it got put into Filter2 also.

So at this point I’m thinking that somehow I need - at a minimum - to get rid of all the traces of Filter2, but simply deleting the filters isn’t doing it. I will try to recreate the report from scratch and see how that works out.

Well that actually appears to have worked! At least, I don’t get any errors and the report does render. It appears empty, however, and I’m not seeing any XML files get generated in the Report sub-folder for my user account.

When testing the CR version, make sure to select that style on the form test window