Hi All, Can anyone tell me how to get the output in the below format, -------------------------------------------------------------------- -------------------------------------------------------------------- -------------------------------------------------------------------- -------------------------------------------------------------------- the code i have right now is, on Presection trigger of various section type-Body CurrReport.SHOWOUTPUT(FORMAT("Birth Date",0,'<Month Text>')= FORMAT(TODAY,0,'<Month Text>')); IF (FORMAT("Birth Date",0,'<Month Text>')=FORMAT(TODAY,0,'<Month Text>')) THEN x:=x+1;
CurrReport.SHOWOUTPUT(FORMAT("Wedding Date",0,'<Month Text>')=FORMAT(TODAY,0,'<Month Text>')); IF (FORMAT("Wedding Date",0,'<Month Text>') =FORMAT(TODAY,0,'<Month Text>')) THEN x:=x+1;
Best Regards, Hari
Sorry… but i don’t understand what you’re really wanting: CurrReport.SHOWOUTPUT(BOOLEAN) is just used for choosing if printing or not a section of the report, but not for formatting it. Usually what you’re having is two different sections and a couple conditions that will choose if printing one of the other. Example: Section A: Birthday list onpresection CurrReport.SHOWOUTPUT (PrintBirthday); Section B: Wedding Anniversary list onPresection CurrReport.SHOWOUTPUT(PrintAnniversary);// or CurrReport.SHOWOUTPUT(NOT PrintBirthday); and you can define the value of the boolean somewhere on the code ran before printing those sections… something like: PrintBirthday := (DATE2DMY(TODAY,1) = DATEDMY(“Birth date”,1)) AND (DATE2DMY(TODAY,2) = DATEDMY(“Birth date”,2)));
Hi, My apologise for not explaining it clearly.My report will look like with the above code as, Name Designation Birthday Wedding Anniversary XXX XXXXXX xx/xx/xx xx/xx/xx
but i need the report in the form, Name Designation Date XXX XXXXXX xx/xx/xx
Name Designation Date XXX XXXXXX xx/xx/xx
Best regards, Hari
The simplest is to run through the data twice. Once for Birthday, Once for Wedding Anniversary. You can use Temporary Tables to save database I/O’s but that would require significantly more coding and unless your date table is huge, not worth it.