Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Object oAKReport is a cDRReport
- Set psReportName to "ReportAkBon.dr"
- Procedure ChangeODBCDataSource String sReportId
- String sConnectionString sDSN sSubReportId sConnect
- Integer iSubReports iSubReport
- //Connection string
- //DRIVER=SQL Server;SERVER=adm-sql2005;Trusted_Connection=Yes;DATABASE=imb
- Clear BHWEBDR
- Move 'CONNECTIONSTRINGDRREPORT' to BHWEBDR.Z01
- Find eq BHWEBDR by Index.1
- If (Found) Begin
- Move (Trim(BHWEBDR.Z02)) to sConnect
- End
- Clear BHWEBDR
- Set psDatabaseConnection sReportId to sConnect
- Get SubReportCount sReportId to iSubReports
- Decrement iSubReports
- For iSubReport from 0 to iSubReports
- Get SubReportId sReportId iSubReport to sSubReportId
- Send ChangeODBCDataSource sSubReportId
- Loop
- End_Procedure
- Procedure OnPrintReport Handle ByRef hPrintDlg
- Forward Send OnPrintReport (&hPrintDlg)
- End_Procedure
- Procedure OnInitializeReport
- String sReportId
- Forward Send OnInitializeReport
- Get psReportId to sReportId
- Send ChangeODBCDataSource sReportId
- Send setFilters
- End_Procedure
- Procedure setFilters
- String sReportID
- //Here you do the filters (for the moment it's hardcoded to test)
- Send AddFilter of oAKReport sReportID "{BESKO.Z3100A}" C_drEqual '1'
- Send AddFilter of oAKReport sReportID "{BESKO.Z3160}" C_drEqual 'DEQ'
- Send AddFilter of oAKReport sReportID "{BESKO.Z3102}" C_drEqual 208608585
- End_Procedure
- Procedure RefreshReport
- String sReportId
- Get psReportId to sReportId
- If (sReportId <> '') Begin
- Send setFilters
- Forward Send RefreshRePort
- End
- End_Procedure
- End_Object
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement