Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Report package - some changes
Report package - some changes [message #39540] Tue, 26 March 2013 19:00 Go to next message
deep is currently offline  deep
Messages: 263
Registered: July 2011
Location: Bangalore
Experienced Member
Hi,

While using Report for print documents I was struggling to get correct positioning of the printed area on the paper. With present code when Report.Margins(x,x) is 'NULL' then only it is possible to get centered print.

Then I noticed the bool center is set as true in declaration and was not used by functions calling this routine.
void   Print(Report& r, PrinterJob& pd, bool center = true);


I made some changes in the ReportDlg.cpp and Report.h files.

My changes are basically in these functions
void   Print(Report& r, PrinterJob& pd, bool center = true);
bool   DefaultPrint(Report& r, int i, const char *_name = t_("Report"), bool center = true);
bool   Print(Report& r, int i, const char *name = t_("Report"), bool center = true);
bool Print0(Report& r, int i, const char *_name, bool dodlg, bool center);


Also I have added option in report window to select 'centered' printing.

I am attaching my zipped Report folder and also my patch files.

It is working for me. My changes may be useful to somebody.
  • Attachment: ReportPatch.7z
    (Size: 0.64KB, Downloaded 200 times)
  • Attachment: Report.7z
    (Size: 15.98KB, Downloaded 191 times)


Warm Regards

Deepak
Re: Report package - some changes [message #39567 is a reply to message #39540] Sat, 30 March 2013 12:03 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
While I agree that current behaviour is basically wrong and messy, I feel quite uneasy about "inverting" the meaning of "center" argument...

What about simply removing 'center' parameter altogether? Setting margins would mean you do not want to center...
Re: Report package - some changes [message #39572 is a reply to message #39567] Sat, 30 March 2013 12:56 Go to previous message
deep is currently offline  deep
Messages: 263
Registered: July 2011
Location: Bangalore
Experienced Member
Hi Mirek,

mirek wrote on Sat, 30 March 2013 16:33

What about simply removing 'center' parameter altogether? Setting margins would mean you do not want to center...


I think that will be fine.


Warm Regards

Deepak
Previous Topic: Report Setup to get correct Print area and Margins
Next Topic: SortedVectorMap compile error
Goto Forum:
  


Current Time: Thu Mar 28 10:47:28 CET 2024

Total time taken to generate the page: 0.01906 seconds