none
Custom Embedded Code Problem RRS feed

  • Question

  • Hi, Nice to meet you all

    How to write Custom Embedded code to get Location Value (Left, Top)(report controls e.g. textbox, subreport)?

    and how to set report controls with new value by Custom Embedded Code?

    Thanks a lots
    Thursday, June 5, 2008 9:21 AM

Answers

  • Ok Chong,  I hope I understand your problem correctly.  I think what your asking is to be able to show something on the last page only, and it needs to be displayed in the page footer?


    Let me make an example, that I hope helps you.

    In our example, I want to show the word  "Goodbye"  in the page footer, on only the last page.   Here is what I do.


    Put a textbox on the page footer, and set it's expression to this.


    =IIF(Globals!PageNumber = Globals!TotalPages,"Goodbye","")


    this should show Goodbye on only the last page.   If it's not the last page, then the textbox will be blank.
    • Proposed as answer by Chong Hoo Monday, June 9, 2008 4:48 AM
    • Marked as answer by Chong Hoo Monday, June 9, 2008 4:48 AM
    Friday, June 6, 2008 1:53 PM

All replies

  • Chong, as far as adding code to change the value of something in the report, I believe this can only be done if the value you want to change has an expression option.  if it does then the skys the limit since you can use set the expression to  =Code.MyCode(myparameter)

    However if the value your looking for can't be accessed or passed this way, then I'd think the only way to do this would be going into the xml from outside the report, but i could be wrong.

    Thursday, June 5, 2008 1:55 PM
  • Hi Blast2hell,

    Thank you for helping me, actually I don't have other choice to solve the case.

    Let me describe my problem in report, now I design a purchase order report, at starter, client is very satisfied with this report, but after a few week, he came back to me and ask me to change - align signature set to bottom of report (whatever more than two or three pages, last page should show the signature set at bottom of report) and I can't put the signature set (subreport) at Page Footer and I also not to use the subreport, but still show page footer every page. I'm still finding online solution around three months, and try to use many methods to solve the issue, but fail... That's why I need help here, because here is the best way that people who are expert can show me tips and solution.

    I know there is imposible to use Custom Embedded Code to solve, but I tried my best. About XML from outside the report, I also tried it before and it doesn't work.

    Blast2hell,
    After I describe my problems, do you have any idea or opinion to solve? 

    Thanks a lots
    Thursday, June 5, 2008 11:43 PM
  • Ok Chong,  I hope I understand your problem correctly.  I think what your asking is to be able to show something on the last page only, and it needs to be displayed in the page footer?


    Let me make an example, that I hope helps you.

    In our example, I want to show the word  "Goodbye"  in the page footer, on only the last page.   Here is what I do.


    Put a textbox on the page footer, and set it's expression to this.


    =IIF(Globals!PageNumber = Globals!TotalPages,"Goodbye","")


    this should show Goodbye on only the last page.   If it's not the last page, then the textbox will be blank.
    • Proposed as answer by Chong Hoo Monday, June 9, 2008 4:48 AM
    • Marked as answer by Chong Hoo Monday, June 9, 2008 4:48 AM
    Friday, June 6, 2008 1:53 PM
  •  Hi Blast2hell,

    Thank you so much, you gave me tip to solve and I'm still not thinking this way until you give me suggestion. 

    But...

    If last page footer will be going to show the signature, previous page footer also is showing blank or empty space too...

    and also

    I need to redo all my work because I set subreport as signature set in report and I still cannot put subreport at page footer.

    However Thank You So Much



    Monday, June 9, 2008 4:48 AM