FoxInCloud
Adaptation Question
Gravatar is a globally recognized avatar based on your email address. Adaptation Question
  codeSlinger
  All
  Dec 14, 2015 @ 11:28am
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
Gravatar is a globally recognized avatar based on your email address. Re: Adaptation Question
  Thierry Nivelet (FoxInCloud)
  codeSlinger
  Dec 15, 2015 @ 01:33am
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)

Gravatar is a globally recognized avatar based on your email address. Re: Adaptation Question
  codeSlinger
  Thierry Nivelet (FoxInCloud)
  Dec 15, 2015 @ 03:32am
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



Your Journey is Your Destination

Gravatar is a globally recognized avatar based on your email address. Re: Adaptation Question
  Thierry Nivelet (FoxInCloud)
  codeSlinger
  Dec 15, 2015 @ 06:54am
did you try this?
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)

Gravatar is a globally recognized avatar based on your email address. Re: Adaptation Question
  Tuvia Vinitsky
  codeSlinger
  Dec 15, 2015 @ 07:02am

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



Gravatar is a globally recognized avatar based on your email address. Re: Adaptation Question
  Tuvia Vinitsky
  Thierry Nivelet (FoxInCloud)
  Jun 20, 2017 @ 02:20pm

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.

© 1996-2017