PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD20] Single page report
[WD20] Single page report
Iniciado por guest, 19,ene. 2016 08:29 - 7 respuestas
Publicado el 19,enero 2016 - 08:29
Hi
How can I determine if a report will fit on a single page?

For a food processing company we have to print recipes on single pages; no recipe can use multiple pages & we cannot change font sizes, line spacing etc. The report currently consists of a break on the recipe code; the break header section is fairly small & can't be reduced, the body section prints out all the ingredients and then the break footer prints mixing instructions,QA type stuff & then up to 3 notes which are stored & printed in RTF format (auto sizing controls).

How can I determine if this will all fit on the one page? If it won't & the decision is made to print anyway, how can I stop it from going to page 2?

Thanks

David
Publicado el 19,enero 2016 - 09:23
Hi david,

I red somewhere that in version 20 it is possible to add an indexpage to a report. This page can contain the page numbers. ( This was not possible before accept for lots of programming)

It is now possible so there should be a function that you cabn use to determine how many pages a report has.( even before the pages are created!!)
So you should be able to stop the printing by checking in the before print section of the report.

Hope this helps

regards
Allard
Publicado el 19,enero 2016 - 09:55
David,

you could create a report with no data source. Then you use statics instead of items. When you call your report you put all your data in variables and replace the statics with the variables. For each static you can define that it is not auto-sizable.

HTH
Sebastian
Publicado el 19,enero 2016 - 10:18
Hi David,

Just wondering, why print a recipe if not all ingredients can be printed?
Is it not possible to limit the entry to a maximum number of ingredients?

Regards,
Piet
Publicado el 19,enero 2016 - 11:18
Hi David,

I think I would print the report first to PDF and check then if it fits on one page.
Publicado el 19,enero 2016 - 13:39
Hi David,

I did that a long time ago, but not with the reports, with the low level printing instructions. At that level, you always know exactly where you are and what is happening. I was using that to cut automatically long text between pages. It's more work than using the report editor, but you have FULL control.

Best regards
Publicado el 19,enero 2016 - 19:57
Thanks for all the suggestions, I was thinking that Fabrice's option might be the only way but I'll look into the other options first; no point in making work for myself if I don't need to!

@Piet - I could have explained a bit further that the ingredients aren't the problem, it's when they have a fairly large ingredient list followed by production notes that we get the notes spread onto the 2nd page.

Cheers

David
Publicado el 20,enero 2016 - 08:09
Hi David,

In that case I would use Stefans suggestion when the user validates the input of the recipe and inform the user that the production notes are out of range and issue a warning or even prevent the recipe from being saved.

Regards,
Piet