PDA

View Full Version : ncreport problem



hamidarr
10th July 2011, 14:15
hi everybody i make a report in ncreport in windows 7 and i use QT 4.7 but when i run it from qt i get this error:
C:\Qt\2010.05\qt\Universityfinal-build-desktop\debug\Universityfinal.exe exited with code -1073741515
here is my code:
this is my pro file:

DEFINES += NCREPORT_IMPORT
LIBS += C:\Program Files\NCReport\2.6.1.mingw.eval\bin\ncreport2.dll
INCLUDEPATH += "C:\Program Files\NCReport\2.6.1.mingw.eval\include"
QT += xml sql
TEMPLATE = app
DEFINES += QT_NO_DEBUG_OUTPUT
CONFIG += warn_on \
qt \
thread \
release
and this is my code:


#include <ncreport.h>
#include <ncreportoutput.h>
#include <ncreportpreviewoutput.h>
NCReport *r = new NCReport;
r->reset();
r->clearBatch();
r->setReportFile(QApplication::applicationDirPath()+Q Dir::separator()+"folder.xml");
r->runReportToPreview();

stampede
10th July 2011, 14:19
Run with debugger and check backtrace, this way you'll know where it crashed.

hamidarr
10th July 2011, 18:58
when i click start debuging produce an error and nothing happen can anybody help me?

ChrisW67
11th July 2011, 08:59
The ncreport2.dll file must exist on the PATH of the run time environment or the application will fail to start.

Read http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/8cd14917-c330-40fe-916c-3619a11debac/ for a good description of Windows error messages.

hamidarr
11th July 2011, 11:45
thanks ChrisW67 my problem solve