ORIGINAL CODE:
If Print1
If !Empty(Thisform.WYEAR1.Value)
hdrDATEPRINT = "For Years "+Alltrim(Thisform.WYEAR1.Value)+" Through "+Alltrim(Thisform.WYEAR2.Value)
Report Form ACTUARY_STUDY_DATA For Year(Central.OCCUR_DATE) => Int(Val(Thisform.WYEAR1.Value)) And Year(Central.OCCUR_DATE) <= Int(Val(Thisform.WYEAR2.Value)) To Printer Prompt Noconsole
Else
Report Form ACTUARY_STUDY_DATA To Printer Prompt Noconsole
Endif
Else
If !Empty(Thisform.WYEAR1.Value)
hdrDATEPRINT = "For Years "+Alltrim(Thisform.WYEAR1.Value)+" Through "+Alltrim(Thisform.WYEAR2.Value)
Report Form ACTUARY_STUDY_DATA For Year(Central.OCCUR_DATE) => Int(Val(Thisform.WYEAR1.Value)) And Year(Central.OCCUR_DATE) <= Int(Val(Thisform.WYEAR2.Value)) Preview Noconsole
Else
Report Form ACTUARY_STUDY_DATA Preview Noconsole
Endif
Endif
ADAPTED CODE:
If wlLAN()
If Print1
If !Empty(Thisform.WYEAR1.Value)
hdrDATEPRINT = "For Years "+Alltrim(Thisform.WYEAR1.Value)+" Through "+Alltrim(Thisform.WYEAR2.Value)
Report Form ACTUARY_STUDY_DATA For Year(Central.OCCUR_DATE) => Int(Val(Thisform.WYEAR1.Value)) And Year(Central.OCCUR_DATE) <= Int(Val(Thisform.WYEAR2.Value)) To Printer Prompt Noconsole
Else
Report Form ACTUARY_STUDY_DATA To Printer Prompt Noconsole
Endif
Else
If !Empty(Thisform.WYEAR1.Value)
hdrDATEPRINT = "For Years "+Alltrim(Thisform.WYEAR1.Value)+" Through "+Alltrim(Thisform.WYEAR2.Value)
Report Form ACTUARY_STUDY_DATA For Year(Central.OCCUR_DATE) => Int(Val(Thisform.WYEAR1.Value)) And Year(Central.OCCUR_DATE) <= Int(Val(Thisform.WYEAR2.Value)) Preview Noconsole
Else
Report Form ACTUARY_STUDY_DATA Preview Noconsole
Endif
Endif
Else
Local lcFileOut, success, result
lcFileOut = Addbs(Sys(2023)) + 'someFile.pdf'
Report Form ACTUARY_STUDY_DATA Object Type 10 To File (m.lcFileOut)
success = Thisform.wFileSaveAs(m.lcFileOut, @m.result)
If !m.success
Thisform.wMessageBox(m.result)
Endif
Endif
Your Journey is Your Destination
Your adapted code works for PDF generation using foxyPreviewer;
However XFRX is the only PDf generation package we've successfully experienced in COM mode, preferred in production.
foxyPreviewer does work in development mode, but not in production mode; we've dropped a post about this in foxyPreviewer support forum, got no answer so far.
Here is a working demo: http://foxincloud.com/tutotest/report.tuto
Full code for this form: http://foxincloud.com/tutotest/report_scx.tuto
OK. I have down loaded the adaptation assistant and ran my project through it. I have 428 manual adaptations most from print previews. I would like to see if I am doing the adaptation correctly. Here is an example.
ORIGINAL CODE:
If Print1
If !Empty(Thisform.WYEAR1.Value)
hdrDATEPRINT = "For Years "+Alltrim(Thisform.WYEAR1.Value)+" Through "+Alltrim(Thisform.WYEAR2.Value)
Report Form ACTUARY_STUDY_DATA For Year(Central.OCCUR_DATE) => Int(Val(Thisform.WYEAR1.Value)) And Year(Central.OCCUR_DATE) <= Int(Val(Thisform.WYEAR2.Value)) To Printer Prompt Noconsole
Else
Report Form ACTUARY_STUDY_DATA To Printer Prompt Noconsole
Endif
Else
If !Empty(Thisform.WYEAR1.Value)
hdrDATEPRINT = "For Years "+Alltrim(Thisform.WYEAR1.Value)+" Through "+Alltrim(Thisform.WYEAR2.Value)
Report Form ACTUARY_STUDY_DATA For Year(Central.OCCUR_DATE) => Int(Val(Thisform.WYEAR1.Value)) And Year(Central.OCCUR_DATE) <= Int(Val(Thisform.WYEAR2.Value)) Preview Noconsole
Else
Report Form ACTUARY_STUDY_DATA Preview Noconsole
Endif
Endif
ADAPTED CODE:
If wlLAN()
If Print1
If !Empty(Thisform.WYEAR1.Value)
hdrDATEPRINT = "For Years "+Alltrim(Thisform.WYEAR1.Value)+" Through "+Alltrim(Thisform.WYEAR2.Value)
Report Form ACTUARY_STUDY_DATA For Year(Central.OCCUR_DATE) => Int(Val(Thisform.WYEAR1.Value)) And Year(Central.OCCUR_DATE) <= Int(Val(Thisform.WYEAR2.Value)) To Printer Prompt Noconsole
Else
Report Form ACTUARY_STUDY_DATA To Printer Prompt Noconsole
Endif
Else
If !Empty(Thisform.WYEAR1.Value)
hdrDATEPRINT = "For Years "+Alltrim(Thisform.WYEAR1.Value)+" Through "+Alltrim(Thisform.WYEAR2.Value)
Report Form ACTUARY_STUDY_DATA For Year(Central.OCCUR_DATE) => Int(Val(Thisform.WYEAR1.Value)) And Year(Central.OCCUR_DATE) <= Int(Val(Thisform.WYEAR2.Value)) Preview Noconsole
Else
Report Form ACTUARY_STUDY_DATA Preview Noconsole
Endif
Endif
Else
Local lcFileOut, success, result
lcFileOut = Addbs(Sys(2023)) + 'someFile.pdf'
Report Form ACTUARY_STUDY_DATA Object Type 10 To File (m.lcFileOut)
success = Thisform.wFileSaveAs(m.lcFileOut, @m.result)
If !m.success
Thisform.wMessageBox(m.result)
Endif
Endif
-- thn (FoxInCloud)
Is there sample code somewhere on how to use XFRX? Something that tells me everything I need to do.
Thanks,
Gary
Hi,
Your adapted code works for PDF generation using foxyPreviewer;
However XFRX is the only PDf generation package we've successfully experienced in COM mode, preferred in production.
foxyPreviewer does work in development mode, but not in production mode; we've dropped a post about this in foxyPreviewer support forum, got no answer so far.
Here is a working demo: http://foxincloud.com/tutotest/report.tuto
Full code for this form: http://foxincloud.com/tutotest/report_scx.tuto
OK. I have down loaded the adaptation assistant and ran my project through it. I have 428 manual adaptations most from print previews. I would like to see if I am doing the adaptation correctly. Here is an example.
ORIGINAL CODE:
If Print1
If !Empty(Thisform.WYEAR1.Value)
hdrDATEPRINT = "For Years "+Alltrim(Thisform.WYEAR1.Value)+" Through "+Alltrim(Thisform.WYEAR2.Value)
Report Form ACTUARY_STUDY_DATA For Year(Central.OCCUR_DATE) => Int(Val(Thisform.WYEAR1.Value)) And Year(Central.OCCUR_DATE) <= Int(Val(Thisform.WYEAR2.Value)) To Printer Prompt Noconsole
Else
Report Form ACTUARY_STUDY_DATA To Printer Prompt Noconsole
Endif
Else
If !Empty(Thisform.WYEAR1.Value)
hdrDATEPRINT = "For Years "+Alltrim(Thisform.WYEAR1.Value)+" Through "+Alltrim(Thisform.WYEAR2.Value)
Report Form ACTUARY_STUDY_DATA For Year(Central.OCCUR_DATE) => Int(Val(Thisform.WYEAR1.Value)) And Year(Central.OCCUR_DATE) <= Int(Val(Thisform.WYEAR2.Value)) Preview Noconsole
Else
Report Form ACTUARY_STUDY_DATA Preview Noconsole
Endif
Endif
ADAPTED CODE:
If wlLAN()
If Print1
If !Empty(Thisform.WYEAR1.Value)
hdrDATEPRINT = "For Years "+Alltrim(Thisform.WYEAR1.Value)+" Through "+Alltrim(Thisform.WYEAR2.Value)
Report Form ACTUARY_STUDY_DATA For Year(Central.OCCUR_DATE) => Int(Val(Thisform.WYEAR1.Value)) And Year(Central.OCCUR_DATE) <= Int(Val(Thisform.WYEAR2.Value)) To Printer Prompt Noconsole
Else
Report Form ACTUARY_STUDY_DATA To Printer Prompt Noconsole
Endif
Else
If !Empty(Thisform.WYEAR1.Value)
hdrDATEPRINT = "For Years "+Alltrim(Thisform.WYEAR1.Value)+" Through "+Alltrim(Thisform.WYEAR2.Value)
Report Form ACTUARY_STUDY_DATA For Year(Central.OCCUR_DATE) => Int(Val(Thisform.WYEAR1.Value)) And Year(Central.OCCUR_DATE) <= Int(Val(Thisform.WYEAR2.Value)) Preview Noconsole
Else
Report Form ACTUARY_STUDY_DATA Preview Noconsole
Endif
Endif
Else
Local lcFileOut, success, result
lcFileOut = Addbs(Sys(2023)) + 'someFile.pdf'
Report Form ACTUARY_STUDY_DATA Object Type 10 To File (m.lcFileOut)
success = Thisform.wFileSaveAs(m.lcFileOut, @m.result)
If !m.success
Thisform.wMessageBox(m.result)
Endif
Endif
Your Journey is Your Destination
Full code for this form: http://foxincloud.com/tutotest/report_scx.tuto > procedure cmdprint.Click
Thierry,
Is there sample code somewhere on how to use XFRX? Something that tells me everything I need to do.
Thanks,
Gary
Hi,
Your adapted code works for PDF generation using foxyPreviewer;
However XFRX is the only PDf generation package we've successfully experienced in COM mode, preferred in production.
foxyPreviewer does work in development mode, but not in production mode; we've dropped a post about this in foxyPreviewer support forum, got no answer so far.
Here is a working demo: http://foxincloud.com/tutotest/report.tuto
Full code for this form: http://foxincloud.com/tutotest/report_scx.tuto
OK. I have down loaded the adaptation assistant and ran my project through it. I have 428 manual adaptations most from print previews. I would like to see if I am doing the adaptation correctly. Here is an example.
ORIGINAL CODE:
If Print1
If !Empty(Thisform.WYEAR1.Value)
hdrDATEPRINT = "For Years "+Alltrim(Thisform.WYEAR1.Value)+" Through "+Alltrim(Thisform.WYEAR2.Value)
Report Form ACTUARY_STUDY_DATA For Year(Central.OCCUR_DATE) => Int(Val(Thisform.WYEAR1.Value)) And Year(Central.OCCUR_DATE) <= Int(Val(Thisform.WYEAR2.Value)) To Printer Prompt Noconsole
Else
Report Form ACTUARY_STUDY_DATA To Printer Prompt Noconsole
Endif
Else
If !Empty(Thisform.WYEAR1.Value)
hdrDATEPRINT = "For Years "+Alltrim(Thisform.WYEAR1.Value)+" Through "+Alltrim(Thisform.WYEAR2.Value)
Report Form ACTUARY_STUDY_DATA For Year(Central.OCCUR_DATE) => Int(Val(Thisform.WYEAR1.Value)) And Year(Central.OCCUR_DATE) <= Int(Val(Thisform.WYEAR2.Value)) Preview Noconsole
Else
Report Form ACTUARY_STUDY_DATA Preview Noconsole
Endif
Endif
ADAPTED CODE:
If wlLAN()
If Print1
If !Empty(Thisform.WYEAR1.Value)
hdrDATEPRINT = "For Years "+Alltrim(Thisform.WYEAR1.Value)+" Through "+Alltrim(Thisform.WYEAR2.Value)
Report Form ACTUARY_STUDY_DATA For Year(Central.OCCUR_DATE) => Int(Val(Thisform.WYEAR1.Value)) And Year(Central.OCCUR_DATE) <= Int(Val(Thisform.WYEAR2.Value)) To Printer Prompt Noconsole
Else
Report Form ACTUARY_STUDY_DATA To Printer Prompt Noconsole
Endif
Else
If !Empty(Thisform.WYEAR1.Value)
hdrDATEPRINT = "For Years "+Alltrim(Thisform.WYEAR1.Value)+" Through "+Alltrim(Thisform.WYEAR2.Value)
Report Form ACTUARY_STUDY_DATA For Year(Central.OCCUR_DATE) => Int(Val(Thisform.WYEAR1.Value)) And Year(Central.OCCUR_DATE) <= Int(Val(Thisform.WYEAR2.Value)) Preview Noconsole
Else
Report Form ACTUARY_STUDY_DATA Preview Noconsole
Endif
Endif
Else
Local lcFileOut, success, result
lcFileOut = Addbs(Sys(2023)) + 'someFile.pdf'
Report Form ACTUARY_STUDY_DATA Object Type 10 To File (m.lcFileOut)
success = Thisform.wFileSaveAs(m.lcFileOut, @m.result)
If !m.success
Thisform.wMessageBox(m.result)
Endif
Endif
-- thn (FoxInCloud)
Gary,
Technically any way you can generate a PDF would be sufficient. But the generation has to work in COM mode and not require a UI. We use XFRX, and it is an excellent product, but you have to purchase that. There are several PDF printer drivers you could try. As long as they produce the PDF you are fine.
Thierry,
Is there sample code somewhere on how to use XFRX? Something that tells me everything I need to do.
Thanks,
Gary
Hi,
Your adapted code works for PDF generation using foxyPreviewer;
However XFRX is the only PDf generation package we've successfully experienced in COM mode, preferred in production.
foxyPreviewer does work in development mode, but not in production mode; we've dropped a post about this in foxyPreviewer support forum, got no answer so far.
Here is a working demo: http://foxincloud.com/tutotest/report.tuto
Full code for this form: http://foxincloud.com/tutotest/report_scx.tuto
OK. I have down loaded the adaptation assistant and ran my project through it. I have 428 manual adaptations most from print previews. I would like to see if I am doing the adaptation correctly. Here is an example.
ORIGINAL CODE:
If Print1
If !Empty(Thisform.WYEAR1.Value)
hdrDATEPRINT = "For Years "+Alltrim(Thisform.WYEAR1.Value)+" Through "+Alltrim(Thisform.WYEAR2.Value)
Report Form ACTUARY_STUDY_DATA For Year(Central.OCCUR_DATE) => Int(Val(Thisform.WYEAR1.Value)) And Year(Central.OCCUR_DATE) <= Int(Val(Thisform.WYEAR2.Value)) To Printer Prompt Noconsole
Else
Report Form ACTUARY_STUDY_DATA To Printer Prompt Noconsole
Endif
Else
If !Empty(Thisform.WYEAR1.Value)
hdrDATEPRINT = "For Years "+Alltrim(Thisform.WYEAR1.Value)+" Through "+Alltrim(Thisform.WYEAR2.Value)
Report Form ACTUARY_STUDY_DATA For Year(Central.OCCUR_DATE) => Int(Val(Thisform.WYEAR1.Value)) And Year(Central.OCCUR_DATE) <= Int(Val(Thisform.WYEAR2.Value)) Preview Noconsole
Else
Report Form ACTUARY_STUDY_DATA Preview Noconsole
Endif
Endif
ADAPTED CODE:
If wlLAN()
If Print1
If !Empty(Thisform.WYEAR1.Value)
hdrDATEPRINT = "For Years "+Alltrim(Thisform.WYEAR1.Value)+" Through "+Alltrim(Thisform.WYEAR2.Value)
Report Form ACTUARY_STUDY_DATA For Year(Central.OCCUR_DATE) => Int(Val(Thisform.WYEAR1.Value)) And Year(Central.OCCUR_DATE) <= Int(Val(Thisform.WYEAR2.Value)) To Printer Prompt Noconsole
Else
Report Form ACTUARY_STUDY_DATA To Printer Prompt Noconsole
Endif
Else
If !Empty(Thisform.WYEAR1.Value)
hdrDATEPRINT = "For Years "+Alltrim(Thisform.WYEAR1.Value)+" Through "+Alltrim(Thisform.WYEAR2.Value)
Report Form ACTUARY_STUDY_DATA For Year(Central.OCCUR_DATE) => Int(Val(Thisform.WYEAR1.Value)) And Year(Central.OCCUR_DATE) <= Int(Val(Thisform.WYEAR2.Value)) Preview Noconsole
Else
Report Form ACTUARY_STUDY_DATA Preview Noconsole
Endif
Endif
Else
Local lcFileOut, success, result
lcFileOut = Addbs(Sys(2023)) + 'someFile.pdf'
Report Form ACTUARY_STUDY_DATA Object Type 10 To File (m.lcFileOut)
success = Thisform.wFileSaveAs(m.lcFileOut, @m.result)
If !m.success
Thisform.wMessageBox(m.result)
Endif
Endif
FYI they have never solved the Foxypreviewer error problem, but I discovered it is machine specific. IOW I have server X which always works and server Y which almost always fails. I have never been able to determine what the factor is that makes this difference.