Hi, I've created a report, it prints to screen, printer and I can save manually to a file, but I cannot automate it, despite being able to do exactly what I want in the last program I wrote. I cannot see where I'm going wrong. Here's the code, and a screenshot of the variables output:
METHOD OKButton( ) CLASS EditInvoice
Local oReport as RpReport
Local cFileName, cWorkDir,cMessage, cStr as String
Local nInv, cCaption
nInv := self:Server:FIELDGET(#INVNO)
If gTermDays == 0
gDueDate := FT_LDay(Today())
gDueDate := Today() + gTermDays
OK, looks like it is to do with RpExport.dll somehow, as it doesn't export to ANY format. The file size is always 0kb. Surely if it was a programmatic thing it wouldn't print properly? And why does it work fine from my other program???
No spaces didn't work I'm afraid Phil, but thank you. I tried aTest.pdf no difference... As for the DLL versions Robert, they all say 22.214.171.124
After further investigation and testing, it appears the report itself is the culprit. Any ideas what may be causing it please? BMINVOICE WORKS, LAINVOICE does not. I also removed the image.... no difference....
"memory low" means exactly that - you have run out of memory.
Maybe you have some sort of loop in your code, or better, an inifinite recursion.
When I see this error, normally thatis the cause.
P.S. I don't use nor know ReportPro, so I cannot give you any hint
Well, that didn't work out. BUT I now KNOW it's not my code. It's the Report itself causing all my grief. I can export other reports to pdf using my code, just not this one report, which is attached. Any ideas please? I suspect maybe the grouping???
I am sure a lot of people would be looking forward to help you out by trying your .rpt file, but you have not included any of the data (dbf files etc) that is necessary for it? How can we test this and give you feedback if we cannot test it in our machines?
And also the problem could potentially lay in the actual code that is calling/showing the report, but we do not have that either, in order to have a look. When you ask for help for such a problem, it is always a very good idea to provide a full sample with all the code and support files needed, so people who try to help you can have a hands on look into it, rather than just makes guesses of what the problem could be.
I don't think it's my code, as I can export other reports without issue. This is the only one I have a problem with. It is also the only report that I use groupings and variable length memo fields, which is where I suspect the problem will be. I though someone would just look at the structure of the report and say "oh yeah, you screwed up there", and problem solved... seems not anyway, I've attached the report file, the databases, index files and fpt files. Hopefully that will be enough.
I am glad you found it. On the other newsgroup I saw that the image size of the logo was the problem.
I can't remember that you have ever included the logo in your posts here.
That is why nobody was able to help you, even when they wanted to.