Home » U++ Library support » U++ Core » Vector < Report >
Vector < Report > [message #39513] |
Mon, 25 March 2013 11:09 |
|
deep
Messages: 263 Registered: July 2011 Location: Bangalore
|
Experienced Member |
|
|
Hi
Can I have a Vector of Report.
Before performing Print I want to prepare reports and then give choice to user how to print.
"Direct to default printer / Select printer / Print with preview."
I need vector because Header section is different in each.
If I use
Vector < Report > myReports ;
I get following compile error.
C:\DevTools\upp5800\uppsrc\Draw/Draw.h(600) : error C2248: 'Upp::NoCopy::NoCopy' : cannot access private member declared in class 'Upp::NoCopy'
C:\DevTools\upp5800\uppsrc\Core/Defs.h(350) : see declaration of 'Upp::NoCopy::NoCopy'
C:\DevTools\upp5800\uppsrc\Core/Defs.h(348) : see declaration of 'Upp::NoCopy'
This diagnostic occurred in the compiler generated function 'Upp::Draw::Draw(const Upp::Draw &)'
c:\devtools\upp5800\uppsrc\core\Stream.h(285) : error C2248: 'Upp::Stream::Stream' : cannot access private member declared in class 'Upp::Stream'
c:\devtools\upp5800\uppsrc\core\Stream.h(246) : see declaration of 'Upp::Stream::Stream'
c:\devtools\upp5800\uppsrc\core\Stream.h(22) : see declaration of 'Upp::Stream'
This diagnostic occurred in the compiler generated function 'Upp::StringStream::StringStream(const Upp::StringStream &)'
ERPPrint: 1 file(s) built in (0:01.68), 1681 msecs / file, duration = 5211 msecs, parallelization 78%
Report: 3 file(s) built in (0:03.72), 1242 msecs / file, duration = 5648 msecs, parallelization 76%
Warm Regards
Deepak
[Updated on: Mon, 25 March 2013 11:11] Report message to a moderator
|
|
|
|
Re: Vector < Report > [message #39517 is a reply to message #39514] |
Mon, 25 March 2013 12:30 |
|
deep
Messages: 263 Registered: July 2011 Location: Bangalore
|
Experienced Member |
|
|
Hi,
Thank you Zsolt.
It is working with Array < Report >. I used it. And works as expected.
I would like to understand why Vector < Report > is giving error.
I have one more question.
How to remember last chosen printer and send next reports to same printer without invoking the select dialog.
Warm Regards
Deepak
[Updated on: Mon, 25 March 2013 12:31] Report message to a moderator
|
|
|
Re: Vector < Report > [message #39519 is a reply to message #39517] |
Mon, 25 March 2013 14:49 |
|
Hi deep,
deep wrote on Mon, 25 March 2013 12:30 | I would like to understand why Vector < Report > is giving error.
|
Vector has some requirements that its elements must obey. If I remember correctly, it is that it must be moveable and that deep-copy constructor must exist. Report doesn't fulfill that, so it results in compilation error. Array uses different storage, so it is not necessary to meet these stricter conditions, hence it works well. To find out more details, I'd recommend you to read Tutorial about containers, esp. sections 4 and 5.
Best regards,
Honza
|
|
|
|
Goto Forum:
Current Time: Sat May 04 15:15:16 CEST 2024
Total time taken to generate the page: 0.02512 seconds
|