How to troubleshoot "DataMember Not Found" in ActiveReports - activereports

ActiveReports seems like a powerful flexible tool, but if you make a mistake anywhere, you get an exception "data member not found. please check your datasource and datamember properties".
There is no indication as to which datasource/datamember is at fault or what subreport the problem lies in, but Active Reports must know this!
The stack trace is no use, as the error is thrown after the report.run() method is invoked from deep within code generated by Active Reports itself.
Does anybody have a solution other than commenting out one subreport after another and checking all fields in turn?

I was getting the same error while trying to pass a raw dataset to a report as below:
...
Dim rpt as New ActiveReport
With rpt
.DataSource = _data
.Run()
End With
...
I specified a table in the dataset and the error went away.
...
.DataSource = _data.Tables(0)
...
`

Unfortunately I don't know a way to immediately tell which subreport that error is coming from. Indeed, that error message should be improved when you're using subreports. I will report it to the ActiveReports development team.

Related

jBoss Business Central Error Message when Opening Assets

To all
When trying to open an asset (DRL or Legency Test), I receive the message "Unable to complete your request. The following exception occurred: name is empty."
I can't find any hint what this means. My rules import from different projects which all can be accessed.
Does anybody have an idea what this could mean? Thank you very much already in advance.
big hug
Michael
I found out by myself. The external data objects configuration had an empty entry. So be careful when adding an external data object - you are able to add an empty row and Business Central let's you save this ... with the empty row causing the error described.
happy coding
Michael Lutz

the system cannot find the path specified error on Crystal Reports ExportToDisk

I am using Crystal reports in my WPF application to generate reports, getting below error
"the system cannot find the path specified error" on ExportToDisk.
irptDocument = new ReportDocument();
rptDocument.InitReport += new EventHandler(this.OnReportDocInit);
irptDocument.Load(astrReportName);
irptDocument.SetDataSource(adtbResult);
irptDocument.ExportToDisk(ExportFormatType.PortableDocFormat,lstrReportFullName);
Path where to save as pdf is a valid path, still I am getting above error.
This is very common error while we something missing or not set (even for runtime). If you getting error in win7, then also check second link.
While searching answers of your question, someone resolved this error by
I found out the problem; the auto-generated file name seems to have
been too long for the app-server. I changes the name of the class to
PCWS and it worked fine. It's a shame Sun One Studio (which creates
these massive file names doesn't warn you
Please check this links :
https://scn.sap.com/thread/3689925
http://answers.microsoft.com/en-us/windows/forum/windows_7-update/the-system-cannot-find-the-path-specified-error/dae5f759-b053-4a4a-87af-42e79f517631?auth=1

error in jasperserver :Resource interpreted as Script but transferred with MIME

I know this may be duplicate question.
I have this error when I start my community jasperserver, and load a report has custom visualization component , and this error occur.
disappear. when I call:
http://localhost:8080/jasperserver/reportresource/reportresource?resource=com/jaspersoft/jasperreports/customvisualization/resources/require/cv-component.js
nothing returns, so this may be the problem right ?
but when I start the jasperserver commercial version , this error disappear. when I call:
http://localhost:8080/jasperserver-pro/reportresource/reportresource?resource=com/jaspersoft/jasperreports/customvisualization/resources/require/cv-component.js
it returns the content of this cv-component.js.
any idea ?
the trick (which wored for me after hours of triel-and-error) is to set the proper configuration in jasperreports.properties (on an windows machine):
com.jaspersoft.jasperreports.components.customvisualization.require.js=file:/C:/path/to/require.js
net.sf.jasperreports.web.resource.pattern.customvisualization.scripts=com/jaspersoft/jasperreports/customvisualization/resources/require/.*
See the "file:/...." and "...require/.* specially... (a bit different than in teh jaspersoft docs...)
Cheers, Thomas

BIRT report with parameters: Can not load the report query

I'm trying to run a report on Birt web viewer (JBoss) with a parameter and I get the following error:
- Grid (id = 1461):
+ Can not load the report query: 1461. Errors occurred when generating the report document for the report element with ID 1,461. (Element ID:1461)
Reports without parameters are working fine. Reports with parameters are running fine in Eclipse Report Designer.
Could someone give me advice please?
I had same kind a problem (ie. the report was throwing error while tried to fetch from the tomcat web container). To resolve this issue, I have added the database driver in the /WEB-INF/lib folder.
Please try this once and let me know if it works.
I solved my problem opening my report with "preview" instead of "frameset". This shows the real exception.
Might be you have not define id in your report parameter,either in report parameter or data set parameter.
In my case, the datasource for BIRT was not configured correctly. I needed to make sure the JNDI name matched what was in the config for my container.

Why do I get "Database logon failed" in Crystal Reports when using .NET object as datasource?

I am creating a simple report using a .NET object from my project as datasource, using SetDatasource() method. However, when I run the report I get "Database logon failed" error. This report is not connecting to a DB at all - have I missed something here?
Many thanks,
D.
ADDED:
I guess it will probably help if I include the Controller action. It's a quick and dirty test, not what the final method will look like:
public ActionResult StewardSheets(int showId, int groupId)
{
ReportClass rptH = new ReportClass();
rptH.FileName = DataHelper.getReportFilePath("Test.rpt",this);
NZDSDataContext dataContext = new NZDSDataContext();
var showDetails = (from s in dataContext.Shows
where s.ID == showId
select new StewardSheetModel
{
EventDate = s.EventDate.ToLongDateString(),
Region = s.Region.Name,
ShowTitle = s.Name
}).FirstOrDefault();
List<StewardSheetModel> details = new List<StewardSheetModel>();
details.Add(showDetails);
rptH.SetDataSource(details);
rptH.Refresh();
Stream stream = rptH.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
return File(stream, "application/pdf");
}
FIXED:
D'oh! I used ReportClass instead of ReportDocument. Changed that line, and also use Refresh() since Load() is not a valid method. Now it works just fine!
If you are using ADO.NET DataSets as your datasource, it is possible for the DataSet definition to get out of sync with the definition in the report. Selecting the Database->Verify Database option from the report designer's context menu will often fix this problem.
Also, you will get this error if your report has linked tables and you fail to set the datasource for one of the tables. The fix is either to remove the table from the report, or set it's datasource correctly.
For example, if your report has a Customers table and an Orders table linked together on some key you will need to set the datasource for both tables. If you forget and set only one, you will get a "Database logon failure" error which is fairly misleading.
// Create a new customer orders report.
CustomerOrdersReport report = new CustomerOrdersReport();
// Get the report data.
DataTable customersTable = getCustomersData();
DataTable ordersTable = getOrdersData();
// Set datasources.
report.Database.Tables["Customers"].SetDataSource(customersTable);
report.Database.Tables["Orders"].SetDataSource(ordersTable ); // Don't forget this line like I did!!
Please try, Right-Click on Report -> Database-> Verify Database.
If dialog box appears, locate your DataSet .xsd file (e.g DataSet1.xsd) and Apply.
My problem solved in this way.
I started getting the notorious "database logon failed" error on a Windows Server 2016 machine after the July 2018 windows server updates. The report ran fine in Visual Studio 2017 on my dev machine, but not in IIS on Windows Server 2016 in production.
After a day of investigation, I installed the Microsoft OLE DB Driver for SQL Server on my development machine - https://learn.microsoft.com/en-us/sql/connect/oledb/oledb-driver-for-sql-server?view=sql-server-2017. I created a report connection in the Crystal report database expert using the MSOLEDBSQL provider. I had to install the Microsoft OLE DB Driver for SQL Server on the production Windows Server 2016 machine as well.
It turns out Microsoft has decided to deprecate the Microsoft OLE DB Provider for SQL Server. This and the native client no longer seem to work with Crystal Reports.
I was struggling with this error for a couple of days. I have a .NET webforms project which uses CrystalReportViewer to load a Crystal Report. Instead of the report loading, I kept getting "Database logon failed".
I opened the RPT file in Crystal Report Designer and went to Database -> Verify Database
This gave me a more specific error. FINALLY!!!
I tracked down the XSD file, moved it to the right location and BOOM
I started getting this dialog popping up after I changed the name of the .NET object my reports were referring to. To get rid the dialog, I had to ensure that none of my report sections or fields referred to the old name of the .Net object which was easy to spot. The fix for me was using the rename function in the Database Expert for the report.
Fixed by using the appropriate class: ReportDocument instead of ReportClass.
One of the reason of this error is, when u pass null object to a sub report
....SetDataSource(data) , where data is null
I had to do write the below line of code to get rid of the "Database login error"
CrystalDecisions.Shared.TableLogOnInfo li;
li.ConnectionInfo.IntegratedSecurity = false;
Mine did it when I was sending in a DataSet instead of a DataTable.
ReportDocument.SetDataSource(dataset.Tables[0]);
In my case i forget to set datasource to a datatable.
something like this
rpt.Database.Tables("Account").SetDataSource(CType(DataSource.Account, DataTable))
Use native client Connection Version 10.
I hade the same problem and it was due to the fact that I accidentally added anoher DataTable with the same name.
var ds = new OrderDetail();
var dt = new OrderDetail.ResultDataTable();
//fill dataset here
ds.Tables.Add(dt);
After setting that DataSet as datasource I got the login failed error when exporting the report.
I then added a line to remove the DataTable before adding the new DataTable:
ds.Tables.Remove(dt.TableName);