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 » RichText,QTF,RTF... » Documentation / more info
Re: Documentation / more info [message #55017 is a reply to message #55014] Mon, 05 October 2020 06:04 Go to previous messageGo to previous message
jimlef is currently offline  jimlef
Messages: 90
Registered: September 2020
Location: US
Member
Well, I have usable reports printing with my test data, I'll attach a sample pdf here.

Still haven't found a way to override font size though LOL

Jim

void TaxWindow::CreateReport(String start, String end)
{
	if ( sqlTaxReport.GetCount() > 0 )
	{
		double sumTaxable = 0.0, sumNontaxable = 0.0, sumTax = 0.0, sumTotal = 0.0, sumParts = 0.0;
		String headertext;
		int strt, ending;
		
		String s = ::Format(Date( 1970, 1, 1) + StrInt(start));
		String e = ::Format(Date( 1970, 1, 1) + StrInt(end));
		headertext << "Tax Report " << s << " to " << e;
		for ( int i = 0; i < sqlTaxReport.GetCount(); i++ )
		{
			sumTaxable += ( double ) sqlTaxReport.Get ( i, TAXABLESUB );
			sumNontaxable += ( double ) sqlTaxReport.Get ( i, NONTAXABLESUB );
			sumTax += ( double ) sqlTaxReport.Get ( i, TAX );
			sumTotal += ( double ) sqlTaxReport.Get ( i, GRANDTOTAL );
			sumParts += (IsNull(sqlTaxReport.Get ( i, COST ))) ? 0.0 : ( double ) sqlTaxReport.Get ( i, COST );
		}

		if (anon.Get() == 1)
			taxQTF = "{{148:297:96:0:119:118:119:119:119 [C2 :: Totals:: :: :: ";
		else taxQTF = "{{135:270:0:189:108:108:108:108:109 [C2 :: Totals:: :: :: ";
		taxQTF << DblStr(sumTaxable) << ":: " << DblStr(sumNontaxable) << ":: " << DblStr(sumTax) <<
			 ":: " << DblStr(sumParts) <<":: " << DblStr(sumTotal) << "}}";
		Report report;
		report.SetStdFont ( SansSerif( 12 ) ); 
		report.Landscape().Header ( headertext ).Footer ( "Page $$P" );
		report << sqlTaxReport.AsQtf() << taxQTF;

		Perform ( report );
	}
}
  • Attachment: taxreport.pdf
    (Size: 35.25KB, Downloaded 164 times)
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how can i get the image in the RichText?
Next Topic: Report Perform() and printing
Goto Forum:
  


Current Time: Wed May 14 05:11:05 CEST 2025

Total time taken to generate the page: 0.03147 seconds