Options

"A value or expression was expected."

I'm trying to set in my report a expression depending of a boolean but i cant linked the expression to my global var aux.

proforma Boolean
aux Text

To turn around this problem I tried to create a column and with a/c code I set the column value depending of a boolean

0yex0qidxzca.png

anyone can help?

Answers

  • Options
    JuhlJuhl Member Posts: 724
    Try changing your var name, to something else.
    Like MyReportTitle, it might be reserved or used elsewhere.
    Follow me on my blog juhl.blog
  • Options
    Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    edited 2018-04-17
    It sometimes happens if you copy a line of text from a spreadsheet cell or another source, including a tab or a new line character, and paste it into the Dev Env. The Dev ENV does not display such characters, and also does not interpret them as white spaces.

    Try to delete everything from the last letter of the ReportTitle up to and including opening quotation character, and then retype missing bits - don't use Ctrl+C + Ctrl+V to put them back
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • Options
    catiamatos1991catiamatos1991 Member Posts: 158
    I tried to create a global var called MyReportTitle and then in my a/c code I set its value doing

    IF proforma THEN
    MyReportTitle := 'Fatura Pro Forma'
    ELSE
    MyReportTitle := OrderNoCaptionLbl;

    And in my report I set the textbox value to "Globals!MyReportTitle.value" but it prints #Error.. How to get the value from the global?
  • Options
    NavNabNavNab Member Posts: 181
    Hello @catiamatos1991

    In RDLC layout, here is the correct syntax "ReportItems!Textbox1.Value" (not Globals!MyReportTitle.value) where Textbox1 is a textbox that you defined in the body of your report.

    I strongly recommend you to get some training. If you work for a Partner then ask the seniors around you. If you work for an end users company, then ask your Partner or colleagues. I believe they will be glad to help you.

    My excuses if my comment offends you. But, I hope it will put you in the correct path to learn C/AL (AL also).
  • Options
    NavNabNavNab Member Posts: 181
    regarding your first error, I believe ReportTitle is already declared as a "Text Constant" in your report. You cannot assign value to a Text Constant by doing:
    ReportTitle := 'Some Text';
    Text Constant are meant to handle multi language reports (ML... hence Caption ML).
    Try to use another name for your variable.
  • Options
    catiamatos1991catiamatos1991 Member Posts: 158
    I'm learning navision.. i'm working in less than a month.
  • Options
    catiamatos1991catiamatos1991 Member Posts: 158
    But the textBox1 i need to point to MyReportTitle global var, I'm confused. Sorry.
  • Options
    NavNabNavNab Member Posts: 181
    if you're working for a NAV Partner, then ask for this training material "80436_NAV2013_ENUS_CSINTRO_08"
    or try google/bing, you'll find some documents
    http://www.firebrandtraining.co.uk/pdf/learn/microsoft/dynamics-nav-2016-developer.pdf
    80436_NAV2013_ENUS_CSINTRO_01
  • Options
    catiamatos1991catiamatos1991 Member Posts: 158
    Thanks! I'm working alone and learning by my self.
Sign In or Register to comment.