Showing posts with label report. Show all posts
Showing posts with label report. Show all posts

Thursday, March 29, 2012

Error accessing registry value in report

We store environment specific information in the registry to ease moving from
dev, test and production environments. I'm making a call in the code window
to read from the registry and am getting this error:
Failed to load expression host assembly. Details: Request for the permission
of type System.Security.Permissions.RegistryPermission, mscorlib,
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
(rsProcessingError) Get Online Help
Just as a test I've changed all code access security zones to Full Trust but
this hasn't helped.
Please advise.This is what I had to do to get this working, if anyone's interested:
Edit C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportServer\rssrvpolicy.config and modify the entry in the
Report_Expressions_Default_Permissions CodeGroup and change it from Execute
to FullTrust.
"Aaron" wrote:
> We store environment specific information in the registry to ease moving from
> dev, test and production environments. I'm making a call in the code window
> to read from the registry and am getting this error:
> Failed to load expression host assembly. Details: Request for the permission
> of type System.Security.Permissions.RegistryPermission, mscorlib,
> Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 failed.
> (rsProcessingError) Get Online Help
> Just as a test I've changed all code access security zones to Full Trust but
> this hasn't helped.
> Please advise.
>|||Giving FullTrust to Report_Expressions_Default_Permissions totally opens
your server for hacker attacks. Now all expressions incliding VB.NET
snippets in Report.Code have fulltrust which allows them to perform any
operations, including formatting drives, reading and writing files etc...
The better way is to create a custom assembly with functions to read
registry and call this assembly from your reports. You will then give only
RegistryPermission to that assembly.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Aaron" <Aaron@.discussions.microsoft.com> wrote in message
news:281FF58C-043F-40DA-AFCF-4C413BFC2A49@.microsoft.com...
> This is what I had to do to get this working, if anyone's interested:
> Edit C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
> Services\ReportServer\rssrvpolicy.config and modify the entry in the
> Report_Expressions_Default_Permissions CodeGroup and change it from
Execute
> to FullTrust.
>
> "Aaron" wrote:
> > We store environment specific information in the registry to ease moving
from
> > dev, test and production environments. I'm making a call in the code
window
> > to read from the registry and am getting this error:
> >
> > Failed to load expression host assembly. Details: Request for the
permission
> > of type System.Security.Permissions.RegistryPermission, mscorlib,
> > Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
failed.
> > (rsProcessingError) Get Online Help
> >
> > Just as a test I've changed all code access security zones to Full Trust
but
> > this hasn't helped.
> >
> > Please advise.
> >|||Aaron I have done similar kind of thing, If your still facing the problem
write to me, I can help you out to fix the issue.
My Email ID:
balajikkrishnan [AT] rediffmail [DOT] com
Thanks
Balaji
--
Message posted via http://www.sqlmonster.comsql

Error about Report builder

I login in my server do report with report builder , when i run report , the error is:

The permissions granted to user 'ADSYSTEC-CZW\users11' are insufficient for performing this operation.

1. The server and my machine are not the same computer,My machine name is adsystec-czw.

2. The reports web site's Authentication is Integrated Windows Authentication.

3. I use the given user(users11) login in belongs to the user groups.


thanks for helps!

Since you are saying you get the error when running the report, I am assuming you have no problem launching Report Builder, viewing Models, and creating and saving a Report to the server. Have you tried running your report directly from the server, after saving it there?

It sounds like your problem may be that the datasource your report uses is not set up correctly. If the data you are trying to retrieve is on a different server than your Report Server, you may need to check the "Use Windows credentials" checkbox in (ie. edit your Datasource in Report Manager).

|||I login in the server's report builder with the URL http://adsystec-czw/reportserver/reportbuilder/reportbuilder.application If I use the server's administrators to login in the server's report server, That error doesn't exist.

Sunday, March 11, 2012

Error 534 trying to run report

I have written a report in the Crystal IDE that runs fine. It is using OLE DB to a SQL Server database. When I then try to run that report at runtime, outside of Crystal, I get an error 534 returned. I am using the CPRE32 API and I am using version 8.5.Try looking up the error number or error description on www.google.com or on Crystal's Website: http://support.businessobjects.com/search/advsearch.asp|||I have done both of those. There is quite a bit of good information out there. But none of it so far has helped me. I recently tried switching from using P2SOLEDB.DLL to P2SSQL.DLL just to see what would happen, but I still get 534...|||Have you verified database?I usually get error 534 when database verification is needed.|||I will post this info here in hopes that it will help others who search for this problem.

The solution to my 534 problem was to use the PESetNthTableLocation API call. I had to call Crystal support to get this information.

The problem was caused by my changing database names at runtime.

I wrote all my reports to report on database "A", so to Crystal, the database "location" was "A.dbo.tablename". Then, at runtime, if the user of my application was running the reports on database "B", I was calling PESetNthTableLogOnInfo and setting the database to "B". However, according to Crystal support, sometimes that is not enough. Sometimes you also have to change the database location. So, once I called PESetNthTableLocation (setting it to "B.dbo.tablename") in addition to PESetNthTableLogOnInfo, it worked fine...

Friday, March 9, 2012

Error 500 and Error 692 trying to export

I am trying to export a report to PDF and HTML. I am currently using Crystal Reports 8.5, and I'm using the CRPE32 API. On my development machine, this works great. I get PDF files that I can view with Acrobat, and HTML files that come up fine in IE.

However, when I run the same code on a clean machine that doesn't have Crystal installed, I get error 500 returned after PEStartJob fails if I try to export to PDF, and I get error 692 when trying to export to HTML.

I did a search on the web, and there is an article that says error 692 if for unsupported export types, specifically HTML 3.0, which was stopped supporting as of Crystal 8. But, I am trying to export in HTML 4.0, which, like I said before, works fine on my dev box.

The error 500 means out of memory, but it's really just the catch all error code. Crystal sends back error 500 for many, many reasons.

So, it seems like maybe a DLL mismatch or missing DLL or something, but I can't track it down. Anyone have any ideas?You have to make sure you install all the necessary Export dlls on the new machine. Crystal reports 8.5 includes a file called runtime.hlp that lists all of the files needed. You're probably just missing a key dll or something.|||i've looked at the runtime.hlp file, and to the best of my knowledge, all the export dlls are there, with the same date/time stamps as the ones on my dev box|||Okay, I figured out the error 500 problem. I was missing the msvcp71.dll and msvcr71.dll.

But, I'm still having the error 692 problem...|||Look at this:

http://support.businessobjects.com/library/kbase/articles/c2006853.asp

Wednesday, March 7, 2012

Error 404 Report Manager

It seems that nobody has detailed knowledge on this issue. I've read other
postings and found nothing useful. I had no problem accessing report manager
for a long time, and then all of a sudden I get HTTP 404 error OBject Not
Found. Nothing was changed in IIS, Reports virtual directory, and I'm not
using SSL.
If anyone has any actual experience in successfully fixing this problem
(other than reinstall), please please reply to this. I'm sure lots of other
people will benefit from it.
Any links to related & useful documentation are also welcomed.
Thanks a lot.
A FuI take it you verified that the Virtual Directories are still setup in IIS?
VDir: reports
Path: C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportManager (default)
Default Page: home.aspx
VDir: reportserver
Path: C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\ReportServer (default)
There are some other settings of course, if you need I can save the config
to an xml file so you can compare them or import them.
Michael
"A Fu" <A Fu@.discussions.microsoft.com> wrote in message
news:99899F45-632D-4A16-B600-FAFB9B503BC3@.microsoft.com...
> It seems that nobody has detailed knowledge on this issue. I've read other
> postings and found nothing useful. I had no problem accessing report
> manager
> for a long time, and then all of a sudden I get HTTP 404 error OBject Not
> Found. Nothing was changed in IIS, Reports virtual directory, and I'm not
> using SSL.
> If anyone has any actual experience in successfully fixing this problem
> (other than reinstall), please please reply to this. I'm sure lots of
> other
> people will benefit from it.
> Any links to related & useful documentation are also welcomed.
> Thanks a lot.
> A Fu|||Yes, all the paths are set correctly. It seems that the URL virtual path:
"http://www.somesite.com/reports/Pages/Folder.aspx" is wrong. But I have no
problem accessing "http://www.somesite.com/ReportServer".
Is there any other way to upload reports to the RS server, other than thro'
Report Manager & VS.NET?
If you could give me the xml file, that would be great.
Thanks a lot.
"Michael" wrote:
> I take it you verified that the Virtual Directories are still setup in IIS?
> VDir: reports
> Path: C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
> Services\ReportManager (default)
> Default Page: home.aspx
> VDir: reportserver
> Path: C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
> Services\ReportServer (default)
> There are some other settings of course, if you need I can save the config
> to an xml file so you can compare them or import them.
> Michael
> "A Fu" <A Fu@.discussions.microsoft.com> wrote in message
> news:99899F45-632D-4A16-B600-FAFB9B503BC3@.microsoft.com...
> > It seems that nobody has detailed knowledge on this issue. I've read other
> > postings and found nothing useful. I had no problem accessing report
> > manager
> > for a long time, and then all of a sudden I get HTTP 404 error OBject Not
> > Found. Nothing was changed in IIS, Reports virtual directory, and I'm not
> > using SSL.
> >
> > If anyone has any actual experience in successfully fixing this problem
> > (other than reinstall), please please reply to this. I'm sure lots of
> > other
> > people will benefit from it.
> >
> > Any links to related & useful documentation are also welcomed.
> >
> > Thanks a lot.
> >
> > A Fu
>
>|||Found the solution to the error 404.
There is a rswebapplication.config file in the reportmanager folder of
reporting services
Change the http://servername/reportserver to
http://servername:8080/reportserver
That's it.
"A Fu" wrote:
> It seems that nobody has detailed knowledge on this issue. I've read other
> postings and found nothing useful. I had no problem accessing report manager
> for a long time, and then all of a sudden I get HTTP 404 error OBject Not
> Found. Nothing was changed in IIS, Reports virtual directory, and I'm not
> using SSL.
> If anyone has any actual experience in successfully fixing this problem
> (other than reinstall), please please reply to this. I'm sure lots of other
> people will benefit from it.
> Any links to related & useful documentation are also welcomed.
> Thanks a lot.
> A Fu

Error 40 : Unable to open connection and Security Issue

Hi,

When I am using "Windows Integrated Security" to connect to the database from the Report Manager... I am arriving at the "Error:40 Could not open a connection to SQL Server"

Can anyone help me in this issue??

Thanks and regards,

Praveen Kumar Mynamcould you pass few more details.

It is very difficult to predict what is happening at your side and give any solution.

Sunday, February 19, 2012

error 241: Syntax error converting datetime from character string

Hi All, can someone help me,
i've created a stored procedure to make a report by calling it from a website.
I get the message error "241: Syntax error converting datetime from character string" all the time, i tryed some converting things but nothig works, probably it is me that isn't working but i hope someone can help me.
The code i use is:

CREATE proc CP_Cashbox @.mID varchar,@.startdate datetime,@.enddate datetime
as
set dateformat dmy
go
declare @.startdate as varchar
declare @.enddate as varchar

--print "query aan het uitvoeren"

select sum(moneyout) / sum(moneyin)*100 as cashbox
from dbo.total
where machineID = '@.mID' and njdate between '@.startdate' and '@.enddate'
GO

Thanx in front
CyaOriginally posted by Wimmo
Hi All, can someone help me,
i've created a stored procedure to make a report by calling it from a website.
I get the message error "241: Syntax error converting datetime from character string" all the time, i tryed some converting things but nothig works, probably it is me that isn't working but i hope someone can help me.
The code i use is:

CREATE proc CP_Cashbox @.mID varchar,@.startdate datetime,@.enddate datetime
as
set dateformat dmy
go
declare @.startdate as varchar
declare @.enddate as varchar

--print "query aan het uitvoeren"

select sum(moneyout) / sum(moneyin)*100 as cashbox
from dbo.total
where machineID = '@.mID' and njdate between '@.startdate' and '@.enddate'
GO

Thanx in front
Cya

Simple ... just run this command

sp_helptext cp_cashbox

and you will understand.|||Thanx, i tried what you said but it returns the sp code,
which i edited to

CREATE proc CP_Cashbox @.mID varchar,@.startdate datetime,@.enddate datetime
as


select sum(moneyout) / sum(moneyin)*100 as cashbox
from dbo.total
where machineID = '@.mID' and njdate between '@.startdate' and '@.enddate'

but when i exec it now it returns with the same error as before

the exec command i use is:

exec CP_cashbox @.mID = '10001', @.startdate = '01-01-2000', @.enddate = '01-01-2004'
go

can you tell me what i do wrong?

Thanx
Regards Wim|||Originally posted by Wimmo
Thanx, i tried what you said but it returns the sp code,
which i edited to

CREATE proc CP_Cashbox @.mID varchar,@.startdate datetime,@.enddate datetime
as


select sum(moneyout) / sum(moneyin)*100 as cashbox
from dbo.total
where machineID = '@.mID' and njdate between '@.startdate' and '@.enddate'

but when i exec it now it returns with the same error as before

the exec command i use is:

exec CP_cashbox @.mID = '10001', @.startdate = '01-01-2000', @.enddate = '01-01-2004'
go

can you tell me what i do wrong?

Thanx
Regards Wim

Sorry ... should have seen it first time around

select sum(moneyout) / sum(moneyin)*100 as cashbox
from dbo.total
where machineID = @.mID and njdate between @.startdate and @.enddate|||thanx that solves the error,
but the strangest thing happened,
when i exec the sp wit the next code:

exec CP_cashbox @.mID = '10001',@.startdate ='01-01-2000',@.enddate = '01-01-2004'

it returns with a Null value

now when i make a query with the same values it returns the correct value. the query i use is :

select sum(moneyout) / sum(moneyin)*100 as cashbox
from dbo.total
where machineID = '10001' and njdate between '01-01-2000' and '01-01-2004'

What am i doing wrong

Thanx for your precious time
Greet Wim|||try this :

select sum(moneyout) / sum(moneyin)*100 as cashbox
from dbo.total
where machineID = @.mID and convert(varchar,njdate,121) between convert(varchar,@.startdate,121) and convert(varchar,@.enddate,121)|||Originally posted by Enigma
try this :

select sum(moneyout) / sum(moneyin)*100 as cashbox
from dbo.total
where machineID = @.mID and convert(varchar,njdate,121) between convert(varchar,@.startdate,121) and convert(varchar,@.enddate,121)


it returns the annoying NULL value again|||Can you paste the DDL of the table ...

CREATE proc CP_Cashbox @.mID varchar(x),@.startdate datetime,@.enddate datetime

where x is the width of the machine_id column in your table|||Originally posted by Enigma
Can you paste the DDL of the table ...

CREATE proc CP_Cashbox @.mID varchar(x),@.startdate datetime,@.enddate datetime

where x is the width of the machine_id column in your table

What is DDL?
the with of the machin_id column is 10|||So .. this should work for you

CREATE proc CP_Cashbox
@.mID varchar(10),
@.startdate datetime,
@.enddate datetime
as
select sum(moneyout) / sum(moneyin)*100 as cashbox
from dbo.total
where
machineID = @.mID
and convert(varchar,njdate,121)
between convert(varchar,@.startdate,121)
and convert(varchar,@.enddate,121)|||Thanx alot man i inserted the with of the machine_id column and now it is working. Thanx to your help i really lose some stress today.

Greet Wim:) :) :cool:|||DBA's dont take stress .. they are some of the coolest persons I have seen ... i personally havent seen a dba fuming in public.|||You are completely right, and i am kinda new to this stuf so i am in the proces of becoming on of the coolest!|||Any time you need help you can rely on some of the best dba's i ve known on this site ... especially ... Brett Kaiser, blindman, rnealjr and satya

i myself rely a lot on this site in emergencies|||Originally posted by Enigma
Any time you need help you can rely on some of the best dba's i ve known on this site ... especially ... Brett Kaiser, blindman, rnealjr and satya

i myself rely a lot on this site in emergencies

Thanx for the tip, i think i gonna need some more help in the near future.

Wednesday, February 15, 2012

Error 20535

I'm running VB6, Crystal 8.0, and Access 2000. The Crystal Report does a dump of an Access table. My VB6 program calls the Crystal Report like this:

MyForm.MyCrystalControl.ReportFileName = "C:\MyReport.rpt"
MyForm.MyCrystalControl.Action = 1

When I run the program, I get the error "20535 : Unable to Connect : Incorrect Session Parameters".

There is no password on the database.
There are no subqueries or subreports in the Crystal Report.
It is a very simple report.
It works fine on my Win XP Pro development PC. It gives me this error message on my Win XP Pro deployment PC.

This is driving me nuts! Anyone give me a solution? I've looked all through the Crystal Reports website solutions, but none of them helped.

Thanks in advanceWell, this just gets weirder by the minute. I changed the Access database to the Access 97 format, and gave it a new name. When I tried to run the report again, it said it couldn't find the database, and asked me to identify it. I gave it the new Access 97 database, and then the report ran absolutely fine on the deployment PC.

So, with no other changes made, it appears that Crystal Reports 8 just doesn't want to work with an Access 2000 database. Can anyone tell me why, and how I can solve that problem?

Thanks

Error 20533 "Unable to open Database"

HI there,
1. I use VB 6 and CR 8.5. I've got a CR report that uses 2 databases that is linked together, one database is over at the network site and another one is in my PC. I've tried calling rpt file individually( one for network database, without linking and another one at PC) and it worked fine. When I put up the 2 reports together, The error appears Run time error 20533. Unable to open database.
With cr
.WindowShowRefreshBtn = True
.WindowShowPrintSetupBtn = True
.DataFiles(0) = "\\bla\bla\bla\bla.Mdb"
.LogonInfo(0) = "DSN=;UID=;PWD=bla;DSQ ="
.DataFiles(1) = "C:\bla\bla\bla\bla2.Mdb"
.LogonInfo(1) = "DSN=;UID=;PWD=bla;DSQ ="

.ReportFileName = App.Path & "\bla.Rpt"
.WindowState = crptMaximized
.Destination = crptToWindow
.Action = 1
End With

2. I've got 2 tables. One table contains field "Code" and "Name"
Another table contains TransactionNo, Date, Code1 and Code2.
Code1 and Code2 both link to the first table field "Code"
So how am I going to display Name of Code1 and Name of Code2 in Crystal Report ?
Thanks a lot for your help.Just one report - no subreports?

Are you passing an SQL statement via SelectionFormula property?
If so, what is it.

Dave|||No selectionformula