Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
3
Erster Beitrag:
vor 8 Jahren, 6 Monaten
Letzter Beitrag:
vor 8 Jahren, 6 Monaten
Beteiligte Autoren:
Tomas, Glenn Rathke

WD!14 :QBE on files

Startbeitrag von Tomas am 26.10.2009 12:45

Hi Guys !

Back in my mind I remember having seen an example where a pop-up similar to the one used under WDMAP to set selection criteria (QBE parameters) to extract data from HF files - can anyone point me to that source ?

Cheers,
Tomas

Antworten:

Tomas,

I don't have the popup example but here is what I do, either using parameters/queries or hfilter.

Here is an example using the parameter queries in the initiailization of the table control:
IF EDT_CKC_FILE..Value > "" THEN
EDT_CKC_FILE..Value = Add_Search_Hyphen(EDT_CKC_FILE)
MySource.Param_CKC_File = EDT_CKC_FILE
END

IF EDT_SSN..Value > "" THEN
MySource.Param_MSSN = EDT_SSN
END

IF EDT_LAST..Value > "" THEN
MySource.Param_MLast = EDT_LAST
END

IF EDT_ACT_DATE..Value > "" THEN
MySource.Param_Acc_Dt = EDT_ACT_DATE
END

IF CBOX_Pending THEN
MySource.Param_Status_Code = "C"
END


And this is an hfilter example, again in the initialization of a table:

......
......
......

IF NoSpace(RR_Dept_Area) > "" THEN
sWHEREStatement += " And Dept_Area Like " + gsQuote + "%" + RR_Dept_Area + "%" + gsQuote
END

IF RR_Open THEN
sWHEREStatement += " And Completion_Date Is Null"
END

IF RR_Approved THEN
sWHEREStatement += " And Approved = 1"
END

IF RR_Completed THEN
sWHEREStatement += " And Completion_Date is Not Null"
END

IF NoSpace(RR_Action_Type) > "" THEN
sWHEREStatement += " AND Action_Type LIKE " + gsQuote + "%" + RR_Action_Type + "%" + gsQuote
END


// Disable the previous filters
HDeactivateFilter(gsFileName)

// Enable the new filter
IF sWHEREStatement"" THEN
sWHEREStatement = Replace(sWHEREStatement, "'", "''") // Replace single quotes with 2 single quotes
sWHEREStatement = Replace(sWHEREStatement, gsQuote, "'")
gsSearchKey = HFilter(gsFileName,sWHEREStatement)
END

TableSelect(MySelf,-1)

von Glenn Rathke - am 26.10.2009 15:57
Hi Glenn !

Thank you for your feedback ! I will look into your code snippet, which may be useful for my app.

By now, however, I´ve found what I was looking for in the first LST issue I received : one of the examples supplied is WD7 Viewer, which is essentially the same as WDMAP, but available to be integrated into one´s app.
It has a very flexibly conceived parameter setting table (just as in WDMAP), which is what I need to adapt for my use. The example is very elaborate & complete.

Has anyone else had any good use for it ?

Cheers,
Tomas

von Tomas - am 27.10.2009 18:31
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.