Hello,
In a software, I have developed a small report that will print on two different custom size pages. When printed for the first time it will print on a large size page (8.5 in X 10 in) and when reprinted it will print on a small size page (5.5 in X 7 in).
For this I am trying to set the size of page but cannot set the height. I can only set the width in Report Designer. How to do this?
I am not able to get the Page Footer to print in my custom size page. How to do this?
I have observed that the fields placed in Page Footer are not linking up with the dataset/recordset. I tried an experiment of copying a filed that is place in details section and moved it to the Page Footer and the moment I moved it to Page Footer it started coming blank. Why? Please help.
I have to pint on a pre-printed pages. On this pages the height of the logo is 2.86 inches. How can I say Report Designer to leave a margin of 3 inches and print the header of Report?
The code that I am using is plain simple picked up for the samples that ship with Xojo.
Here is the code:
[code] Dim ps as New PrinterSetup
Dim rpt AS New rptPrescriptions
Dim g As Graphics
Dim sql As String
Dim data As RecordSet
dim ID as Integer
if lst_Prescriptions.ListCount > 0 then
ID =Val(lst_Prescriptions.Cell(lst_Prescriptions.ListIndex, 0))
if ID > 0 then
sql = "SELECT prescription_date AS pDate,prescription_patient_name AS PatName,pd_details AS Med,pd_qty AS Qty,pd_dose As Dose,prescription_instructions AS ExtraInfo, prescription_diagnosis AS Diagnose, prescription_next_date AS NextDate FROM prescription INNER JOIN prescription_details ON prescription.prescription_id = prescription_details.pd_prescription_id WHERE prescription_id = " + Str(ID)
data = App.mDB.SQLSelect(sql)
If App.mDB.Error Then
MsgBox("DB Error: " + App.mDB.ErrorMessage)
Return
End If
If data <> Nil Then
if data.RecordCount > 0 then
win_PrintPreview.ReportPreviewContainer1.ShowReport(rpt, data)
win_PrintPreview.ShowModalWithin(win_ManagePrescription)
Else
MsgBox("There are no Prescription(s) to print")
end If
Else
Beep
MsgBox("No records found to print.")
End If
end If
end if
lst_Prescriptions.SetFocus[/code]
Please help solve these problems.
TIA
Yogi Yang