Showing posts with label objects. Show all posts
Showing posts with label objects. Show all posts

Sunday, March 25, 2012

Crystal reports using .net objects

hi

I am using VS 2005 c#.net, in that crystal reports 10.

In my requirements i have to bind the databse with two data base objests.
With using one object i am able to get that data.

CrystalReport2 cryst = new CrystalReport2();
cryst.SetDataSource(cand.GetGeneralInfo());
crystalReportViewer1.ReportSource = cryst;

this GetGeneralInfo() method is of type list.
I am binding that list to my report.

Thanks
Raghudo you want to get data from two different servers?

Thursday, March 22, 2012

Crystal Reports and Objects

I have an object called vehicle for talk sake and vehicle holds an ID for a customer

I then have an object called customer. which holds customers details

These are all in a project called project1 in visual studio 2005

I have another project project 2 with my forms etc and a crystal report.

This project has a reference to project1 however when in my crystal report is it possible for me to use the vehicle object and subsequent customer object as the source for the data and if so how is this done.If both points to same database then you can design the report having the data from those objects

Tuesday, March 20, 2012

crystal reports and business objects

Hi,

This may be a dumb question, but I haven't really been able to find an answer to it. Are Crystal Reports and Business Objects the same thing?

Also, does anyone know of any tutorials for Business Objects software online anywhere? When I google for it, I only find links on the concept of business objects and not on the software...

Thanks,
RanthalionRefer this
www.BusinessObjects.com

Crystal Reports 8.5 Objects Location Origin

Dear All, I am stuck up with a report printing in which the textfield's values are set at runtime, and the location of textfields are also set at runtime during report generation.
This report is also printing fine on normal printers. But not working on HP 9050 printer.
Usually when we specify x,y coordinates of an object by the location is calculated from upper left corner of the report page. The trend is normal in Crystal reports as well. But HP 9050 printer prints the Report from Right. (Print direction is from Right to Left). So if I have used a different pagesize in Report, and different pagesize in Printer Tray, the textfields are not printed on their x,y locations exactly.

Is there any solution to the problem?? Can we specify left and top positions of objects with upper right corner of page as origin?In such cases, the only reasonable solution is to use a printer driver that works normally. You can't battle every buggy driver in the world. Try a driver from another (older) HP printer, download a newer driver from internet, or dump the whole **** thing into the nearest trash bin. I mean it.

Thursday, March 8, 2012

Crystal Report Doubt(Subreport)

Hi,
I have inserted a Sub-Report into a Main Report. My Sub-Report is placed in the middle of the main report i.e there are Text objects in the main report placed in such a way that some of the Text objects of the main report are on top of the Sub-Report and some others are at the bottom of the Sub-Report. When I populate the sub-report and the main report with data...

I have 2 scenarios :

Scenario 1 :
If my Sub-Report has very less data(say only one Row) then, I want the Text objects of the main report to move up, without leaving any gap/space that I allocated for my Sub-Report.


Scenario 2 :
If my Sub-Report has more data(say 20 Rows) then, I want the Text objects of the main report to scroll/move down .

I have tried using the "Can Grow" option in the Format section of the subreport, but it is not working properly, ie if there are more rows then the rows of the subreport are overlaping with the rows/Text Objects that I placed in the Main Report and the rows of the sub-report are moving to the right.

Awaiting for ur reply.Hi,
You have to set can grow for the sub report. Put your text in a new section below subreport. For example if your sub report is in details section then you can create one more details section and put your required text in this new section. and use fit to section.

bye

Thursday, February 16, 2012

Cross Referance dB objects accross store procs

We are in the midst of cleaning up database01. There are objects in database01 that are widely used in store procedures that reside in database02.

Problem is: I need to know which tables and view from database01 are in use by store procedures in database02. This is important because if I accidently decommission tables that are currently in use by production class s-procedures, it will not be pretty. A sample output could look like:

StoreProc UsingObject
sp001 ctblCodeName
sp002 tblUnitSales
so003 tblSalesTrans
.......... .................

I am not a programmer and none of our programmers here claim that there is any solution to this problem without spending thousands on s/w licenses. Any simple solution + code snippet that will help me resolve this problem by myself would be incredibly valuable.

In disstress and frustration . . . .

JJOSHI

Hi JJOSHI,

There is no full-proof method of finding this information, though you could try a couple of things to get some pointers:

1) Check the sys.sql_dependencies catalog view for information (see books online for more information, if this is Sql 2005)

2) Try searching through the syscomments table (which is the table that holds the definition for all code modules in Sql)

Note that this doesn't capture references of things like foreign keys, constraints, etc....

There are some 3rd party components that try to give you this information, but MS doesn't guarantee this information, and supportability would be only through that company.

For searching through the syscomments, you could try something like this (NOT SUPPORTED IN ANY WAY BY ANYONE):

declare @.name varchar(500), @.sql varchar(1000)

select @.name = '%' + '<put object name here>' + '%'

-- Any jobs with it?

select j.name as JobName, s.step_name, s.command, s.database_name, j.enabled

from msdb.dbo.sysjobsteps s

join msdb.dbo.sysjobs j

on j.job_id = s.job_id

where command like(@.name)

-- Any db's reference it?

select @.sql = 'use [?] select object_name(id) as objectname, db_name() as dbname, substring(text, patindex(''' + @.name + ''', text) - 20,150) from syscomments where text like(''' + @.name + ''')'

exec master.dbo.sp_MSforeachdb @.sql

|||

To add to what has already been said, in 2005, you can use the object_definition function. I had written a blog about this a while back (http://drsql.spaces.live.com/blog/cns!80677FB08B3162E4!1139.entry) to cover something like this. Since object_definition includes the whole object text in a single part (syscomments breaks it up into chunks in 2000) you can use a query like:

DECLARE @.value nvarchar(128)
SET @.value = '<databaseName>.'

SELECT cast(schema_name(schema_id) + '.' + name AS varchar(60)) AS name,
cast(type_desc AS varchar(20)) AS type , create_date,
modify_date,
char(13) + char(10)
+ '--select object_definition(' + cast(object_id as varchar(10)) + ') as [' + name + ']'
FROM sys.objects
WHERE charindex(@.value,replace(replace(object_definition(object_id),'[',''),']','')) > 0

The replaces get rid of brackets [] and then if you are looking for the database name plus the dot, you should find all references.

"This is important because if I accidently decommission tables that are currently in use by production class s-procedures, it will not be pretty."

I certainly hope you are planning on testing this first :) At the very least, you are demonstrating one great thing about susing all stored procedure access. Easy searching the code for references.


Tuesday, February 14, 2012

Cross database ownership chaining question

Do we need to worry about the default SP3 service pack upgrade which has
cross database ownership chaining disabled of all our objects on all
databases are owned by dbo.Using SQL 2000The cross-database ownership chaining option is only needed if you have
cross-database object references and users don't have permissions on the
referenced objects. If you have problems after disabling this option, you
can either turn it on selectively in the databases involved or grant direct
permissions on the referenced objects.
Note that your databases are not owned by 'dbo' - databases are owned by
logins (e'g' 'sa'). In order to maintain an unbroken cross-database
ownership chain for dbo-owned objects, the databases involved must be owned
by the same login.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:eG1vClmyDHA.2156@.TK2MSFTNGP09.phx.gbl...
> Do we need to worry about the default SP3 service pack upgrade which has
> cross database ownership chaining disabled of all our objects on all
> databases are owned by dbo.Using SQL 2000
>|||Is there some scripts that I can download to demonstrate this ?
"Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
news:e3iiH5myDHA.1744@.TK2MSFTNGP12.phx.gbl...
> The cross-database ownership chaining option is only needed if you have
> cross-database object references and users don't have permissions on the
> referenced objects. If you have problems after disabling this option, you
> can either turn it on selectively in the databases involved or grant
direct
> permissions on the referenced objects.
> Note that your databases are not owned by 'dbo' - databases are owned by
> logins (e'g' 'sa'). In order to maintain an unbroken cross-database
> ownership chain for dbo-owned objects, the databases involved must be
owned
> by the same login.
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
>
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:eG1vClmyDHA.2156@.TK2MSFTNGP09.phx.gbl...
> > Do we need to worry about the default SP3 service pack upgrade which has
> > cross database ownership chaining disabled of all our objects on all
> > databases are owned by dbo.Using SQL 2000
> >
> >
>|||This KB article contains some scripts:
http://support.microsoft.com/default.aspx?scid=kb;en-us;272424&Product=sql2k
There is more info about cross db ownership chaining here:
http://support.microsoft.com/default.aspx?scid=kb;en-us;810474&Product=sql2k
--
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:u6#BmQqyDHA.540@.tk2msftngp13.phx.gbl...
> Is there some scripts that I can download to demonstrate this ?
> "Dan Guzman" <danguzman@.nospam-earthlink.net> wrote in message
> news:e3iiH5myDHA.1744@.TK2MSFTNGP12.phx.gbl...
> > The cross-database ownership chaining option is only needed if you have
> > cross-database object references and users don't have permissions on the
> > referenced objects. If you have problems after disabling this option,
you
> > can either turn it on selectively in the databases involved or grant
> direct
> > permissions on the referenced objects.
> >
> > Note that your databases are not owned by 'dbo' - databases are owned by
> > logins (e'g' 'sa'). In order to maintain an unbroken cross-database
> > ownership chain for dbo-owned objects, the databases involved must be
> owned
> > by the same login.
> >
> > --
> > Hope this helps.
> >
> > Dan Guzman
> > SQL Server MVP
> >
> >
> > "Hassan" <fatima_ja@.hotmail.com> wrote in message
> > news:eG1vClmyDHA.2156@.TK2MSFTNGP09.phx.gbl...
> > > Do we need to worry about the default SP3 service pack upgrade which
has
> > > cross database ownership chaining disabled of all our objects on all
> > > databases are owned by dbo.Using SQL 2000
> > >
> > >
> >
> >
>