Excel Report Generator Error
Hello,
I have a test application that uses MS Excel Report toolkit to print the test results using a custom template file. When I try to print the test results I get the following error -2146959355 (see attached picture). Any idea what triggers this? It seems that is generated by Excel Active X control. I also attach the Vi I use to print the test results as well as the templates
Thank You
Nick
Solved!
Go to Solution.
Attachments:
Error -2146959355.jpg 1692 KB
Thales Report generation v2.0.vi 47 KB
EU_Report_template.xlt 40 KB
look at this
http://digital.ni.com/public.nsf/allkb/1C025F018CB5761686256C56007DD258
http://digital.ni.com/public.nsf/allkb/83211E3A088D0C3786256DB700621FE8
Similar Messages
-
Report generation Toolkit: Excel report functions error -2146827284
Hi,
I'm trying to create an automated report using excel functions from the report generation toolkit in labVIEW. When I run the program that generates the report first time round (the report consists of several worksheets, each worksheet is added onto the report at a diffferent state in a state machine) it always works fine and no error is generated. However, when I run the program again it will infrequently (sometimes it does, other times it will not) generate the undefined error -2146827284, this is coming from one of the excel report functions and it cannot find it on highlight execution mode.
Does anyone know anything about this error, why it occurs, how to prevent it?
I would appreciate any help.
Thanks,
Rowanmebels_cti wrote:
Found something that helped; https://forums.ni.com/t5/LabVIEW/Error-code-quot-2146827284-quot-when-trying-to-open-an-Excel/m-p/20...
Excel still open
So I added this;
You should use the Application Quit method instead of killing the task. I doubt this is the cause of your issue.
Ben64 -
Hi,
Does anyone have experienced (and solved) this behaviour?
I've been using the report generation toolkit to build word report without
problem. I've also solved a lot of problems in the excel part of the toolkit
(e.g. building graphs with >20000 points). It finally works in development
environment.
Now when I install the executable (, with the installer) the word reports
still work, but the excel report don't. The executable does run on a
different system, but the excel versions are the same (both Excel 2000).
I have copied the excel library in the data directory of the executable.
The following error is generated:
-2147319784
Old format or invalid type library
Excel_Open.vi
This is the first report generation vi that is called. I us
e it to open a
template.
Any help is appreciated.
Wiebe.Hi,
Surfing the internet, I found this comment:
*Start quote*
Sometimes you'll find that a parameter is required that isn't mentioned
anywhere in the application's documentation. This happens when you need to
specify system information: the chief example of this is the lcid, which is
a locale identifier, and which pops up all over the place in Excel. The good
news is that there is a constant in the Windows unit which provides you with
the correct value, LOCALE_USER_DEFAULT:
var
lcid: integer;
begin
lcid := LOCALE_USER_DEFAULT;
Excel.Visible[lcid] := True;
There's also a function, GetUserDefaultLCID, but using that value can cause
an error, complaining about an 'old format or invalid type library' on some
setups. Using LOCALE_USER_DEFAULT for the
LCID value should fix that.
*End quote*
Could this be the problem?
Regards,
Wiebe.
"Wiebe@AIR" wrote in message
news:3e79a3aa$0$140$[email protected]..
> Hi,
>
> Does anyone have experienced (and solved) this behaviour?
>
> I've been using the report generation toolkit to build word report without
> problem. I've also solved a lot of problems in the excel part of the
toolkit
> (e.g. building graphs with >20000 points). It finally works in development
> environment.
>
> Now when I install the executable (, with the installer) the word reports
> still work, but the excel report don't. The executable does run on a
> different system, but the excel versions are the same (both Excel 2000).
>
> I have copied the excel library in the data directory of the executable.
>
> The following error is generated:
>
> -2147319784
> Old format or invalid type library
> Excel_Open.vi
>
> This is the first report generation vi that is called. I use it to open a
> temp
late.
>
> Any help is appreciated.
>
> Wiebe.
>
> -
I am trying to run the MAX Report Generator but getting this error:
Deploying MAX Generate Report.vi
Failed to download MAX Generate Report.vi
LabVIEW: Failed to load shared library NIReportGenLauncher.*:
GenerateReportANSI:C on RT target device.
help ?!
DOKHi Keith
Try using the following setup:
Thank You
Eric Reid
National Instruments
Motion R&D -
Issue with excel report generated by Crystal Report
Dear support center,
I am trying to evaluate the crystal report package available through the VS2005 Pro edition for an application at work. I am new to Crystal Reports and using CR 10 on my system.
Here is a visual image of my report format. I use a dataset to flood the report.
http://www.coe.uncc.edu/~jjzachar/CRHelp/CrystalReport.JPG
Here is the excel report I receive. I want to eliminate:
http://www.coe.uncc.edu/~jjzachar/CRHelp/excelOutput.JPG
1. The extra blank rows after each "data entered or shown in my report"
2. It seems like many of the fields are being merged. How do I avoid this?
Please help!
Thanks a lot for your time ... in advance!
Sincerely,
Jerry ZachariasSwetha,
I export the report using "VB.net" code. So, I dont' really get any window options.
Here is the snippet of code I am using ...
Private Sub ExportReportFormats(ByVal fileName As String)
'Dim a As New CrystalDecisions.Shared.DiskFileDestinationOptions()
'a.DiskFileName = fileName
Dim CrExportOptions As CrystalDecisions.Shared.ExportOptions
Dim CrDiskFileDestinationOptions As New CrystalDecisions.Shared.DiskFileDestinationOptions()
CrExportOptions = objRpt.ExportOptions
If fileName.EndsWith(".pdf") Then
Dim CrFormatTypeOptions As New CrystalDecisions.Shared.PdfRtfWordFormatOptions()
CrExportOptions.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.PortableDocFormat
CrExportOptions.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile
CrExportOptions.DestinationOptions = CrDiskFileDestinationOptions
CrExportOptions.FormatOptions = CrFormatTypeOptions
'CrDiskFileDestinationOptions.DiskFileName = "C:\Documents and Settings\Robot\Desktop\Trash\" & fileName
'CrDiskFileDestinationOptions.DiskFileName = "C:\Documents and Settings\Robot\Desktop\Reports\" & fileName
CrDiskFileDestinationOptions.DiskFileName = exportFolderLocation & "\" & fileName
ElseIf fileName.EndsWith(".xls") Then
Dim CrFormatTypeOptions As New CrystalDecisions.Shared.ExcelFormatOptions
CrExportOptions.ExportFormatType = CrystalDecisions.Shared.ExportFormatType.Excel
CrExportOptions.ExportDestinationType = CrystalDecisions.Shared.ExportDestinationType.DiskFile
CrExportOptions.DestinationOptions = CrDiskFileDestinationOptions
CrExportOptions.FormatOptions = CrFormatTypeOptions
'CrDiskFileDestinationOptions.DiskFileName = "C:\Documents and Settings\Robot\Desktop\Trash\" & fileName
'CrDiskFileDestinationOptions.DiskFileName = "C:\Documents and Settings\Robot\Desktop\Reports\" & fileName
CrDiskFileDestinationOptions.DiskFileName = exportFolderLocation & "\" & fileName
End If
objRpt.Export()
End Sub -
Report Generator error.
I had a problem running this console application.
I tried to generate report base on template report and input parameters, then to save the results.
I am running this code and get an error:"Invalid object type."
Also I don't sure that the rest of the code is o.k.
Please let me know what I am doing wrong?
Thanks,
Amos
static void Main(string[] args)
string reportTemplate = string.Format(@"{0}INVOICE REPORT.rpt", AppDomain.CurrentDomain.BaseDirectory);
string reportResults = string.Format(@"test.rpt", AppDomain.CurrentDomain.BaseDirectory);
//add parameters here
ListDictionary parameters = new ListDictionary();
parameters.Add("V_BATCH_ID", "2031");
parameters.Add("V_INVOICE_ID", "0");
ReportCrystal report = new ReportCrystal(reportTemplate, reportResults, parameters);
public class ReportCrystal
public ReportCrystal(string reportTemplate, string reportResults, ListDictionary parameters)
ReportDocument reportDocument = new ReportDocument();
ParameterField parameter;
foreach (System.Collections.DictionaryEntry param in parameters)
parameter = new ParameterField();
parameter.Name = (string)param.Key;
parameter.DefaultValues.Add(param.Value);
reportDocument.ParameterFields.Add(parameter);
reportDocument.SetDatabaseLogon("userName", "Password", "serverName", "DB", false);
reportDocument.Load(reportTemplate);
reportDocument.ExportToDisk(ExportFormatType.CrystalReport, reportResults);
Edited by: amos assis on Dec 10, 2008 11:58 AM
I also try to do this:
reportDocument.SetParameterValue((string)param.Key, param.Value);
instead of:
parameter = new ParameterField();
parameter.Name = (string)param.Key;
parameter.DefaultValues.Add(param.Value);
reportDocument.ParameterFields.Add(parameter);
and got exeption ("Database logon failed") at:
reportDocument.ExportToDisk(ExportFormatType.CrystalReport, reportResults);
do I miss something?
AmosHi,
Vital information is missing -
CR Version?
VS Version?
Web or Windows app?
Database?
Database connection - ODBC, OLEDB ?
Also before exporting try to view the report and check the exact error.
Regards,
Amit -
Report generator error -2147023174 / -2147417846
Hi,
I'm experiencing problems with the report generation toolkit when i deploy my executable to a target computer. I have had two different errors so far:
Error -2147023174 occurred at "Property Node (arg 1) in NI_ReportGenerationToolkit.lvlib:Word_borders_shading_(adv).vi->NI_Word.lvclass:Word Format Borders (adv).vi->NI_ReportGenerationToolkit.lvlib:Word Easy Text.vi
Error -2147417846 occurred at "The message filter indicated that the application is busy in NI_Word.lvclass:Word Find & Replace(str.vi
On the development PC everything works ok. The second error was not caused by Word waiting for a dialog.
For debugging purposes I started on a new development PC, installed Labview 2010SP1 and the Report Generation toolkit 2010. I got a strange error, see attachment. Labview solved the conflict, but I'm not sure if this has anything to do with the errors at the target PC.
Any suggestions?
Attachments:
error.png 14 KBMS Office was finally reinstalled at our customers PC, however the problem still remains....
Any other suggestions?
Attachments:
error.png 22 KB -
Pass parameter from report to report generates error
I am new to Portal. Please help me with this one.
I created two reports using report wizard. Report A lists termination infor group by leaving reasons. Report A takes two parameters: p_termination_date_from, p_termination_date_to.
When Report A is returned, user is supposed to be able to click on termination reason and go to report B, which has more detail of who is terminated under that reason. Report B takes three parameters:
p_Leaving_reason,
p_termination_date_from,
p_termination_date_to.
All these three are passed from Report A.
I use link to pass p_leaving_reason, but not able to use link to pass termination dates. So I use "a href= ..." to pass termination dates in Report A. The report is created without error. But when I run it, it gives me the following error:
Error: Unable to perform query (WWV-10202)
ORA-01858: a non-numeric character was found where a numeric was expected (WWV-11230)
Here is my Report A Statement:
===========================================
select a.LEAVING_REASON, a.meaning, count(distinct(a.EMPLOYEE_NUMBER)) people
from tableA a
WHERE
a.ACTUAL_TERMINATION_DATE >= ''||:P_TERMINATION_DATE_FROM||''
AND
a.ACTUAL_TERMINATION_DATE <= '<a
href="report_b?p_arg_names=P_TERMINATION_DATE_TO&p_arg_values='||:P_TERMINATION_DATE_TO||'">'||:P_TERMINATION_DATE_TO||'</a>'
GROUP BY a.LEAVING_REASON, a.MEANING;
And Report B select statement:
================================
Select * from tableB b
where b.termination_date>=:p_termination_date_from
and
b.termination_date<=:p_termination_date_to;
I appreciate your help.Update:
Now I put a to_char in front of a.actual_termination_date, it does not give me that error any more. But it doesn't return any row.
Looks like it ignores the value I put in the parameter form. Please help. thank you.
Here is the updated statement for report A:
==============================================
select a.LEAVING_REASON, a.meaning, count(distinct(a.EMPLOYEE_NUMBER)) people
from tableA a
WHERE
to_char(a.ACTUAL_TERMINATION_DATE, 'dd-mon-yyyy') >= ''||:P_TERMINATION_DATE_FROM||''
AND
to_char(a.ACTUAL_TERMINATION_DATE, 'dd-mon-yyyy') <= '<a
href="report_b?p_arg_names=P_TERMINATION_DATE_TO&p_arg_values='||:P_TERMINATION_DATE_TO||'">'||:P_TERMINATION_DATE_TO||'</a>'
GROUP BY a.LEAVING_REASON, a.MEANING; -
Excel report generation does not exit excel
I am using the excel report generator to save test reports. I can create the report using a template and write to it when needed with no problems. After every test step I add data and save the report. I keep excel closed by using the no change setting for the window state. I do not want the user to see excel or even know it is there.
The issue is when I am done testing and use the dispose report vi, it leaves an instance of excel open that you can see in the task manager. And the only way to close that instance is to open one of the files that was created and close it and then exit excel. The memory used by that instance grows a little each time a new file is created.
Labview 2011 SP1 (11.0.1.F2 32bit)
Excel 2007
How can I close excel completely after each test?
Solved!
Go to Solution.
Attachments:
Report Example.png 52 KBI find it very hard to believe that this function isn't somewhere in the report generation toolkit. But my 30 second look for it came up with nothing. So instead I wrote a function that does a task kill for you. Keep in mind this only works in Windows, and this will do the same thing as a end task in Taskmanager so only use it when you are sure your are done saving all reporting. Saved in 2011.
Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.
Attachments:
Taskkill Excel Report.vi 22 KB -
Getting error 7 when trying to generate an excel report
HI, I'm trying to get the data out of my gyro and send to a report in excel. I've been somewhat successful getting an array to come out in excel with the append to spreadsheet vi and it creates a cvs file, but i would just like a simple to open, not have to reconfigure the file so it can be accessed later by another program. I have the microsoft report generating tool kit but i still get the error 7. I did some research on this already and went to here as suggested on many posts that seemed to fix most peoples problem. This fix did not work for me because i cannot use source control with a FDS version of labview 2010. i am not able to access the page that will let me "alwas include" the folders the vi needs. Is there another fix for the error 7? if there's not, why would they sell the tool kit as an addon if it'll never work?!?
thanksThe toolkit works just fine. Are you actually having the problem with an executable or running in development mode? Of course you would not have access to the always include screen if you are not building an exe.
There is nothing at all related to source control with the problem or the fix with an executable.
And why would you have to reconfigure anything when you save as a csv file unless it is not actually a csv file? -
My Labview Report generator is not working with 2013 excel version
Hi All,
My report generator tool kit which was developpend using labview 2011 was workign with excel 2010...after that i installed 2013 excel and the code is not working..
Do i need to enable some setting to work with excel 2013.
Basically this generator tool will copy the charts from excel and paste in power point...Please let me know.
Thanks,
HareeshAh, I understand now - I had assumed you were using the NI Toolkit.
If you're not using the report generation toolkit, did you write your own VIs for communicating with Office or are you using a different toolkit? If you're using ActiveX to communicate with Office it may be that the ActiveX API has changed for Office 2013 - you will probably need to modify your program for the new calls.
Since it wasn't as obvious as I thought with the report generation toolkit, it would help if you posted some code to try and understand what might be happening. Are you getting any errors in your application when you try to use Office 2013?
Certified LabVIEW Architect, Certified TestStand Developer
NI Days (and A&DF): 2010, 2011, 2013, 2014
NI Week: 2012, 2014
Knowledgeable in all things Giant Tetris and WebSockets -
Revised "Generate Excel Report" Example
I recently answered a question from a Forum user about an error encountered when trying to generate an Excel spreadsheet with the Report Generation Toolkit. I thought that the example code he was using was "unusual" and overly complex, and just discovered that it was, in fact, the LabVIEW 2013 "Generate Report From Template (Excel)" Example.
In the spirit of trying to demonstrate how nice the new(er) "Easy Excel" functions are, I rewrote this Example, and have attached it here. While doing so, I discovered (and have reported to NI) a "bug/feature" of the Excel Insert Graph function. One of its parameters allows you to position the graph by specifying the Left and Top edges (Left would be the Excel Column, Top would be the Excel Row). The only problem is that the parameters are reversed -- to put the graph on Row 1, Column G, you specify (0, 6), not (6, 0). Oops ...
Solved!
Go to Solution.Here is a Snippet, in LabVIEW 2012, of the Excel Demo (the Revised Generate Excel Report Example). If you have LabVIEW 2012 or more recent, you should be able to drag this into a blank Block Diagram and have the VI "magically" created. If you have an earlier version of LabVIEW, you can at least see a picture of all the VIs and wiring here, and can open LabVIEW and "build it yourself". There are no Case statements, so nothing is hidden from view. In case the image is too small, I also attached the PNG file, which you should be able to open with an Image Viewer and potentially print out for yourself.
Attachments:
Excel Demo.png 108 KB -
R12 generate excel report?
Dear all,
I was using 11.5.10 and which supports to generate report in excel file format by using owa.get_page utilities on database 9.2.0.3.
However, I put the same package in new R12 (database 11g) and run the report with error message like owa utilities are not available.
Anyone generates excel report from R12?
Thanks.However, I put the same package in new R12 (database 11g) and run the report with error message like owa utilities are not available.Please post the complete error message.
Anyone generates excel report from R12?Please see old threads -- http://forums.oracle.com/forums/search.jspa?threadID=&q=Excel+AND+Concurrent&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
Thanks,
Hussein -
hi,
can anyone tell me , how to generate a excel report from java. i'm getting data from database using jdbc, with that data i need to create excel report.Hartmut,
Using 1.2.2 Programmatically i want to create a DSN for output excel file.
You gave me this solution in your previous forums.
con = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Excel Driver (*.xls)};" +"DBQ=c:/temp/test2.xls;DriverID=22;READONLY=false","","");
But, This works fine with build 1.3.1_02-b02.
But gives java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name too
long error with build jdk-1.2.2_008.
Any solution would be appreciated.
[email protected] -
Webutil Error when trying to run excel report from Oracle form
I am trying to run an excel report from a oracle from but it throws me following error:
Oracle.forms.webutil.fileTransfer.FileTransfer bean not found. WEBUTIL_FILE_TRANSFER.getmaxtransfer will not work
Can you tell what is this error due to and how to eradicate this.hi
Did you generate .plx?
please check if you did not generate plx and if u did not create db packages please create the webutil user and create db packages.
here is the webutil configurations.
How to get up and running with WebUtil 1.06 included with Oracle Developer Suite 10.1.2.0.2 on a win32 platform
Solution
Assuming a fresh "Complete" install of Oracle Developer Suite 10.1.2.0.2,
here are steps to get a small test form running, using WebUtil 1.06.
Note: [OraHome] is used as an alias for your real oDS ORACLE_HOME.
Feel free to copy this note to a text editor, and do a global find/replace on
[OraHome] with your actual value (no trailing slash). Then it is easy to
copy/paste actual commands to be executed from the note copy.
1) Download http://prdownloads.sourceforge.net/jacob-project/jacob_18.zip
and extract to a temporary staging area. Do not attempt to use 1.7 or 1.9.
2) Copy or move jacob.jar and jacob.dll
[JacobStage] is the folder where you extracted Jacob, and will end in ...\jacob_18
cd [JacobStage]
copy jacob.jar [OraHome]\forms\java\.
copy jacob.dll [OraHome]\forms\webutil\.
The Jacob staging area is no longer needed, and may be deleted.
3) Sign frmwebutil.jar and jacob.jar
Open a DOS command prompt.
Add [OraHome]\jdk\bin to the PATH:
set PATH=[OraHome]\jdk\bin;%PATH%
Sign the files, and check the output for success:
[OraHome]\forms\webutil\sign_webutil [OraHome]\forms\java\frmwebutil.jar
[OraHome]\forms\webutil\sign_webutil [OraHome]\forms\java\jacob.jar
4) If you already have a schema in your RDBMS which contains the WebUtil stored code,
you may skip this step. Otherwise,
Create a schema to hold the WebUtil stored code, and privileges needed to
connect and create a stored package. Schema name "WEBUTIL" is recommended
for no reason other than consistency over the user base.
Open [OraHome]\forms\create_webutil_db.sql in a text editor, and delete or comment
out the EXIT statement, to be able to see whether the objects were created witout
errors.
Start SQL*Plus as SYSTEM, and issue:
CREATE USER webutil IDENTIFIED BY [password]
DEFAULT TABLESPACE users
TEMPORARY TABLESPACE temp;
GRANT CONNECT, CREATE PROCEDURE, CREATE PUBLIC SYNONYM TO webutil;
CONNECT webutil/[password]@[connectstring]
@[OraHome]\forms\create_webutil_db.sql
-- Inspect SQL*Plus output for errors, and then
CREATE PUBLIC SYNONYM webutil_db FOR webutil.webutil_db;
Reconnect as SYSTEM, and issue:
grant execute on webutil_db to public;
5) Modify [OraHome]\forms\server\default.env, and append [OraHome]\jdk\jre\lib\rt.jar
to the CLASSPATH entry.
6) Start the OC4J instance
7) Start Forms Builder and connect to a schema in the RDBMS used in step (4).
Open webutil.pll, do a "Compile ALL" (shift-Control-K), and generate to PLX (Control-T).
It is important to generate the PLX, to avoid the FRM-40039 discussed in
Note 303682.1
If the PLX is not generated, the Webutil.pll library would have to be attached with
full path information to all forms wishing to use WebUtil. This is NOT recommended.
8) Create a new FMB.
Open webutil.olb, and Subclass (not Copy) the Webutil object to the form.
There is no need to Subclass the WebutilConfig object.
Attach the Webutil.pll Library, and remove the path.
Add an ON-LOGON trigger with the code
NULL;
to avoid having to connect to an RDBMS (optional).
Create a new button on a new canvas, with the code
show_webutil_information (TRUE);
in a WHEN-BUTTON-PRESSED trigger.
Compile the FMB to FMX, after doing a Compile-All (Shift-Control-K).
9) Under Edit->Preferences->Runtime in Forms Builder, click on "Reset to Default" if
the "Application Server URL" is empty.
Then append "?config=webutil" at the end, so you end up with a URL of the form
http://server:port/forms/frmservlet?config=webutil
10) Run your form.hope this helps u.
sarah
Maybe you are looking for
-
Probably a stupid question about cropping a video..
OK, so I shot an interview with a black background and once I went to edit it, I noticed a red object in the far right corner. Is there a way I can add black over this object or crop it out? I know this is a stupid question, but I'm new to video and
-
Trap error within loop and process next record
Hi, I am processing each record inside a loop. Now if any exception occurs processing with a single record within loop I want to continue with the next record with proper error message in the log. How to achieve the above scenario? Shall I create a s
-
SQLExec to Remote Citadel db...
I am trying to connect to a remote citadel db to verify that the service is still active. We have been having some problems with the Citadel db shutting down because of very large ALE file. The only thing that I found to monitor this situation is to
-
Characters method in SAX parser
Hi I have a SAX Parser Appln where in I am trying to run it in English Locale But the xml file contains Arabic Characters. The method characters looks like this public void characters(char buf[], int offset, int len) throws SAXException if (recognise
-
AS3 Preloader matching stage.stageWidth (simple)
Hello, Experimenting with Flash as usual. Preloader's are always something that have caused me trouble. Here's what I typically use for a timeline based preloader in AS3: this.addEventListener(Event.ENTER_FRAME, loading); function loading(e:Event):vo