Click here to Skip to main content
15,908,173 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to keep a static control on top a tabcontrol in a Dialog? Pin
Moak4-May-07 7:59
Moak4-May-07 7:59 
GeneralRe: How to keep a static control on top a tabcontrol in a Dialog? Pin
Chilli714-May-07 8:16
Chilli714-May-07 8:16 
GeneralRe: How to keep a static control on top a tabcontrol in a Dialog? Pin
Moak4-May-07 10:28
Moak4-May-07 10:28 
GeneralRe: How to keep a static control on top a tabcontrol in a Dialog? Pin
Chilli716-May-07 9:12
Chilli716-May-07 9:12 
GeneralRe: How to keep a static control on top a tabcontrol in a Dialog? Pin
Moak6-May-07 12:54
Moak6-May-07 12:54 
GeneralRe: How to keep a static control on top a tabcontrol in a Dialog? Pin
Chilli716-May-07 22:50
Chilli716-May-07 22:50 
AnswerNot showing is better than showing and overpainting... Pin
Chilli717-May-07 22:00
Chilli717-May-07 22:00 
QuestionCrystal report 10 ( Modify database location at runtime using CrystalRuntime.Application.10 ) Pin
AkiraOne4-May-07 0:32
AkiraOne4-May-07 0:32 
Hi All.

With Crystal report 10 I go to generate the report file and through the DLL to runtime I go to modify the logon parameters....
With this code I go to set up the parameters of logon of the report...but there is a problem
when I set password ConnectionProperty has not been set..only password connection property....Mad | :mad:

void CDlgRptConnectionProperty::OnBnClickedOk()
{
	_bstr_t bstParameterName,
			bstParameterValue;
	_variant_t vtValue;
	
	IConnectionPropertyPtr pConnectionProperty = NULL;
	IDatabaseTablesPtr pDatabaseTables = NULL;
	INameValuePairsPtr pNameValuePairs = NULL;
	IDatabasePtr pDatabase = NULL;
	_bstr_t bstConnection;
	HRESULT hr;

	try {
		
		// Puntatore interfaccia tabelle
		pDatabaseTables = m_pReport->GetDatabase()->GetTables();

		// Puntatore parametri di connessione tabella
		IDatabaseTablePtr pDatabaseTable = pDatabaseTables->GetItem(1);
		pNameValuePairs = pDatabaseTable->GetConnectionProperties();

		if( (m_typeRptConnection == ModifyConnectionADO) || (m_typeRptConnection == ModifyConnectionDAO) ) {

			// Ciclo sui parametri del report
			for( int nIndexParam = 0; nIndexParam < m_lstParameterConnection.GetItemCount(); nIndexParam++ ) {

				// Nome e Valore parametro
				bstParameterName = m_lstParameterConnection.GetItemText(nIndexParam,COL_0);
				CString sParameterName(bstParameterName.GetBSTR());
				if( sParameterName.Compare(ADO_PARAMETER_5) != 0 ) {

					// Valore parametro
					bstParameterValue = m_lstParameterConnection.GetItemText(nIndexParam,COL_1);

				}else {

					// Password utente
					bstParameterValue = GetUserPassword(nIndexParam,COL_1);
					
				}

				// Modifica parametro connessione
				IConnectionPropertyPtr pConnectionProperty = pNameValuePairs->GetItem(bstParameterName);
				pConnectionProperty->PutValue(bstParameterValue);
										
			}//:End for parametri report

		}else if( (m_typeRptConnection == ReplaceConnectionADO) || (m_typeRptConnection == ReplaceConnectionDAO) ) {

			// Cancellazione parametri esistenti
			pNameValuePairs->DeleteAll();

			// Nome dll da utilizzare
			_bstr_t bstDllName;
			if( m_typeRptConnection == ReplaceConnectionADO )
				bstDllName = DLL_ADO;
			else if( m_typeRptConnection == ReplaceConnectionDAO )
				bstDllName = DLL_DAO;
			m_pReport->GetDatabase()->GetTables()->GetItem(1)->DllName = bstDllName;
											
			// Ciclo sui parametri
			for( int nIndexParam = 0; nIndexParam < m_lstParameterConnection.GetItemCount(); nIndexParam++ ) {
				
				// Nome e Valore parametro
				bstParameterName = m_lstParameterConnection.GetItemText(nIndexParam,COL_0);
				CString sParameterName(bstParameterName.GetBSTR());
				if( sParameterName.Compare(ADO_PARAMETER_5) != 0) {
					
					// Valore parametro
					bstParameterValue = m_lstParameterConnection.GetItemText(nIndexParam,COL_1);

				}else {

					// Password utente
					bstParameterValue = GetUserPassword(nIndexParam,COL_1);
				}

				// Settaggio parametri
				pNameValuePairs->Add(bstParameterName.GetBSTR(),bstParameterValue.GetBSTR());

			}//:End for parametri

			// Tabelle
			pDatabaseTables = m_pReport->GetDatabase()->GetTables();
			long lTablesCount = pDatabaseTables->GetCount();
			for( long lItem = 1; lItem <= lTablesCount; lItem++ ) {
				
				IDatabaseTablePtr pDatabaseTable = pDatabaseTables->GetItem(lItem);
				_bstr_t bstTableName = pDatabaseTable->GetName();
				pDatabaseTable->PutLocation(bstTableName);

			}// End for tabelle
		}

		// Salvataggio parametri di connessione
		hr = m_pReport->Save(m_bstReportPathFileName);
		
	}catch(_com_error e) {
		
		// Visulizzo l'errore
		theApp.DisplayComError(e,TRUE);

		return;
	}

	OnOK();
}



Any idea...D'Oh! | :doh:





Too many plans make the health badly!!

QuestionHow to clear office clipboard through vc++. Pin
Pankaj Bohra4-May-07 0:03
Pankaj Bohra4-May-07 0:03 
QuestionRe: How to clear office clipboard through vc++. Pin
David Crow4-May-07 2:37
David Crow4-May-07 2:37 
AnswerRe: How to clear office clipboard through vc++. Pin
Pankaj Bohra4-May-07 2:51
Pankaj Bohra4-May-07 2:51 
QuestionRe: How to clear office clipboard through vc++. Pin
David Crow4-May-07 2:54
David Crow4-May-07 2:54 
AnswerRe: How to clear office clipboard through vc++. Pin
Pankaj Bohra4-May-07 3:23
Pankaj Bohra4-May-07 3:23 
QuestionHow to get a pointer to a control embedded in html page in C++ Pin
Paresh Chitte4-May-07 0:01
Paresh Chitte4-May-07 0:01 
QuestionHow to get the result of Jar file into the Visual C++ application Pin
Nikhil Trivedi3-May-07 23:51
Nikhil Trivedi3-May-07 23:51 
QuestionRe: How to get the result of Jar file into the Visual C++ application Pin
David Crow4-May-07 2:43
David Crow4-May-07 2:43 
AnswerRe: How to get the result of Jar file into the Visual C++ application Pin
Nikhil Trivedi4-May-07 20:35
Nikhil Trivedi4-May-07 20:35 
GeneralRe: How to get the result of Jar file into the Visual C++ application Pin
David Crow5-May-07 15:37
David Crow5-May-07 15:37 
Questionpointer Pin
ginjikun3-May-07 22:34
ginjikun3-May-07 22:34 
AnswerRe: pointer [modified] Pin
toxcct3-May-07 23:21
toxcct3-May-07 23:21 
GeneralRe: pointer Pin
Roger Stoltz4-May-07 0:56
Roger Stoltz4-May-07 0:56 
GeneralRe: pointer Pin
toxcct4-May-07 0:58
toxcct4-May-07 0:58 
GeneralRe: pointer Pin
Roger Stoltz4-May-07 1:02
Roger Stoltz4-May-07 1:02 
GeneralRe: pointer Pin
ginjikun4-May-07 3:40
ginjikun4-May-07 3:40 
AnswerRe: pointer Pin
CPallini4-May-07 1:27
mveCPallini4-May-07 1:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.