activevfp Forum Rss Feedhttp://www.codeplex.com/Project/ListForums.aspx?ProjectName=activevfpactivevfp Forum Rss DescriptionNew Post: Report Preview Errorhttp://activevfp.codeplex.com/discussions/642132<div style="line-height: normal;">i am using the ActiveVFP version 6.03
<br />
<br />
Report code is....
<br />
<br />
&lt;%
<br />
oPDF=CREATEOBJECT(&quot;pdfrun.print2pdf&quot;)
<br />
if isnull(oPDF)
<br />
return .f.
<br />
endif
<br />
oPDF.cPSColorPrinter =&quot;Xerox Phaser 6120 PS&quot;
<br />
oUtil=NEWOBJECT('AVFPutilities')<br />
<ul>
<li>files older than 20 Minutes(1200 ms.), erase. 3rd param is path - can be hardcoded
<br />
oUtil.DeleteFiles('pdf',1200,oProp.AppStartPath+[Temp])
<br />
lcCompany=oRequest.Form(&quot;Company&quot;)
<br />
IF ISNULL(lcCompany) .OR. EMPTY(lcCompany)
<br />
oPDF.cRecordSelect = [SELECT * from ']+ oProp.DataPath+[customer' INTO CURSOR tcursor]
<br />
ELSE
<br />
oPDF.cRecordSelect = [SELECT * from '] + oProp.DataPath+[customer' ]+;
<br />
[WHERE UPPER(company)=ALLTRIM(UPPER(']+lcCompany+[')) INTO CURSOR tcursor]
<br />
ENDIF</li>
<li>the following properties are coded for portability. They may be hardcoded instead.
<br />
oPDF.cReport = oProp.AppStartPath+&quot;reports\listcust.frx&quot;
<br />
oPDF.cPhysicalPath=oProp.AppStartPath+[Temp] &amp;&amp;[C:\Program Files\dotComSolution\AVFPdemo2\Temp]
<br />
oPDF.cLogicalPath=[<a href="http://]+oRequest.ServerVariables(&quot;HTTP_HOST" rel="nofollow">http://]+oRequest.ServerVariables("HTTP_HOST</a>&quot;) +JustPath(oRequest.ServerVariables(&quot;URL&quot;))+[/Temp/] &amp;&amp;[<a href="http://www.ddddd.com/avfpdemo2/Temp/]" rel="nofollow">http://www.ddddd.com/avfpdemo2/Temp/]</a>
<br />
lcFile=oPDF.GetOutput() &amp;&amp; generate output, return temp file name
<br />
lcNewPath=oPDF.cLogicalPath+lcFile &amp;&amp; new URL
<br />
oResponse.Redirect(lcNewPath) &amp;&amp; redirect browser to created file
<br />
oPDF = .NULL.
<br />
release oPDF
<br />
%&gt;</li>
</ul>
</div>qamar94Thu, 30 Jul 2015 21:35:27 GMTNew Post: Report Preview Error 20150730093527PNew Post: Report Preview Errorhttp://activevfp.codeplex.com/discussions/642132<div style="line-height: normal;">Sounds like you may not have done the registration and DCOM stuff for the default version. Victor's latest PDF routines do away with those requirements. <br />
</div>claudefoxThu, 30 Jul 2015 19:16:04 GMTNew Post: Report Preview Error 20150730071604PNew Post: Report Preview Errorhttp://activevfp.codeplex.com/discussions/642132<div style="line-height: normal;">I think we will need a little more info, specially the code that you are using to launch the report, what version of AVFP are you using, etc.<br />
</div>vespinaThu, 30 Jul 2015 12:19:15 GMTNew Post: Report Preview Error 20150730121915PNew Post: Report Preview Errorhttp://activevfp.codeplex.com/discussions/642132<div style="line-height: normal;">Caught .NET exception, source: PDF.AVFP 00006fjd00vm err#= 1733 line= 2 Class definition PDFRUN.PRINT2PDF is not found.1733 Class definition PDFRUN.PRINT2PDF is not found. PDFRUN.PRINT2PDF .NULL. .NULL. .NULL. .NULL. c:\aa\activevfp.dll message: c:\aa\activevfp.dll
<br />
<br />
need help please<br />
</div>qamar94Wed, 29 Jul 2015 23:04:21 GMTNew Post: Report Preview Error 20150729110421PNew Post: How to embed existing Fox Pro DeskTop Application to ActiveVFP http://activevfp.codeplex.com/discussions/642011<div style="line-height: normal;">What you must understand is that AVFP was not created as a migration tool to convert VFP desktop apps to a web-based app. The fact that ActiveVFP allows to run native VFP code server-side, makes really easy to take all your business code and reports, and reuse them in your web app requiring minimum or none modifications.
<br />
<br />
That said, the amount of non-visual code you can reuse with ActiveVFP will largely vary depending on how your current app is coded. People that used n-tiers approaches and have a decent separation between UI and biz rules, are in a far better position to reuse big parts of their desktop apps in a web app using ActiveVFP. People that did little or none separation between UI and biz code, will likely facing a major rewriting even using ActiveVFP.
<br />
<br />
In BOTH cases you will have to recode your whole UI, using HTML/CSS/JS.
<br />
<br />
<br />
Victor Espina<br />
</div>vespinaMon, 27 Jul 2015 21:45:33 GMTNew Post: How to embed existing Fox Pro DeskTop Application to ActiveVFP 20150727094533PNew Post: How to embed existing Fox Pro DeskTop Application to ActiveVFP http://activevfp.codeplex.com/discussions/642011<div style="line-height: normal;">Hello,
<br />
<br />
I have a foxpro application that I would like to take online. It clearly appears to me that ActiveVFP can help. I need a little guidance how can I run/embed/import my application in activeVFP. The information I have explored on your website so far tell me a lot about ActiveVFP but I need to connect my application first.
<br />
<br />
Please advise.
<br />
<br />
Thank you. <br />
</div>qamar94Mon, 27 Jul 2015 21:12:04 GMTNew Post: How to embed existing Fox Pro DeskTop Application to ActiveVFP 20150727091204PNew Post: Error with manifest file?http://activevfp.codeplex.com/discussions/639894<div style="line-height: normal;"><strong>mr_ocean wrote:</strong><br />
<blockquote>
Maybe the problem isn't the .Net Framework version. There is a way to remove completely a IIS app? I think that removing it from IIS manager it will leave some configuration on the computer.<br />
</blockquote>
tried this method, but the problem has not been solved. Any idea ?<br />
</div>mr_oceanTue, 14 Jul 2015 12:18:31 GMTNew Post: Error with manifest file? 20150714121831PNew Post: Android Applicationhttp://activevfp.codeplex.com/discussions/641094<div style="line-height: normal;">It is possible to create iOS, Android or Windows Phone &quot;native&quot; apps using JS/HTML/CSS + PhoneGap, but it doesn't need AVFP at all. ActiveVFP is a server-side technology, and it doesn't have anything to do with UI or native apps.
<br />
<br />
Victor<br />
</div>vespinaWed, 08 Jul 2015 16:33:45 GMTNew Post: Android Application 20150708043345PNew Post: Android Applicationhttp://activevfp.codeplex.com/discussions/641094<div style="line-height: normal;">Is this Possible to Create a Android Application .APK with ActiveVFP ?
<br />
<br />
Where we can start for Android Development ?
<br />
<br />
Warm regards,
<br />
mk.<br />
</div>mk_commonWed, 08 Jul 2015 16:09:23 GMTNew Post: Android Application 20150708040923PNew Post: Declare public variables to hold application settingshttp://activevfp.codeplex.com/discussions/640310<div style="line-height: normal;">One thing to take in consideration is that in Web apps, you don't have a server-side code that is running permanently. Your server-side code will be executed every time you send a new request to the server, and any public variable declared in your MAIN.PRG will be alive only while the request is being processed by AVFP.<br />
<br />
App wide settings are normally stored in some kind of configuration files and are kind of static, so reading them every time you process a request shouldn't be a problem: if a setting is updated, this change should be saved to the configuration file so the next request will read it from there.
<br />
<br />
Now, keeping information browser-side between post-backs to the server is another problem, one that can be solved (among other approaches) using sessions. For example, if you use SPA, then you can use JS global variables to store session-wide values.
<br />
<br />
Victor<br />
</div>vespinaWed, 24 Jun 2015 12:18:23 GMTNew Post: Declare public variables to hold application settings 20150624121823PNew Post: Declare public variables to hold application settingshttp://activevfp.codeplex.com/discussions/640310<div style="line-height: normal;">Yes, just use the session object to store everything. This remains persistent throughout the web session. Anything else that needs to be permanent store to the database.<br />
</div>claudefoxWed, 24 Jun 2015 11:05:01 GMTNew Post: Declare public variables to hold application settings 20150624110501ANew Post: Declare public variables to hold application settingshttp://activevfp.codeplex.com/discussions/640310<div style="line-height: normal;">Hi,
<br />
<br />
I am using some variables to store application wide settings in my main.prg of my desktop application.
<br />
<br />
How can i do this in ActiveVfp?
<br />
<br />
Will these code run every time when i call avfp script from the server?
<br />
<br />
Is there a way to keep these settings persistant on server during avfp session / multiple script calls?
<br />
<br />
Regards
<br />
Naeem<br />
</div>naeempkMon, 22 Jun 2015 21:29:47 GMTNew Post: Declare public variables to hold application settings 20150622092947PNew Post: Error with manifest file?http://activevfp.codeplex.com/discussions/639894<div style="line-height: normal;">Maybe the problem isn't the .Net Framework version. There is a way to remove completely a IIS app? I think that removing it from IIS manager it will leave some configuration on the computer.<br />
</div>mr_oceanWed, 17 Jun 2015 07:54:20 GMTNew Post: Error with manifest file? 20150617075420ANew Post: Error with manifest file?http://activevfp.codeplex.com/discussions/639894<div style="line-height: normal;">Should be the Integrated, not Classic. AVFP should work fine with whatever the latest and greatest .NET Framework and IIS version is.<br />
</div>claudefoxTue, 16 Jun 2015 16:08:59 GMTNew Post: Error with manifest file? 20150616040859PNew Post: Error with manifest file?http://activevfp.codeplex.com/discussions/639894<div style="line-height: normal;">Ok, i found the way of how to change NET Framework (ASP.NET v4.0) for this app but i have the same error. If i choose ASP.NET v4.0 classic, i get error 500.<br />
</div>mr_oceanMon, 15 Jun 2015 10:30:24 GMTNew Post: Error with manifest file? 20150615103024ANew Post: Error with manifest file?http://activevfp.codeplex.com/discussions/639894<div style="line-height: normal;"><strong>claudefox wrote:</strong><br />
<blockquote>
Are all the applications on 1 web server or different web servers?<br />
<br />
1.) You might want to upgrade to .NET Framework 4<br />
2.) You could try to create another application with a completely different name and use the same source.<br />
3.) As a last resort, you could just manually register activevfp.dll - but be aware that all of your applications will use that one file instead of their own (which may not be a problem)<br />
<br />
Did you ever solve your PDF issue with Victor's new stuff?<br />
</blockquote>
All applications are on the same server, i have one root folder with one subdirectory for every application. Every subdirectory have a full AVFP installation file but with some differences.<br />
<ol>
<li>On my computer i have .NET Framework 4.5 but AVFP tell me always the version 2. I need to do a specific configuration for changing it?</li>
<li>Yes i do it.</li>
<li>
Ok, i will try this way.<br />
</li>
</ol>
Not at all. Victory are giving me a good help and assistance to solve PDF problem.<br />
</div>mr_oceanMon, 15 Jun 2015 09:05:43 GMTNew Post: Error with manifest file? 20150615090543ANew Post: ActiveVFP send a file to the response objecthttp://activevfp.codeplex.com/discussions/542616<div style="line-height: normal;">FInally solved it:<br />
<pre><code> oResponse.Clear()
oResponse.Buffer = .T.
oResponse.contentType = pcContentType
oResponse.AddHeader(&quot;Pragma&quot;,&quot;public&quot;)
oResponse.AddHeader(&quot;Cache-Control&quot;,&quot;no-cache&quot;)
oResponse.AddHeader(&quot;Content-Type&quot;,pcContentType)
oResponse.AddHeader(&quot;Content-Length&quot;,ALLTRIM(STR(oFile.Size)))
oResponse.AddHeader(&quot;Content-Disposition&quot;, STRCONV(pcDisposition + [; filename=] + JUSTFNAME(pcFileName),9))
oResponse.AddHeader(&quot;Content-Transfer-Encoding&quot;,&quot;binary&quot;)
oResponse.CharSet = &quot;UTF-8&quot;
oResponse.BinaryWrite(CREATEBINARY(FILETOSTR(pcFileName)))
oResponse.End()
oResponse.Flush()
</code></pre>
In my case, the key was to remove an extra header that caused the problem on chrome.
<br />
<br />
Victor<br />
</div>vespinaSun, 14 Jun 2015 18:17:42 GMTNew Post: ActiveVFP send a file to the response object 20150614061742PNew Post: ActiveVFP send a file to the response objecthttp://activevfp.codeplex.com/discussions/542616<div style="line-height: normal;">Same thing can be done using VFP CREATEBINARY:<br />
<pre><code>oResponse.BinaryWrite(CREATEBINARY(FILETOSTR(pcFileName)))</code></pre>
My current problem is that in Chrome, this works only for &quot;attachment&quot;; if I change to &quot;inline&quot;, the pdf never finish loading on the browser. It works ok in IE and Safari, but not on Chrome.
<br />
<br />
Victor<br />
</div>vespinaSun, 14 Jun 2015 18:03:44 GMTNew Post: ActiveVFP send a file to the response object 20150614060344PNew Post: Error with manifest file?http://activevfp.codeplex.com/discussions/639894<div style="line-height: normal;">Unfortunately, no. We are still working on the issue.
<br />
<br />
Victor<br />
</div>vespinaFri, 12 Jun 2015 18:35:40 GMTNew Post: Error with manifest file? 20150612063540PNew Post: Error with manifest file?http://activevfp.codeplex.com/discussions/639894<div style="line-height: normal;">Are all the applications on 1 web server or different web servers?<br />
<br />
1.) You might want to upgrade to .NET Framework 4
<br />
2.) You could try to create another application with a completely different name and use the same source.
<br />
3.) As a last resort, you could just manually register activevfp.dll - but be aware that all of your applications will use that one file instead of their own (which may not be a problem)
<br />
<br />
Did you ever solve your PDF issue with Victor's new stuff?<br />
</div>claudefoxFri, 12 Jun 2015 16:43:55 GMTNew Post: Error with manifest file? 20150612044355P