RE: CRW Class Library + NewEra3.0
Posted in 1997
Hi all >David Bonnici Wrote> >>I wish to pass the selectfilterpart from a NewEra application to the >>Crystal Report Class Library. Not too much of a mission :) > >>If I use the SetSelectionFormula() I have to convert the >>selectfilterpart into a format the report will understand; this is a lot >>of work to do and unfeasable i guess ! >>Is there a way to pass the selectfilterpart DIRECTLY (without >>conversion) to the CRW library ? Try using SetSQLQuery(CHAR(*)) RETURNING BOOLEAN This allows you to send standard SQL to the report engine. Remember also that you cannot modify the select list for the report....so build up a string as follows : ------------------------------------------------------------ VARIABLE SqlStr ixString VARIABLE filter ixString VARIABLE PrintJobObject CRPEJob --Get the selectfilterpart and place it in the ixString Variable LET filter = NEW ixString(GetWindow().SuperTableST.SelectFilterPart.GetValueStr()) --Build up a Select string and add the filterpart string LET SqlStr = NEW ixString( "SELECT * FROM table1" || filter ) --Use setSQLQuery to pass the string to the report engine LET ok = GetWindow().PrintJobObject.SetSQLQuery(SqlStr.GetValueStr()) This will send a new query to the report engine, it will select the same fields but filter them in a different way. Hope that helps PS: Did you have to modify your crpe.h file before it ran? How do you implement your class in the builder (ie: what modules do you create?) Which files do you add and where? I have managed to get the monster to run but would like to know how others have done it. Regards David > > >david@west.co.za >Senior Software Consultant >The West Solutions Group >Friends help you move...REAL friends help you move bodies! >