Showing posts with label guys. Show all posts
Showing posts with label guys. Show all posts

Monday, March 26, 2012

Newbie Question

Hi Guys,

I am new to this Reporting Service world. May be its very simple question.

I have create a report in SQL Server 2005 reporting services and want to link this report with aspx page. How I do this. Just want to link report with default.aspx page so when this page open report also open automatically.

Please let me guide how could I do this.

Regards

I would recommend using the ASP.net ReportViewer control. It will make the web app appear much more polished than just linking to the reportmanager.|||If you don not want anything to change programmtically you can also just display the appropiate report in your frame targeting to the URL of you report on the ReportServer interface. (The one that you see if you navigate through the webservice http://Server/reportserver, e.g. http://server/reportserver?Somefolder/Report&Parameter=SomeValue)

HTH; Jens Suessmeyer.

http://www.sqlserver2005.de|||

Greate!! Thanks for your reply.

I pasted a report control on my aspx page but how I link my report with this page. I used the below code but it giving me error message

ReportViewer1.LocalReport.ReportEmbeddedResource = @.\\Business\Business\RPT825.rdl; (This is my local machine path)

and the Error message is

  • An error occurred during local report processing.|||

    Hi Guys,

    Please ignore my previous email. I have fixed the above issue. Now I don't know how to pass a parameter value to a report.

    I wrote the below line in my aspx page and when I ran this application it gives me a error message

    "The rDate parameter is missing a value"

    Below is the code that I wrote in my page_load event

    ReportViewer1.LocalReport.ReportPath = @."C:\Business\RPT825.rdl";

    Could you please let me know how to pass parameter value to a report.

    Regards

    |||

    ReportViewer1.LocalReport.SetParameters( );

    Juran

    sql
  • Monday, March 12, 2012

    Newbie Merge replication question

    Hi!

    I'm setting up a merge replication for sql ce. Ten guys with windows mobile 5 pocket pc works as service technicians and need to synchronize data in the field.

    The backend database is huge and I just want each person to have their own data on the pda and synchronized, they have unique userid's in the database. Is it possible to filter data for each person or do all have to have all data that's in the backend database?

    /Magnus

    Merge replication permits the agents to have subsets of the data based on how the Publication is programmed. One alternate approach would be to publish individual agent tables, but this gets messy as agents are added and removed.|||Could I use a "translator" table to translate suser_name()'s to applications userid's? Then in the filter query against this table to identify the user? One solution could be to have one Publication for each employee? Yes it would become messy to administer. But my problem can't be unique. How do you all query out data for each employee?|||You could have each user identifying themselves when using the application, and setting their userid as HostName on your replication object. Then you can reference this in your publication filter with HOST_NAME().

    Newbie Merge replication question

    Hi!

    I'm setting up a merge replication for sql ce. Ten guys with windows mobile 5 pocket pc works as service technicians and need to synchronize data in the field.

    The backend database is huge and I just want each person to have their own data on the pda and synchronized, they have unique userid's in the database. Is it possible to filter data for each person or do all have to have all data that's in the backend database?

    /Magnus

    Merge replication permits the agents to have subsets of the data based on how the Publication is programmed. One alternate approach would be to publish individual agent tables, but this gets messy as agents are added and removed.|||Could I use a "translator" table to translate suser_name()'s to applications userid's? Then in the filter query against this table to identify the user? One solution could be to have one Publication for each employee? Yes it would become messy to administer. But my problem can't be unique. How do you all query out data for each employee?|||You could have each user identifying themselves when using the application, and setting their userid as HostName on your replication object. Then you can reference this in your publication filter with HOST_NAME().

    newbie how to create temp table and populate

    Sorry guys I know this is easy but I've been looking for about an hour for a straight forward explanation.
    I want to store a user's wish list while they browse the site, then they can send me an enquiry populated with their choices.
    Basically, a shopping cart!
    I thought of using session variables and string manipulations but I am more comfortable with DB queries.
    a simple 4 column table would cover everything.
    SQL server and VBScript
    Thanks
    Mhttp://www.sqlteam.com/item.asp?ItemID=2029|||thanks, that was the first one I found on Google, but it just confused me.

    just after I posted my Query I looked again on Google and found this:
    http://www.programmers-corner.com/article/76 which seemed to be more my level!
    I am currently having a go.|||;-) well Google is your friend.|||aye,
    Here you go Newbies, the three statement to create a temp table, insert some values and retrieve them:
    CREATE TABLE #myTempTable
    (
    DummyField1 INT,
    DummyField2 VARCHAR(20)
    )
    --------
    INSERT into #myTempTable (DummyField1, DummyField2) VALUES (1,2)
    --------
    SELECT * from #myTempTable

    I new it wasn't rocket science, sometimes just writing to a forum clears your mind...enought to formulate the correct query for Google! doh

    Newbie here. Problems on bulk loading.

    Hi guys. I am kinda new in XML bulk loading section. Several tutorials had been done by myself and I get some difficulties when having an attribute in my XML. Here are my table, XML and XML schema for bulk loading.

    Tables :

    CREATE TABLE [dbo].[Game](
    [ID] [int] IDENTITY(1,1) NOT NULL,
    [code] [int] NOT NULL,
    CONSTRAINT [PK_Game] PRIMARY KEY CLUSTERED
    (
    [code] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    GO

    CREATE TABLE [dbo].[Match](
    [ID] [int] NOT NULL,
    [date] [datetime] NULL,
    [gamecode] [int] NOT NULL,
    CONSTRAINT [PK_Match] PRIMARY KEY CLUSTERED
    (
    [ID] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]

    GO
    ALTER TABLE [dbo].[Match] WITH CHECK ADD CONSTRAINT [FK_Match_Game] FOREIGN KEY([gamecode])
    REFERENCES [dbo].[Game] ([code])
    GO
    ALTER TABLE [dbo].[Match] CHECK CONSTRAINT [FK_Match_Game]

    XML :

    <?xml version='1.0' encoding='utf-8'?>

    <ROOT>

    <game code="1"/>

    <match id = "1001" date="2007/08/01" />

    <match id = "1002" date="2007/08/02" />
    </game>


    <game code="2"/>

    <match id = "1003" date="2007/08/03" />

    <match id = "1004" date="2007/08/04" />
    </game>


    <game code="3"/>

    <match id = "1005" date="2007/08/05" />

    <match id = "1006" date="2007/08/06" />
    </game>


    </ROOT>

    XML Schema :

    <xsdTongue Tiedchema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlnsTongue Tiedql="urnTongue Tiedchemas-microsoft-com:mapping-schema">

    <xsd:annotation>
    <xsd:appinfo>
    <sql:relationship name="gameMatch"
    parent="Game"
    parent-key="code"
    child="Deal"
    child-key="gamecode" />
    </xsd:appinfo>
    </xsd:annotation>

    <xsd:element name="game" sql:relation="Game" >
    <xsd:complexType>
    <xsdTongue Tiedequence>
    <xsd:element name="Match"
    sql:relation="Match"
    sql:relationship="gameMatch" >
    <xsd:complexType>
    <xsd:attribute name="id" type="xsd:integer" /> -- error occurs on this attribute
    </xsd:complexType>
    </xsd:element>
    </xsdTongue Tiedequence>
    <xsd:attribute name="date" type="xsdBig Smileate" />
    </xsd:complexType>
    </xsd:element>

    </xsdTongue Tiedchema>

    Hope able to get any assistance here. Thx.

    My problem solved. Just the element mistake. Smile

    Friday, March 9, 2012

    Newbie Error

    Hi guys,
    Your help please.
    First off, I have searched the Forum for answers using the keywords and tried those clues first but with no luck. This one for example: http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q282254

    I had a copy of MSDE installed on my machine about 12 month ago but never used it so I uninstalled it. Then I downloaded and installed SQL Server 120-day Evaluation edition a few days ago. When I tried to run SQL Server I get
    An error 1069 – (The service did not start due to logon failure)…

    I'm using Windows XP.

    How can I find out what the password is or how can I reset it so the SQL Server logon works?

    Any ideas?

    Thanks Guys

    FBIt's a windows service, so you'll need to go to your "Administrative Tools".|||what exactly do I need to do to get it to work?
    I have gone to Control Panel > Administative Tools > Services > right click, select properties then moved to the Log On tab. Then what? ...|||Oh yeah, OK I've done it. On the Log On tab, in Log on as: I've selected Local System account, rather than This account.
    Fanstastic! 8-)

    Newbie encounts DF_TableName_ColumnName errors

    Hi Guys,

    I am new to the database administration game. I encountered a dependency issue when I was trying to change the datatype of a column from smalldatetime to datetime.

    This is the code I use:

    ALTER table AllNetCategories ALTER COLUMN actiontime datetime
    Go

    When I run the above code, the database comes back this error message
    Server: Msg 5074, Level 16, State 1, Line 1
    The object 'DF_AllNetCategories_ActionTime' is dependent on column 'actiontime'.

    I also checked the dependency on the target table using

    sp_depends AllNetCategories


    and I cannot see any object name like "DF_AllNetCategories_ActionTime" dependent on it.

    Can anyone please help?It looks like 'DF_AllNetCategories_ActionTime' is a default constraint,
    if it is so, sp_depends procedure is not going to list it down.
    Query sys.default_constraints view instead -

    Select * from sys.default_constraints
    where [Parent_object_id] = object_id('AllNetCategories')|||Thanks mihirclarion.
    I am using SQL 2000 and I can not find sys.default_constraints table.
    The only table I can find those 'DF_%' is at sysobjects.
    How can I find out what those DF_% constraints for?|||you can use Information_schema views to know about constraints exists -

    Select * from information_schema.REFERENTIAL_CONSTRAINTS where constraint_name like '<Constraint_name>'
    Select * from information_schema.CHECK_CONSTRAINTS where constraint_name like '<Constraint_name>'
    Select * from information_schema.TABLE_CONSTRAINTS where constraint_name like '<Constraint_name>'

    or you can also use a simple query like -

    Select * from sysobjects where name like '<Constraint_name>'
    and check value of 'xtype' column -
    D - Default
    FN - Function
    P - Procedure
    PK - Primary key
    U - User tables
    S - System table ... etc.

    In general, prefix 'DF_' stands for default colstraints
    Query smiliar to following can give you details you need -

    Select inf_cols.* from sysobjects sysobj1
    INNER JOIN sysconstraints syscon1
    INNER JOIN syscolumns syscols1 ON syscols1.colid = syscon1.colid and syscols1.id = syscon1.id
    ON syscon1.Constid = sysobj1.ID
    INNER JOIN information_schema.columns inf_cols ON inf_cols.Column_name = syscols1.name
    and object_id(inf_cols.table_name) = syscols1.id
    where sysobj1.name like '<Constraint_name>' and inf_cols.column_default is not null|||It works~ Thank you Mihir|||sp_helpconstraint may be easier for you to use and is available in SQL 2000 and SQL 2005.

    Monday, February 20, 2012

    Newbee...SSIS

    Hi guys,

    I am a newbee withh SSIS, I used DTS in SQL 2000 way back to migrate data from AS/400 DB2UDB iSeries to SQL 2000. It was easy to use DTS just specify Source and Destination and do some mapping and bingo. But now how do I do the same things with SSIS?

    Is there some sort of tutorial out there? Any nice books? Any help is greatly appriciated.

    T.I.A.

    The simplest way to achieve it is to run the import/export data wizard (right click the Packages node and select Import/Export Data; or run DtsWizard.exe).

    It is rather simple to do it without wizard as well - you'll need to create Data Flow task, and inside it create OLEDB Source and Destination, connect them and do the mapping in the destination.|||

    I am having trouble using OLEDB providor, is it possible i can use ADO.NET ODBC provider that comes with AS/400 client? If I can how do i do that? I dont see any option of using ODBC provider.

    TIA

    |||Yes, use the DataReader Source (it should be called ADO.NET source really), it uses ADO.NET providers, including ADO.NET provider for ODBC.