Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remote views and report problem
Message
From
25/03/2004 05:44:56
 
 
To
24/03/2004 21:45:32
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00889455
Message ID:
00889527
Views:
18
Ok, I've done it - and I must be doing something wrong, 'cause the report does not know which datasession to use. Up comes the 'Open table' dialog.

As far as I can see, the report does not have a DatasessionId, so how does it know which datasession to use?
* Click PrintButton
DO 'Menus\PrintMenu.mpr'
TRY
	DO CASE
		CASE THISFORM.WhatToPrint = 'Pending'
			oCA = CREATEOBJECT('MyCursorAdapter')
			REPORT FORM 'Forms\Report1.frx' PREVIEW

		CASE THISFORM.WhatToPrint = 'All'
                        * More code...
	ENDCASE
	REMOVEPROPERTY(THISFORM,'WhatToPrint')
CATCH TO oException
ENDTRY

* MyCursorAdapter Init
TRY
	WITH THIS
		.ADDPROPERTY('lnSql',SQLCONNECT('SOS'))
		.DATASOURCETYPE = 'ODBC'
		.DATASOURCE=.lnSQL
		.CURSORSCHEMA = SPACE(1)
		.SELECTCMD = 'SELECT * FROM Sys_Sos'
		.Alias = 'InvoicePrint'
		.BufferModeOverride = 5
		.SELECTCMD = 'SELECT * FROM PrintNotInvoiced'
		llReturn = .CURSORFILL(.F.,.F.,0,.lnSql)
	ENDWITH
CATCH TO oException
ENDTRY
>Hi,
>
>Simply open the remote view in a form and call the report. You should avoid including the remote view in Report's data envoironment. The form should have private data session.
>
>Regards,
Peter Pirker


Whosoever shall not fall by the sword or by famine, shall fall by pestilence, so why bother shaving?

(Woody Allen)
Previous
Reply
Map
View

Click here to load this message in the networking platform