Error in report proc

Hi all

I would ask You for help about this situation

When I run rtc report i am getting this error:

“Rendering output for the report failed and the following error occurred: An unexpected error occurred in Report Processing.”

I noticed several things:

1.when I print for the first time(in one client session) it,s ok. Error is not showing and I can print the report, But every next try for printing error occurs.

2.if I import same report but with different Id, then this error is gone and it’s ok(this msg not occurs)

  1. there is one function Get id: and if I comment this lines of code then it is ok, i can print report without any error message for every printing (not only first time)

what can be connection btw this error and report id. Do you have some advice how can I solve this?

Thanks very much

Hi Alen,

If it’s this code which is causing the problem then you should try to insert:

IF NOT EVALUATE(rObjectID,COPYSTR(hText,8)) THEN

And then see if it works.

But I would also like to know what you’re actually doing with this code. Why the COPYSTR? I mean if the reports object id is 50190, then you code will return nothing as your COPYSTR is set to copy everything from position 8 in your hText var. So this might also be an error. So really try with this code instead:

IF NOT EVALUATE(rObjectID,COPYSTR(hText,1,8)) THEN

thanks for replay

the function is only these two row, there is

nothing after evaluate, I tried with if not evaluate then exit , it’s same, again same error after first print

I can’t tell what exactly this code is for(this very big custom report and I am doing only migration from 2009 to 2013),

but I noticed that fields in footer have not values when i am deleting this code (fields like: signature,(also there is a function for formatting signature)

thanks for reply

the function is only these two row, there is

nothing after evaluate, I tried with if not evaluate then exit , it’s same, again same error after first print

I can’t tell what exactly this code is for(this very big custom report and I am doing only migration from 2009 to 2013),

but I noticed that fields in footer have not values when i am deleting this code (fields like: signature,(also there is a function for formatting signature)

and why only first try for printing is successful, and every next not,that is most strange for me

Did you try the suggested code changes?

yes, i tried with

IF NOT EVALUATE(rObjectID,COPYSTR(hText,1,8)) THEN 
exit
and it's same, still same problem

Have you tried debugging the report? If yes, then you should be able to see exactly which line the error happens at!

yes, line with evaluate is definitely the problem. I try this to avoid the error:


1. **IF NOT EVALUATE(rObjectID,COPYSTR(hText,1,8)) THEN EXIT** , and this
1. **IF NOT EVALUATE(rObjectID,COPYSTR(hText,1,8)) THEN CurrReport.BREAK,**  and this
1. **IF NOT EVALUATE(rObjectID,COPYSTR(hText,1,8)) THEN CurrReport.SKIP**  but same error

Only if I comment/delete that line is ok

How about if you just remove the COPYSTR and only uses the hText?

you can not enter ‘Report xxxxxxx’ in Integer. This error occurs in that case.

one more thing: only If i delete whole layout from txt file ( everything that is after RDLDATA then error msg is gone. And after that if I add only one textbox(field from data set) in layout i try to run msg error appears again

I really don’t get this one. So I just did a test.

Object ID returns “Report 50213” if the current report is number 50213. So the original COPYSTR(hText,8) was actually correct. Sorry about that. The object number actual starts on position 8!

Also can you see if this GetObjectId function is called anywhere in the report. Otherwise then you could just delete!

Erik, i had several bitmaps fields (columns) in the dataset.

I deleted that columns and now msg is gone. there is no more error while processing.

Now I am much more confused about what is happening.

What is conection btw all these things…

Thank you for your time very very much. And sry for my bad english

Thanks again

BR

Hi Alen,

Happy that it works for you now. And sometimes we just don’t have a good explanation to why things happen. They just do and we can then either just accept it and move on, or spend lots of time trying to figure it out.

Have a great day!

Thanks, everything is ok if the picture is deleted from data set, but the problem is that i need that picture in the report i must not delete. When I go to preview i am getting more descriptive error:

An error occurred during local report processing.
An error has occurred during report processing.
Exception of type ‘System.OutOfMemoryException’ was thrown.

Report has small data set, and prints only 15 pages(so I don’t have a lot of data)

(this occurs after first print,first print is ok, put after that I am getting this problem)

Do You have some idea what can be problem and what to do to avoid this behavior of report

Thanks in advance

Thanks, everything is ok if the picture is deleted from data set, but the problem is that i need that picture in the report i must not delete. When I go to preview i am getting more descriptive error:

An error occurred during local report processing.
An error has occurred during report processing.
Exception of type ‘System.OutOfMemoryException’ was thrown.

Report has small data set, and prints only 15 pages(so I don’t have a lot of data)

(this occurs after first print,first print is ok, put after that I am getting this problem)

Do You have some idea what can be problem and what to do to avoid this behavior of report

Thanks in advance