Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remote views and report problem
Message
De
25/03/2004 05:44:56
 
 
À
24/03/2004 21:45:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00889455
Message ID:
00889527
Vues:
20
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)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform