PDA

View Full Version : [solved] Little problem with NCReport, New page ?!



QAmazigh
9th June 2009, 17:53
hello
i am using NCReport , everything is ok ! :D
but the problem is that is when i have a lot of records , NCReportPreview run only the first page !!
example , i send a model with 60 records , in preview page i have only 46 (one page) :confused:

i didn't find anything in the NCReport doc that can help , any idea please :o

this is my code :


NCReport *report = new NCReport();
report->reset();
report->setReportFile("ncreport/reports/file.xml");
report->addItemModel( model,"model1");
report->runReportToPreview();
if ( !report->hasError() )
{
NCReportPreviewWindow *pv = new NCReportPreviewWindow();
pv->setOutput( (NCReportPreviewOutput*)report->output() ); // report->output() exists (not deleted) when preview
pv->setWindowModality( Qt::ApplicationModal );
pv->setAttribute( Qt::WA_DeleteOnClose );
pv->show();
}




thanks :)

QAmazigh
9th June 2009, 17:57
i forget :s
when i print the report to a pdf everything become fine , i have all my records with 2 pages in the pdf !!!

QAmazigh
9th June 2009, 18:01
sorry , it happens again !
i solved my problem after posting here :)

sorry !

codeman
10th June 2009, 10:58
How do you use NCreport in your app. It is interessting...


And how do you solve your problem??