Showing posts with label project. Show all posts
Showing posts with label project. Show all posts

Tuesday, March 20, 2012

:( Please Help Needed on Printing Report in RS

Hi All Experts,
I caught in a big problem, previosly our application was using Crystal
Report, but on my suggestion Project Manager changed the reporting tool
for next client and we are decided to use RS and removed CR from our
application.
There are 50 Reports, we designed it well and we dont find any
problems. But out of those reports, two reports are autoprint reports.
The scenario is, i want to print a report which accepts parameter
without user interaction (there might be any number of pages) at server
side (This is a Major Feature of our application). I used Printer
Deliver Sample, but it is time or data driven , but i want to do this
job through my code, means at certain line of code i have to print the
report. Also Delivery Extension uses static parameter, how do i change
it runtime? I also used RsClientprint but it shows printer dialog which
i dont want to show.
Please help me, all eyes in my team are looking towards me like i did a
wrong decision. I am very thankful to all if i receive the solution.
Thank You
Regards
Rajone thing i forgot, i want to print this report in Printed Stationary
with duplicate on same page, means i have to set right, left, top and
bottom margin, i used ReportRender Method, in which i converted report
into EMF and send the stream to printer but i am not able to set
margins, also i am not getting report print what i designed|||Raj,
The "Print a report from a console app" download from this site might
be of help to you. http://www.gotreportviewer.com/
Andy Pottersql

Monday, March 19, 2012

.SQL file

I have install.sql, that i want to run...so I can add to my existing asp.net 2.0 project. How do can I add the table to my database using that file (contents below)? Database resides in SQL Server 2000.

create table[dbo].[CustomProfile](

[UserID] [uniqueidentifier]not null,

[FirstName] [nvarchar](25)not null,

[LastName] [nvarchar](25)not null,

[Address1] [nvarchar](75)not null,

[Address2] [nvarchar](75)null,

[City] [nvarchar](50)not null,

[State] [nvarchar](2)not null,

[Zip] [nvarchar](10)not null,

[Phone] [nvarchar](12)null,

[ProfileVersion] [int]not null,

[LastUpdatedDate] [datetime]not null

)on[PRIMARY]

alter table[dbo].[CustomProfile]add

constraint[PK_CustomProfile_UserProfile]primary key clustered

(

[UserID]

)with(IGNORE_DUP_KEY =OFF)on[PRIMARY]

Easiest way is to run it in the Query Analyzer. Open up SQL management tools, connect to the sevrver/db of your choice. Then you start the Query Analyzer (or new Query if it's 2005) from a menu. There you can paste the code and just click the green arrow to execute it. Voila!

|||

Thanks for the suggestion. However, I got the following error listed below. Any idea?

Msg 170, Level 15, State 1, Line 19

Line 19: Incorrect syntax near '('.

|||

I removed 'with(IGNORE_DUP_KEY =OFF)on[PRIMARY]'....and it worked. Is this not an SQL option?

Thanks again for your help.

|||

johram:

Easiest way is to run it in the Query Analyzer. Open up SQL management tools, connect to the sevrver/db of your choice. Then you start the Query Analyzer (or new Query if it's 2005) from a menu. There you can paste the code and just click the green arrow to execute it. Voila!

In a perfect world, perhaps...Wink

The OP is saying he needs to create the table on SQL 2000. The script wil fail at the end ".. WITH (IGNORE_DUP_KEY).. " part. This is 2005 syntax. I believe the script was generated from Management Studio connected to 2000 box?

.sdf deployment problem VS2005

I have .sdf and .xds objects in my project for a PocketPC 2003 device. When I debug all of the CF2.0, SQL, and .SDF files are downloaded to the device. However, when I install via the application.cab file, the .sdf, .xds, and CF files do not show up on the device.

What am I missing here?

First ensure that your SDF has Build Action set to 'Content' and Copy to Output Directory = True in your project. When you then create a Smart Device Setup Project in VS2005 to create the CAB file for deployment, you need to include the project output AND the content files from your project in the setup project.

Darren

|||

After installing the CF, SQL and application cabs the .sdf file is in the correct folder. However, I am unable to open the .sdf via the application or SQLce Query Analyzer. I get the following message:

Error:0x80004005 E_FAIL

Native Error: (25039)

Description : Access to the database file is not allowe, {,,,File name,,]

Interface defining error: IID_IDBInitialize

Param. 0:0

Param. 1:0

Param. 2:0

Param. 3 \Program Files\Myapplication folder\myapplication.sdf

Param. 4:

Param.

I am still missing something. What?

|||I think I found the problem(s). A) On the device I removed SQLClient2.0. B) In VS I rebuilt .sdf and .xsd. Now it works. I think the .sdf that I replace in VS was based on CF1.0|||

cool. thanks for posting your solution.

-Darren

Thursday, March 8, 2012

.Net integration with SQL Reporting Services

We are working on a project that includes the development of business classes
to contain all our data access routines. The goal is to be avoid writing
numerous sql statements (some quite complex and some duplicative) in SQL
Reporting Services, forms development etc..
We've tested this model in .Net 2005 using the Report Viewer control and
have a successful pilot. The data access class returns a data set(s) that we
use in the Report Viewer. We would like to move this model to use Reporting
Services.
The question is:
We will compile our data access classes into a dll. We would like to be
able to reference the data access class and return a data set(s) that can be
used by Reporting Services designer. So far we have not figured out how to
do this.
Any suggestions or tips? Thx,your starting point:
http://msdn2.microsoft.com/en-us/library/ms154655.aspx
also you'll found a sample data extension in the official SQL Server website
(part of the samples for SQL 2005)
"def59485" <def59485@.discussions.microsoft.com> wrote in message
news:C3079CEB-6497-46AC-8949-44975EA320A2@.microsoft.com...
> We are working on a project that includes the development of business
> classes
> to contain all our data access routines. The goal is to be avoid writing
> numerous sql statements (some quite complex and some duplicative) in SQL
> Reporting Services, forms development etc..
> We've tested this model in .Net 2005 using the Report Viewer control and
> have a successful pilot. The data access class returns a data set(s) that
> we
> use in the Report Viewer. We would like to move this model to use
> Reporting
> Services.
> The question is:
> We will compile our data access classes into a dll. We would like to be
> able to reference the data access class and return a data set(s) that can
> be
> used by Reporting Services designer. So far we have not figured out how
> to
> do this.
> Any suggestions or tips? Thx,

.Net Deployment ....

Hi everybody,

I want install the project in client side .. In installation time i want to access the my server .. How i can make the setup file to access the internet.. please help me.....

Thanks & Regards,

S.Sajan

Not only is that NOT a good idea, many users will have firewalls that may keep your installation from accessing the internet.

See my post to your previous question for information about remote and unattended installations.

Tuesday, March 6, 2012

.NET CLR stored procedure capabilities

I've want to create a typed DataSet and use it inside a .NET CLR stored
procedure. But the option to add a typed DataSet to the project
doesn't exist. Am I missing something? Or are .NET CLR stored
procedures not all they're hyped up to be?
Toddtoddpiltingsrud@.altoconsulting.com wrote in
news:1132776964.626979.93470@.g47g2000cwa.googlegroups.com:
> I've want to create a typed DataSet and use it inside a .NET CLR
> stored procedure. But the option to add a typed DataSet to the
> project doesn't exist. Am I missing something? Or are .NET CLR
> stored procedures not all they're hyped up to be?
Course you can create a typed DataSet and use it in SQLCLR. Younhave to
create it manually though instead of drag 'n drop.
Just out of curiousity; why do you want a typed dataset inside SQL
Server?
Niels
**************************************************
* Niels Berglund
* http://staff.develop.com/nielsb
* nielsb@.no-spam.develop.com
* "A First Look at SQL Server 2005 for Developers"
* http://www.awprofessional.com/title/0321180593
**************************************************

.net cf class library commenting problem.

Hi All,

Now I am creating .Net CF2.0 class library project, and I have some public method which take parameters. And I commented those method using following tag.

/// <summary>

///

/// </summary>

/// <returns></returns>

But when I add to other project where I wanted use that dll , when I create instance andcall the method it’s not giving me the description which I gave. But when I refer in the same class library project itself it’s giving outside that it’s not giving the details.

Could you please anyone to solve this problem ?

Thanks ,

Jayakumar a

Hey when you compile the DLL with the above source, compile using /doc switch of CSC.EXE which then generates an XML file.

Place this XML file in the same direction as DLL which you have referenced so that you can see intellisense. Hope this helps!

By the way, this is not the right forum for your question. Please post this type of questions to VS IDE Forums so that you get better answers!

Thanks,

Laxmi

Sunday, February 19, 2012

.adp, .ade, MSDE and security

Hi all,
I have an Access Project for the front end and a MSDE as back end. The
database is in a Server and only administrators have access to it. I've
installed a copy of the .adp on each user's computer. I plan to convert to
..ade once the project is finalized.
I have a UserName and password set up (and saved) to connect the project
file to the server.
Next, I need to set up user level security for the forms. When the project
opens, there is a login form asking for username and password, if valid a
main form (switchboard) opens. Based on the login, the user will have access
to certain areas - subforms. Administrators can open all the subforms on the
main form. Managers don't have access to the admin area. And so on.
I need a set up for the Owners of the Company to be able to manage the
permissions from the project file itself, not having to access the database
manager on the server (thanks Andrea, you saved my life with this one). Also
I have a cmd button to change the user, therefor change the permissions.
Is there a way to do this, like creating some code behind the forms, or do I
need to do it on the SQL server?
I've created a table for users with ID's, passwords and departments. Only
the Company owners should be able to access the form to update these
records...
This is an small company without any IT person around and the users need a
simple, straighforward project to use.
Any help and/or ideas will be greatly appreciated.
gaba
hi,
gaba wrote:
> Hi all,
> I have an Access Project for the front end and a MSDE as back end. The
> database is in a Server and only administrators have access to it.
> I've installed a copy of the .adp on each user's computer. I plan to
> convert to .ade once the project is finalized.
> I have a UserName and password set up (and saved) to connect the
> project file to the server.
> Next, I need to set up user level security for the forms. When the
> project opens, there is a login form asking for username and
> password, if valid a main form (switchboard) opens. Based on the
> login, the user will have access to certain areas - subforms.
> Administrators can open all the subforms on the main form. Managers
> don't have access to the admin area. And so on.
> I need a set up for the Owners of the Company to be able to manage the
> permissions from the project file itself, not having to access the
> database manager on the server (thanks Andrea, you saved my life with
> this one). Also I have a cmd button to change the user, therefor
> change the permissions.
> Is there a way to do this, like creating some code behind the forms,
> or do I need to do it on the SQL server?
> I've created a table for users with ID's, passwords and departments.
> Only the Company owners should be able to access the form to update
> these records...
> This is an small company without any IT person around and the users
> need a simple, straighforward project to use.
> Any help and/or ideas will be greatly appreciated.
I think to understand your indtroduction as you use some sort of user
defined application role...
you have a kind of hardcoded user+pwd used throughout all your app for all
your users and an internal tables referencing the "real users" to their
authorized actions...
thus you can not rely on standard SQL Server policies to block unauthorized
users to access some portions of your project...
if this is not correct, then "amen"... nice to hear you again :D
but if this is correct, you are stuck to write your own authorization
policies.. you have then to write a dialog where all "tasks" are listed and
you have to store, in your actual tables, what is granted and what is not...
you can perhaps define a relation like
tb_Users tb_Groups tb_Permissions
-- -- --
Id |--1 Id 1--| Id
Name | Name |--8 IdGroup
Pwd | |--8 IdTask
IdGroup 8--| | Enable/Disable
|
| tb_Tasks
| --
|--1 Id
Name
IdMaster
IdRif
Permission
(hope is readeble)
where you map users (8=many) to 1 group...
tb_Tasks enumerates all your "securable" activities ...
tb_Permissions stores the actual permissions referencing tb_Tasks and
tb_Groups ...
depending on your needs you can default [Enable/Disable] as desired (always
false, always true)...
or, if you need a very little and simple management, you can even drop that
column and insert a row only for denied (or granted) tasks...
relations always are 1 to many (8 stand for many :D) so that 1 user can only
be member of 1 group...
you know that you have not a "trusted" security policy as anyone can grab
oSql.exe, log in as "whatever" and perform whatever action on the database
depending on the "whatever" login's permissions... more. the "user defined
application role" must be enabled to perform whatever activitiy on the
database it self, and even probably perform backup/restore... quite large
permissions for a "normal" user..
can you reconsider the security design?
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.18.0 - DbaMgr ver 0.62.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Hi Andrea,
Nice to hear from you again. Thanks for your answer. The price of learning
under pressure...
The users of this project are going to use forms to manipulate the data.
They'll never have direct access to the database itself. The groups are going
to be
Administrator - all rights.
managers - limited rights
technicians - limited to their areas
data entry - limited to their areas
I need to design the project in a way that any of the members of these
groups can access the .ade file at any computer and get the information they
are allow to view/change. Also they need to login as another user without
leaving the database.
I'll study your ideas and how I can apply them. I was thinking on putting
some VBA code behind the login form and depending on the username and
password verify the group the user belongs to. Based on this info, I'll
disable the buttons on the main form therefore the user only can access their
areas. Is this aproach too naiive? These users don't know/care much about
computers and/or databases. The only thing they care is to access the
information quickly.
Have a nice weekend. I'll let you know if I get somewhere.
Thanks a lot,
gaba
"Andrea Montanari" wrote:

> hi,
> gaba wrote:
> I think to understand your indtroduction as you use some sort of user
> defined application role...
> you have a kind of hardcoded user+pwd used throughout all your app for all
> your users and an internal tables referencing the "real users" to their
> authorized actions...
> thus you can not rely on standard SQL Server policies to block unauthorized
> users to access some portions of your project...
> if this is not correct, then "amen"... nice to hear you again :D
> but if this is correct, you are stuck to write your own authorization
> policies.. you have then to write a dialog where all "tasks" are listed and
> you have to store, in your actual tables, what is granted and what is not...
> you can perhaps define a relation like
> tb_Users tb_Groups tb_Permissions
> -- -- --
> Id |--1 Id 1--| Id
> Name | Name |--8 IdGroup
> Pwd | |--8 IdTask
> IdGroup 8--| | Enable/Disable
> |
> | tb_Tasks
> | --
> |--1 Id
> Name
> IdMaster
> IdRif
> Permission
> (hope is readeble)
> where you map users (8=many) to 1 group...
> tb_Tasks enumerates all your "securable" activities ...
> tb_Permissions stores the actual permissions referencing tb_Tasks and
> tb_Groups ...
> depending on your needs you can default [Enable/Disable] as desired (always
> false, always true)...
> or, if you need a very little and simple management, you can even drop that
> column and insert a row only for denied (or granted) tasks...
> relations always are 1 to many (8 stand for many :D) so that 1 user can only
> be member of 1 group...
> you know that you have not a "trusted" security policy as anyone can grab
> oSql.exe, log in as "whatever" and perform whatever action on the database
> depending on the "whatever" login's permissions... more. the "user defined
> application role" must be enabled to perform whatever activitiy on the
> database it self, and even probably perform backup/restore... quite large
> permissions for a "normal" user..
> can you reconsider the security design?
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.18.0 - DbaMgr ver 0.62.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>
>

Monday, February 13, 2012

*******How to write a driver for RS?*********

Now I met this question: Our project need us must write a driver to retrive
data from file but not from database to form a report.
That is to say: I want retrive data from a text file to form a reporting
service.
How did I ?Read up on data processing extensions in RS help. It will tell you all about
it.
Bruce L-C
"Cao tt" <Caott@.discussions.microsoft.com> wrote in message
news:752AACD0-C405-49A8-8CBE-B6366AB2C1F8@.microsoft.com...
> Now I met this question: Our project need us must write a driver to
retrive
> data from file but not from database to form a report.
> That is to say: I want retrive data from a text file to form a reporting
> service.
> How did I ?
>|||Reporting Services Data Processing Extension (DP Extension). There are file
system based samples.
Basically you must implement a subset of the ADO.NET Data Provider plus some
Reporting Services extensions - the Reporting Services Data Provider to do
this using at least a Connection, Command, and DataReader. You do not have to
support SQL. It works quite nicely.