27.08.2008, 18:05 | #1 |
Участник
|
Ruslan Goncharov: Storing report design in database
Источник: http://rusgon.blogspot.com/2008/08/s...-database.html
============== Today I'd like to say a few words about packDesign()/unpackDesign() methods. As a matter of fact we may store report design just in database. All we need is new container field in table where report design is storing. Following job demonstrates storing technique. When restore is false - we store the design. Else we restore design.static void JobReportDesign(Args _args) { Report report = new Report(); ReportRun reportRun; ReportDesign reportDesign; ReportSection reportSection; ReportTextControl reportTextControl; Table1 Table1;// boolean restore = true; boolean restore = false; BinData binData; void runReport(ReportRun _reportRun) { ReportDesign _reportDesign = _reportRun.report().design(); int sCount = _reportDesign.sectionCount(); int i; ; for(i=1; i if(restore) { select Table1 where Table1.ItemId == '000000000001'; reportRun.unpackDesign(Table1.FieldReportDesign); runReport(reportRun); report.interactive(false); reportRun.run(); return; } // ReStore the report if(!restore) { ttsbegin; select forupdate Table1 where Table1.ItemId == '000000000001'; Table1.FieldReportDesign = reportRun.packDesign(); Table1.update(); ttscommit; } <span class="co1">// Store the report
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|