SIMITGROUP / phpjasperxml

This is a php wysiwyg report library
BSD 3-Clause "New" or "Revised" License
44 stars 45 forks source link

EVAL data have issues #93

Closed lvsan closed 7 months ago

lvsan commented 7 months ago

Hi All,

When i try to print the report, and one of my item have the below data and will display me the error as below:

Eval failed.

return STRAW FOR WD3591, WD4268;

syntax error, unexpected token "for", expecting ";"

Can advise why this is happen, and what should I do? I try to remove it but still the same.

kstan79 commented 7 months ago

your data is text or php script? I couldn't imagine how your data eval yet. you may try to echo the eval before/after at file src/PHPJasperXML_expression.php, method executeExpression().

lvsan commented 7 months ago

Hi Ks tan,

My data is from query and should be in textField format create at ireport.

However, I have add the condition below and working now.

                         if(str_contains($value,","))
                         {
                                       $value = '"'.$value.'"';
                         }

Under the method executeExpression().

Thanks.

Best regards,

Low Voon San Assistant Project Manager DCS Synthesis Pte Ltd

Office : +65 6282 7655 Fax : +65 6742 7451 Email : @.**@.> Corporate Video : www.synthesis.bz/video.htmlhttp://www.synthesis.bz/video.html 865 Mountbatten Road #05-27 Katong Shopping Centre Singapore 437844 @. @.

From: Ks Tan @.> Sent: Thursday, 4 April 2024 12:55 pm To: SIMITGROUP/phpjasperxml @.> Cc: Ms Low @.>; Author @.> Subject: Re: [SIMITGROUP/phpjasperxml] EVAL data have issues (Issue #93)

your data is text or php script? I couldn't imagine how your data eval yet. you may try to echo the eval before/after at file src/PHPJasperXML_expression.php, method executeExpression().

— Reply to this email directly, view it on GitHubhttps://github.com/SIMITGROUP/phpjasperxml/issues/93#issuecomment-2036189663, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AATZXXAAA6UIBUQPIM5SXLTY3TMLLAVCNFSM6AAAAABFWPDP36VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZWGE4DSNRWGM. You are receiving this because you authored the thread.Message ID: @.**@.>>

kstan79 commented 7 months ago

thanks, but i don't think it is reliable solution. the more proper solution is sit back and identify why your query doesn't evaluate as string, most probably your data type or etc reason. Then apply better way.

At the mean time, you may separate maintain this file.

lvsan commented 7 months ago

Hi Ks tan,

Sure. However, only this data have this problem, but others data is ok.

Thanks.

Best regards,

Low Voon San Assistant Project Manager DCS Synthesis Pte Ltd

Office : +65 6282 7655 Fax : +65 6742 7451 Email : @.**@.> Corporate Video : www.synthesis.bz/video.htmlhttp://www.synthesis.bz/video.html 865 Mountbatten Road #05-27 Katong Shopping Centre Singapore 437844 @. @.

From: Ks Tan @.> Sent: Thursday, 4 April 2024 1:20 pm To: SIMITGROUP/phpjasperxml @.> Cc: Ms Low @.>; Author @.> Subject: Re: [SIMITGROUP/phpjasperxml] EVAL data have issues (Issue #93)

thanks, but i don't think it is reliable solution. the more proper solution is sit back and identify why your query doesn't evaluate as string, most probably your data type or etc reason. Then apply better way.

At the mean time, you may separate maintain this file.

— Reply to this email directly, view it on GitHubhttps://github.com/SIMITGROUP/phpjasperxml/issues/93#issuecomment-2036210293, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AATZXXHJQ2ZI57R2DBZWKWTY3TPINAVCNFSM6AAAAABFWPDP36VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZWGIYTAMRZGM. You are receiving this because you authored the thread.Message ID: @.**@.>>

kstan79 commented 7 months ago

I did some improvements and by right it solve this issue. However still need sometime to test

kstan79 commented 7 months ago

u may try latest, if same thing appear again reopen this issue