Showing posts with label line. Show all posts
Showing posts with label line. Show all posts

Wednesday, March 7, 2012

error [BC30494] Line is too long

Hi,
I have a problem with a report in SSRS 2005. I tried to add some custom code to a report.
The code is absolutely simple and correct.
But when trying to show the report the debugger shows the following error message:
error [BC30494] Line is too long.

When I remove the code the report works again.

The code is about 12 words and could not be the problem.

Could anyone help please?

Best regards,
Stefoon

Can you post the code so everyone might have a better idea as to what you are seeing?

Jarret

|||

This is the text in the Code Section of the report.

It it doing nothing spectacular, only deviding Numerator by Denominator by avoiding a divide by 0 in the first section.

Function Divide(Numerator as Double, Denominator as Double)
If Denominator = 0 Then
Return Nothing
Else
Return Numerator/Denominator*100
End If
End Function

Best regards,

Stefoon

|||

I don't see anything wrong with it and it worked fine for me in a test report. Are there any other custom functions in your Code window?

What is the expression you are using to call the function?

Jarret

|||

Hi,

I use

= code.Divide((sum(Fields!Measures_1.Value)),(sum(Fields!Measures_2.Value)))

in the fields of a table. The measures are from the recordset.

Best regards,

Stefoon

error [BC30494] Line is too long

Hi,
I have a problem with a report in SSRS 2005. I tried to add some custom code
to a report.
The code is absolutely simple and correct.
But when trying to show the report the debugger shows the following error
message:
error [BC30494] Line is too long.
When I remove the code the report works again.
The code is about 12 words and could not be the problem.
Could anyone help please?
Best regards,
StefoonOn Jul 25, 6:54 am, Stefoon23 <Stefoo...@.discussions.microsoft.com>
wrote:
> Hi,
> I have a problem with a report in SSRS 2005. I tried to add some custom code
> to a report.
> The code is absolutely simple and correct.
> But when trying to show the report the debugger shows the following error
> message:
> error [BC30494] Line is too long.
> When I remove the code the report works again.
> The code is about 12 words and could not be the problem.
> Could anyone help please?
> Best regards,
> Stefoon
Maybe you could post the code?|||The code is trivial and has nothing to do with the problem. Thus I did not
post it.
Function Divide(Numerator as Double, Denominator as Double)
If Denominator = 0 Then
Return Nothing
Else
Return Numerator/Denominator*100
End If
End Function
I use it in a table with values from a dataset:
code.Divide((sum(Fields!Measures1.Value)),(sum(Fields!Measures2.Value)))
I was told that the problem could be that a request could only be 4 MBytes
big in asp. The report's rdl file is only about 3 MB big. I changed the size
of maxRequestLength in machine.config to 20000 instead of 4000 Bytes, but it
did not help.
When I remove these 7 lines of code the reports works without problems. But
I want to centralize this function.
Best regards,
Stefan
"toolman" wrote:
> On Jul 25, 6:54 am, Stefoon23 <Stefoo...@.discussions.microsoft.com>
> wrote:
> > Hi,
> > I have a problem with a report in SSRS 2005. I tried to add some custom code
> > to a report.
> > The code is absolutely simple and correct.
> > But when trying to show the report the debugger shows the following error
> > message:
> > error [BC30494] Line is too long.
> >
> > When I remove the code the report works again.
> >
> > The code is about 12 words and could not be the problem.
> >
> > Could anyone help please?
> >
> > Best regards,
> > Stefoon
> Maybe you could post the code?
>

Friday, February 24, 2012

Error "Line too long" - Report too large?

I'm working with a report which is being generated dynamically through
an XML and XSLT transform which generates the .rdl file which is then
pasted in to the code view of a report file in Visual Studio. This
process has worked so far for various reports until we came to this
latest report.
This report is a bit larger in scale, all together the final file size
of the .rdl file is just about 2MB. Of course it's a bit slow to work
with in Visual Studio, but the goal again was to generate the .rdl
dynamically so that editing the file(s) in Visual Studio would not be
necessary.
The report loads fine into Visual Studio and the layout view of the
report looks fine as well, but when we attempt to preview the report,
we get a build error which states:
[rsUnexpectedCompilerError] An unexpected error occurred while
compiling expressions. Native compiler return value: '[BC30494] Line
is too long.'.
I've attempted to locate information on the error message or the error
code itself but can't find any references anywhere. The error is
occurring on compilation of the report - because the same error occurs
when we select 'Build' from the context menu of the report.
So since it's a compilation error and the message seems to indicate
that the error occured while compiling expressions (and expressions use
VB.NET syntax) my assumption is that the source of the report is
somehow being passed in as a parameter to a version of the VB.NET
compiler and then spit back out for further processing.
If you follow that logic, my first thought was that perhaps one of the
expressions was literally too long and perhaps needed to be broken up
into smaller lines. But this was not the case. As the longest 'line' in
the report is 384 characters. Not long enough to cause any problems.
And we have other reports with lines just as long which do compile.
My next thought was that the entire source of the .rdl file was being
passed in to the compiler as a single string for parsing and execution
(e.g. turning the expressions into actual values or something similar).
If this is the case, then perhaps it's the actual size (in characters
or bytes) of the .rdl file that was the problem.
That's currently where I am now. I've narrowed it down to a theoretical
file size limit.
While trimming the report down piece by piece, I've discovered that the
same report works when it is in the area of 1.63 MB in size. However,
as soon as the report reaches 1.79 MB in size, this error returns and
the report fails to build.
I've seen other posts and documentation regarding the theoretical or
imposed limits of IIS and other platforms for uploading reports to
report server, but we are still below the 4MB limit.
I've also seen other posts by users who have asked about reports in the
range of <1MB, but ours is clearly outside that range.
So, does anyone have any information related to this error message, any
limits on .rdl file size, or suggestions for getting this to work?In case anyone is interested about this later on, I haven't found a
solution to the problem yet, but have found a workaround.
I was able to break the report up into smaller, more manageable chunks
(each one around 1MB in size) and create a master report and include
each chunk in a subreport.
So that's how I'm dealing with the problem for now, but I'm still
wondering if the errors I've encountered are really related to the size
of the report or something else.|||will.s.smith@.gmail.com wrote:
> In case anyone is interested about this later on, I haven't found a
> solution to the problem yet, but have found a workaround.
> I was able to break the report up into smaller, more manageable chunks
> (each one around 1MB in size) and create a master report and include
> each chunk in a subreport.
> So that's how I'm dealing with the problem for now, but I'm still
> wondering if the errors I've encountered are really related to the size
> of the report or something else.
Hi,
Iam have a RDL file where the file size is over 4MB
I have been workiing with it and deploying various versions of this
file size for the past couple of weeks ,without any errors and now
unexpectedly when iam to go live tomm Iam getting this error ,
I really don;t have any clue on how to handle this
Any help would really be appreciated
this is the compiler error iam having
[rsUnexpectedCompilerError] An unexpected error occurred while
compiling expressions. Native compiler return value: '[BC30494] Line
is too long.'.
Basically iam having 24 table data regions each pulling data from the
same dataset with different filtering options
only when i add the last 4 table regions iam gettign this error
Keep in mind that i was not getting this error last week with the same
24 data regions

Error "Incorrect syntax near (." when doing Update() from code, VB

Hi all

My error is as follows:

Incorrect syntax near '('.
Line 27: acceptOrDeclineFriendship.UpdateParameters.Add("Response", answer)
Line 28: acceptOrDeclineFriendship.UpdateParameters.Add("FriendID", friend_id)
Line 29: acceptOrDeclineFriendship.Update()
Line 30:
Line 31: End Sub

Bear with me... I have a page where i use a repeater control to list users who have requested to be friends with the currently online user. The 'getFriendRequests' query looks like this:

SelectCommand="SELECT * FROM Friends, UserDetails WHERE (Friends.UserID = UserDetails.UserID) AND (FriendID = @.UserID) AND (ApprovedByFriend = 'False') ORDER BY Friends.Requested DESC"
This works.

Within each repeater template, there are 2 buttons, 'Accept' or 'Decline', like this:

 <asp:Repeater ID="Repeater1" runat="server" DataSourceID="getFriendRequests"> <ItemTemplate> (other stuff like avatar and username etc) <asp:Button ID="accept" runat="server" Text="Accept" commandName="Accept" commandArgument='<%#Eval("UserID")%>' onCommand="Accept_Decline_Friends"/> <asp:Button ID="decline" runat="server" Text="Decline" commandName="Decline" commandArgument='<%#Eval("UserID")%>' onCommand="Accept_Decline_Friends"/> </ItemTemplate> </asp:Repeater>

The code-behind (VB) which deals with this is as follows:

Protected Sub Accept_Decline_Friends(ByVal senderAs Object,ByVal eAs CommandEventArgs)'retrieve id of requestee and the answer accept/declineDim friend_idAs String = e.CommandArgument.ToStringDim answerAs String = e.CommandName.ToString'add the parameters acceptOrDeclineFriendship.UpdateParameters.Add("Response", answer) acceptOrDeclineFriendship.UpdateParameters.Add("FriendID", friend_id) acceptOrDeclineFriendship.Update()End Sub

Since the buttons are being created dynamically, this is how i track 1. the response from the currently logged in user 'Accept/Decline' and 2. who they are responding to (by their uniqueid)

This relates to a sqlDataSource on my .aspx page like this:

<!-- update query when user has accepted the friendship --> <asp:SqlDataSource ID="acceptOrDeclineFriendship" runat="server" ConnectionString="<%$ xxx%>" UpdateCommand="UPDATE Friends SET (ApprovedByFriend = @.Response) WHERE (FriendID = @.UserID) AND (UserID = @.FriendID)"> <UpdateParameters> <asp:ControlParameter Name="UserID" ControlID="userIdValue" /> </UpdateParameters> </asp:SqlDataSource>

Which is meant to update my 'Friends' table to show that 'ApprovedByFriend' (the logged in user) is either 'Accept' or 'Decline', and record who's request was responded to.

I hope this is clear, just trying to suppy all of the information! The error appears to be saying that I have an issue with my code-behind, where i am telling the sqlDataSource above to UPDATE. What I can say is that for each button in the repeater, the 2 variables 'friend_id' and 'answer' are picking up the correct values.

Can anyone see any obvious problems here? Any help is very much appreciated as i am well and truley stuck!


Hi all

after all that I figured out it was a simple syntax issue.

UpdateCommand="UPDATE Friends SET ApprovedByFriend = @.Response WHERE (FriendID = @.UserID) AND (UserID = @.FriendID)">
I had some brackets around the SET conditionEmbarrassed

Friday, February 17, 2012

Error

Dear All
I am getting this error during indexing on the table. What should i do to
solve this problem
Server: Msg 8946, Level 16, State 12, Line 2
Table error: Allocation page (1:48528) has invalid PFS_PAGE page header
values. Type is 0. Check type, object ID and page ID on the page.
Server: Msg 8939, Level 16, State 1, Line 1
Table error: Object ID -1, index ID 65535, page (1:48528). Test (IS_ON
(BUF_IOERR, bp->bstat) && bp->berrcode) failed. Values are 2057 and -1.
Server: Msg 8921, Level 16, State 1, Line 1
CHECKTABLE terminated. A failure was detected while collecting facts.
Possibly tempdb out of space or a system table is inconsistent. Check
previous errors.
Server: Msg 8998, Level 16, State 1, Line 1
Page errors on the GAM, SGAM, or PFS pages do not allow CHECKALLOC to verify
database ID 15 pages from (1:48528) to (1:56615). See other errors for cause
.
The repair level on the DBCC statement caused this repair to be
bypassed.
CHECKDB found 1 allocation errors and 0 consistency errors in table '(Object
ID -1)' (object ID -1).
DBCC results for 'infodrive_query'.
The repair level on the DBCC statement caused this repair to be
bypassed.
CHECKDB found 1 allocation errors and 0 consistency errors not associated
with any single object.
DBCC results for 'sysobjects'.
There are 87 rows in 1 pages for object 'sysobjects'.
CHECKDB found 2 allocation errors and 0 consistency errors in database
'Infodrive_Query'.
DBCC execution completed. If DBCC printed error messages, contact your
system administrator.
Thanks & regards
Manoj kumarManoj
> CHECKTABLE terminated. A failure was detected while collecting facts.
> Possibly tempdb out of space or a system table is inconsistent. Check
> previous errors.
Check these above options. I assume you don't create an index on system
table.
Identify what is the object that has corrupted index. Drop this index and
try re-create again
"Manoj" <Manoj@.discussions.microsoft.com> wrote in message
news:6C43A8D4-4FE3-4303-8E51-64D436CB33CE@.microsoft.com...
> Dear All
> I am getting this error during indexing on the table. What should i do to
> solve this problem
>
> Server: Msg 8946, Level 16, State 12, Line 2
> Table error: Allocation page (1:48528) has invalid PFS_PAGE page header
> values. Type is 0. Check type, object ID and page ID on the page.
> Server: Msg 8939, Level 16, State 1, Line 1
> Table error: Object ID -1, index ID 65535, page (1:48528). Test (IS_ON
> (BUF_IOERR, bp->bstat) && bp->berrcode) failed. Values are 2057
> and -1.
> Server: Msg 8921, Level 16, State 1, Line 1
> CHECKTABLE terminated. A failure was detected while collecting facts.
> Possibly tempdb out of space or a system table is inconsistent. Check
> previous errors.
> Server: Msg 8998, Level 16, State 1, Line 1
> Page errors on the GAM, SGAM, or PFS pages do not allow CHECKALLOC to
> verify
> database ID 15 pages from (1:48528) to (1:56615). See other errors for
> cause.
> The repair level on the DBCC statement caused this repair to be
> bypassed.
> CHECKDB found 1 allocation errors and 0 consistency errors in table
> '(Object
> ID -1)' (object ID -1).
> DBCC results for 'infodrive_query'.
> The repair level on the DBCC statement caused this repair to be
> bypassed.
> CHECKDB found 1 allocation errors and 0 consistency errors not associated
> with any single object.
> DBCC results for 'sysobjects'.
> There are 87 rows in 1 pages for object 'sysobjects'.
> CHECKDB found 2 allocation errors and 0 consistency errors in database
> 'Infodrive_Query'.
> DBCC execution completed. If DBCC printed error messages, contact your
> system administrator.
>
> Thanks & regards
> Manoj kumar

Wednesday, February 15, 2012

erron handling

Hey Gang, got one for you.
error message:
Server: Msg 137, Level 15, State 2, Line 19
Must declare the variable '@.EFFECTIVE_DATE'.
Code:
SELECT LOG_PK,
LOG_REQUESTOR,
LOG_REQ_PHONE,
LOG_CHAR_60_1,
LOG_CHAR_30_4,
LOG_CN_FK,
LOG_CREATE_DATE,
LOG_REQUEST,
(LOG_STATUS),
(LOG_TYPE),
LOG_FU_FK,
LOG_FB_PK,
LOG_LT_FK,
LOG_CREATE_DATE
FROM f_Requests
WHERE LOG_RQ_FK IS NOT NULL AND
LOG_LT_FK <> 10174 AND
LOG_RC_CODE = S
AND (LOG_MOD_DATE > @.EFFECTIVE_DATE OR
LOG_CREATE_DATE > @.EFFECTIVE_DATE)Hi Garry

Is that all the code? If so then - the error message is a good clue - you need to declare (and set) a variable called @.EFFECTIVE_DATE - probably of SmallDateTime or DateTime type (check the schema you are comparing it against).

HTH|||Gary, I gotta ask...
Almost all your previous posts have been in the recruitment forum. Why are you suddenly asking basic TSQL questions?|||You really wont to know. Almost 5 months ago I was working as with both oracle and Sql server as a dba. I've been doing this for a long time but know since the accident my memory is almost 50%. I litterly had people come to see me in the hospital and did'nt know who they are. The Dr. says it will get better. Why do you think my post stop. That's the story. I need al the help I can get to get back to were I was. This is the starting point.|||Hi Garry,
Thanks for the reply through pm.
Check this out...

declare @.EFFECTIVE_DATE datetime

set @.EFFECTIVE_DATE ='GIVE YOUR DATE HERE' -- or pass your date using
-- this variable

SELECT LOG_PK,
LOG_REQUESTOR,
LOG_REQ_PHONE,
LOG_CHAR_60_1,
LOG_CHAR_30_4,
LOG_CN_FK,
LOG_CREATE_DATE,
LOG_REQUEST,
(LOG_STATUS),
(LOG_TYPE),
LOG_FU_FK,
LOG_FB_PK,
LOG_LT_FK,
LOG_CREATE_DATE
FROM f_Requests
WHERE LOG_RQ_FK IS NOT NULL AND
LOG_LT_FK <> 10174 AND
LOG_RC_CODE = S
AND (LOG_MOD_DATE > @.EFFECTIVE_DATE OR
LOG_CREATE_DATE > @.EFFECTIVE_DATE)

Thanks again for the pm :)|||You really wont to know. Almost 5 months ago I was working as with both oracle and Sql server as a dba. I've been doing this for a long time but know since the accident my memory is almost 50%. I litterly had people come to see me in the hospital and did'nt know who they are. The Dr. says it will get better. Why do you think my post stop. That's the story. I need al the help I can get to get back to were I was. This is the starting point.
If you're being straight with us, you'll get a lot of support here. If you're not, well, gloves come off.|||yeah, it's the truth. Who want to put that out there|||Okey-doke. Post away.

Erro 15138

I have this error message while trying to remove a user.
What should I do now?
Msg 15138, Level 16, State 1, Line 2
The database principal owns a schema in the database, and cannot be dropped.
TIA,
GunRemove the schema first (DROP SCHEMA), or change the owner of the schema (ALTER AUTHORIZATION).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Gunawan" <jgun98.milis@.gmail.com> wrote in message news:u8M%23kNIXHHA.3948@.TK2MSFTNGP05.phx.gbl...
>I have this error message while trying to remove a user.
> What should I do now?
> Msg 15138, Level 16, State 1, Line 2
> The database principal owns a schema in the database, and cannot be dropped.
> TIA,
> Gun
>

Erro 15138

I have this error message while trying to remove a user.
What should I do now?
Msg 15138, Level 16, State 1, Line 2
The database principal owns a schema in the database, and cannot be dropped.
TIA,
GunRemove the schema first (DROP SCHEMA), or change the owner of the schema (AL
TER AUTHORIZATION).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"Gunawan" <jgun98.milis@.gmail.com> wrote in message news:u8M%23kNIXHHA.3948@.TK2MSFTNGP05.phx
.gbl...
>I have this error message while trying to remove a user.
> What should I do now?
> Msg 15138, Level 16, State 1, Line 2
> The database principal owns a schema in the database, and cannot be droppe
d.
> TIA,
> Gun
>