# SOLVED: Capesoft Draw - Cannot RETURN value from procedure

**URL:** <https://clarionhub.com/t/solved-capesoft-draw-cannot-return-value-from-procedure/7488>\
**Category:** questions\
**Tags:** report, templates\
**Created:** [September 24, 2024, 5:25am UTC](https://clarionhub.com/t/solved-capesoft-draw-cannot-return-value-from-procedure/7488 "2024-09-24T05:25:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Niels\_Larsen](https://clarionhub.com/user_avatar/clarionhub.com/niels_larsen/32/655_2.png) [@Niels\_Larsen](https://clarionhub.com/u/Niels_Larsen)\
**Post date:** [September 24, 2024, 5:25am UTC](https://clarionhub.com/t/solved-capesoft-draw-cannot-return-value-from-procedure/7488/1 "2024-09-24T05:25:27Z")

</div>

**Patience - started over and then it works.**

Hi

I trying to place a QR control (via template) on a report, but it can't compile.  
Any idea?

![image](https://clarionhub.com/images/transparent.png)

---

<div class="post-metadata">

**Author:** ![CarlBarnes](https://clarionhub.com/user_avatar/clarionhub.com/carlbarnes/32/1859_2.png) [@CarlBarnes](https://clarionhub.com/u/CarlBarnes)\
**Post date:** [September 24, 2024, 7:00pm UTC](https://clarionhub.com/t/solved-capesoft-draw-cannot-return-value-from-procedure/7488/2 "2024-09-24T19:00:23Z")

</div>

That .INIT with 3 parameters `(ProcessClass PC,<REPORT R>,<PrintPreviewClass PV>)` does Not Return a value so the error is correct. DAB overloaded .Init() a bit much IMO.

If you move your code to ThisWindow.Init() without params it will compile with your `Return Level:Fatal`  
because in ABWindow that .Init() it is declared to Return `(),BYTE,VIRTUAL,PROC`.

---

<div class="post-metadata">

**Author:** ![CarlBarnes](https://clarionhub.com/user_avatar/clarionhub.com/carlbarnes/32/1859_2.png) [@CarlBarnes](https://clarionhub.com/u/CarlBarnes)\
**Post date:** [September 24, 2024, 7:05pm UTC](https://clarionhub.com/t/solved-capesoft-draw-cannot-return-value-from-procedure/7488/3 "2024-09-24T19:05:49Z")

</div>

I now see you edited your original post at the top to add " **Patience - started over and then it works**" and the Topic is prefixed “Solved!”

Maybe you put the code in .Init() as I posted ???

Instead of your edit to the top, it would have been more obvious for you to Reply to yourself.

---

<div class="post-metadata">

**Author:** ![Niels\_Larsen](https://clarionhub.com/user_avatar/clarionhub.com/niels_larsen/32/655_2.png) [@Niels\_Larsen](https://clarionhub.com/u/Niels_Larsen)\
**Post date:** [September 25, 2024, 5:59am UTC](https://clarionhub.com/t/solved-capesoft-draw-cannot-return-value-from-procedure/7488/4 "2024-09-25T05:59:13Z")

</div>

> [@CarlBarnes](#):
>
> Instead of your edit to the top, it would have been more obvious for you to Reply to yourself.

Sorry for the confusion. I removed the control and added it again. Then it works.
