Rave Report PDF and Intraweb

发布时间 : 星期一 文章Rave Report PDF and Intraweb更新完毕开始阅读

4.4 - Multi User Intraweb PDF reports

And now, lets try the multi user version again:

copy the Intraweb+Rave previous project in a new folder

add the RVData RvDriverDataView and RvDlBDE to the USES clause

replace the previous \

procedure TIWForm1.GenerateAndDisplayClick(Sender: TObject); var l_pdf_file_name: string; l_session_id_segment: String; procedure generate_pdf; begin With RvProject1 do begin ProjectFile:= WebApplication.ApplicationPath + '..\\_data\\r_driver_employee.rav'; Open; with ProjMan.FindRaveComponent('DriverDataView1', nil) As TRaveDriverDataView do Query:= 'SELECT * ' + ' FROM employee' + ' ORDER BY '+ g_sort_column ; end; // with RvProject1 with RvSystem1 do begin DoNativeOutput:= False; RenderObject:= RvRenderPDF1; OutputFileName:= IWServerController.FilesDir + l_session_id_segment+ '\\'+ l_pdf_file_name; end; // with RvSystem1 // -- create the user specific path ForceDirectories(ExtractFileDir(RvSystem1.OutputFileName)); iwLabel1.Caption:= 'not ok'; try RvProject1.ExecuteReport('Report1'); iwLabel1.Caption:= 'ok'; finally RvSystem1.OutputFileName:= ''; iwLabel1.Caption:= iwLabel1.Caption+ ' unlocked'; end; // try/finally end; // generate_pdf procedure display_pdf; var l_pdf_url: String; l_popup_page_name: string; l_popup_page_options: string; l_popup_parameter: String; begin l_pdf_url:= WebApplication.AppURLBase+ '/files/' + l_session_id_segment+ '/'+ l_pdf_file_name; IwLabel2.Caption:= l_pdf_url; l_popup_page_name:= 'the_report'; l_popup_page_options:= 'scrollbars=yes,width=500,height=300'; l_popup_parameter:= 'NewWindow(\ + l_pdf_url + '\\+ l_popup_page_name + '\+ l_popup_page_options + '\; AddToInitProc(l_popup_parameter); end; // display_pdf begin // GenerateAndDisplayClick l_session_id_segment:= WebApplication.AppID; l_pdf_file_name:= 'multi_report_' + g_sort_column+ '_'+ l_session_id_segment+ '.pdf'; generate_pdf; display_pdf; end; // GenerateAndDisplayClick

run, click F9, click \

select the Intraweb Server and \

start another version of your browser (to simulate another user), paste the URL,

and generate some report pages

4.5 - Rave Architecture

Here is a diagram summarizing the properties we used from Rave in our Delphi code:

The organization of the Intraweb components was already presented in our Intraweb Architecture paper.

5 - Intraweb and Rave comments

5.1 - Rave and Intraweb

The commercial presentation is proud to announce the \this is not all that easy. We derived all our knowledge from the Delphi newsgroups. That's where you do appreciate a good newsgroup spider. Just a couple of additions:

Chad Z. HOWER wrote the original DriverDataViews, to allow reports despite the thread safety problems of Rave

? some Rave support messages mentioned that what we presented only works for Standalone Intraweb. Is is untested if we uses a .DLL (Isapi etc)

?

On the documentation side, both are very much alike

?

? ? ?

?

demo programs which are somehow sensitive to the version (if you try to run them with

another Delphi version than the version used for writing the original demo might not compile). Well, that's part of standard Delphi adjustments

the help is quite bizare: in Object Oriented Programs, you have a list of Classes, each

with Properties, Events andMethods. Both helps are not exactly organized along those lines

some of the .PDF manuals are not clearly dated, and it might be difficult to link whatever manual you find on the web with the components you have on your Palette

neither company is very eager to add external links to articles about their product. Maybe there are overflooded with articles. Or perhaps they estimate that our articles are not good enough. Or they do not like the color of our pages ... And the same goes for adding a link to companies offering trainings for their products. Well, we will try again this time, and we will see what happens ! however, both companies are very present in the Delphi newsgroups, trying to help

out Delphi developers stuck with their so-so documentation. So, your best alternative is to post your questions there (and certainly on their own newsgroups, but we did not visit those).

5.2 - Rave Training and Intraweb Training

We are regularily orgainizing Rave Reports Trainings, as well as IntraWeb trainings, anywhere in the world (of interest, of course, if there are several developers). You may contact us at fcolibri@felix-colibri.com for more details.

6 - Download the Sources

Here are the source code files:

? ? ? ? ?

p_01_rave_pdf.zip : the first Rave .PDF project (9 K) p_02_intraweb_rave_pdf.zip : Intraweb and Rave (13 K)

p_03_safe_intraweb_rave_pdf.zip : Intraweb and Rave with per session folder (12 K) p_04_rave_driver_data_view.zip : Rave DriverDataView, with .PDF (7 K) p_05_multi_user.zip : multi user Intraweb site, with Rave .PDF reports (12 K)

The .ZIP file(s) contain:

the main program (.BDSPROJ, .DPR, .DOF, .RES), the main form (.PAS, .DFM), and any other auxiliary form

? any .TXT for parameters, samples, test data ? all units (.PAS) for units

?

联系合同范文客服:xxxxx#qq.com(#替换为@)