A Beginner
Programmer
I want to invoke reporting in crystal report from vfp9.0.
Can any body help?
Can any body help?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Dynamically changing the width of a column means horizontal growth.A Beginner said:I want to resize object's width
#DEFINE crOpenReportByDefault 0
#DEFINE crOpenReportByTempCopy 1
#DEFINE crEFTPortableDocFormat 31
#DEFINE crEDTDiskFile 1
DIMENSION laTbl[2,2]
laTbl[1,1] = "\\EVOD500\Data_F\Apps\Develop\DbfTeck\cus_mai1.dbf"
laTbl[1,2] = "cus_mai1"
laTbl[2,1] = "\\EVOD500\Data_F\Apps\Develop\DbfTeck\fac_hd01.dbf"
laTbl[2,2] = "fac_hd01"
lcRDC = "CrystalRuntime.Application.11"
loCrystalReport = CREATEOBJECT(lcRDC)
tcReport = "C:\temp\report1.RPT"
loRet = loCrystalReport.OpenReport(tcReport, crOpenReportByDefault)
lnTableCount = loRet.Database.Tables.Count
FOR lnMi = 1 TO lnTableCount
lcTable = loRet.Database.Tables(lnMi).Location
lnScan = ASCAN(laTbl, lcTable, 1, ALEN(laTbl,1),2, 1 + 8)
IF lnScan <> 0 THEN
loRet.Database.Tables(lnMi).ConnectionProperties.Item("Data Source").Value = JUSTPATH(laTbl[lnScan, 1]) + "\"
loRet.Database.Tables(lnMi).Location = JUSTSTEM(laTbl[lnScan, 1])
ENDIF && lnScan <> 0
NEXT
loRet.ExportOptions.FormatType = crEFTPortableDocFormat
loRet.ExportOptions.DestinationType = crEDTDiskFile
loRet.ExportOptions.DiskFileName = "C:\temp\report1.PDF"
loRet.Export(.F.)