Optional Date Driven Parameter(s) Efficiency

Ok...So here's the deal....
We have a Date driven Report. So the Dates are provided first and then there are optional parameters that are then satisfied by the @Dates and filled accordingly within the Report. So the first job of the report is to provide the Date Range. Once the Date
Range is provided, the optional parameters, Like "Market Rep" and "Broker Name" are then satisfied by the Date driven result set that runs in the background.
The User then decides to filter down this result set by the parameter values or they can leave it alone and just roll with the (Select All) and All the optional parameters checked.
However, if they do decide to filter by these optional parameters, the discussion ensues as to the best, most efficient way to do it.
Option #1 - We use filtering within the .rdl Dataset based on the optional parameters. This results in no filtering within the WHERE Clause of the Report Stored Procedure and puts the ow nous on the Report .rdl to do the filtering.
Option #2 - Employ a function, what we call udf_SplitParameter, which employs a WHILE Statement to go through the passed parameter and then build a "Result" Table that is then used within the WHERE Clause of the Report Stored Procedure. Obviously
this method is clearly found in the Report Stored Procedure, but tends to complicate it and add a fifth wheel.
Soooooo we are wondering what the right, most efficient way should be based on your alls experience. I hope I was clear in trying to describe what our dilemma is here.
Thanks for your review and am hopeful for a reply.
PSULionRP

I suggested in Idea Place an option to set today's date as Default.
Please, vote for my idea on here:
https://cw.sdn.sap.com/cw/ideas/2555
Perhaps this way they will consider it.
Best Regards
Erika

Similar Messages

  • How to pass the multiplevalue parameter into SSRS by data driven subscription

    Hi All,
    I create a table and show it in the SSRS by table
    EmID Name
    AA1, A
    BB1, C
    CC1, E
    And set one parameter EmID for the user to filter the record and that Parameter Accept multiple values and the type is text.
    And I create a another table for the data-driven subscription to send the report to user by email.
    EmailTitle EmID  EmailComment
    TestEmail  AA1,BB1,CC1    TestComment
    And I set the subscription and set the EmID parameter is from EmID column, then test the subscription, it failed...
    However, when I only put AA1 into the table, then the subscription works well
    EmailTitle EmID  EmailComment
    TestEmail  AA1    TestComment
    So How I can config the above table to support subscription?
    Thanks.

    Hi Bimaster,
    When specify a column for the parameter value in a data-driven subscription, it will be regarded as a single value. So when specify the value "AA1,BB1,CC1" as the parameter value, the subscription will fail.
    The work around for this issue clear the "Allow multiple values" for the report parameter, and then change the filter
    From
    Expression:[ParameterName]
    Operator   :In
    Value         :[@ParameterName]
    To
    Expression:[ParameterName]
    Operator   :In
    Value         :Split(Parameters!ParameterName.Value,",")
    In this case, we can specify a value like "AA1,BB1,CC1" from database to the data-driven subscription. I have tested it on my local host environment, it works fine.
    Regards
    Charlie Liao
    TechNet Community Support

  • Add Data driven subscription option missing in sharepoint 2013

    i have a sharepoint 2013 enterprise version with sql server 2012 standard version. And i want to add Data- driven subscriptions for a document library by selecting manage subscriptions. But in the manage subscriptions Add Data- Driven subscription option
    is missing. How can i get the options. is ther any workaround if  i am using standard version.

    Hi sppanda,
    According to your description, you want to use data driven report subscription feature with SQL Server 2012 Standard.
    In Reporting Services 2012, only SQL Server 2012 Enterprise and Business Intelligence edition support the data driven feature. So it’s expected that the Add Data- Driven subscription option is missing in your environment. In your scenario, if you want to
    use data driven subscription feature, please perform edition upgrade.
    Reference:
    Reporting Services Features
    Upgrade to a Different Edition of SQL Server 2012 (Setup)
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Optional Prompt for Date type parameter in Crystal Report.

    Hi Every One,
    I have a date type parameter in crystal report.When I am convert it to optional prompt it is showing following message.
    But the Type field is gray out when I was selecting list of values Dynamic.
    Please suggest.
    Thanks and Regards
    DEV

    Hi,
    Please check SAP note:
    1710595 - CR_Defining "Optional Prompt" as True for SAP Crystal
    Reports Does Not Work
    Thanks & Regards,
    Nagarajan

  • [Forum FAQ] How to configure a Data Driven Subscription which get multi-value parameters from one column of a database table?

    Introduction
    In SQL Server Reporting Services, we can define a mapping between the fields that are returned in the query to specific delivery options and to report parameters in a data-driven subscription.
    For a report with a parameter (such as YEAR) that allow multiple values, when creating a data-driven subscription, how can we pass a record like below to show correct data (data for year 2012, 2013 and 2014).
    EmailAddress                             Parameter                      
    Comment
    [email protected]              2012,2013,2014               NULL
    In this article, I will demonstrate how to configure a Data Driven Subscription which get multi-value parameters from one column of a database table
    Workaround
    Generally, if we pass the “Parameter” column to report directly in the step 5 when creating data-driven subscription.
    The value “2012,2013,2014” will be regarded as a single value, Reporting Services will use “2012,2013,2014” to filter data. However, there are no any records that YEAR filed equal to “2012,2013,2014”, and we will get an error when the subscription executed
    on the log. (C:\Program Files\Microsoft SQL Server\MSRS10_50.MSSQLSERVER\Reporting Services\LogFiles)
    Microsoft.ReportingServices.Diagnostics.Utilities.InvalidReportParameterException: Default value or value provided for the report parameter 'Name' is not a valid value.
    This means that there is no such a value on parameter’s available value list, this is an invalid parameter value. If we change the parameter records like below.
    EmailAddress                        Parameter             Comment
    [email protected]         2012                     NULL
    [email protected]         2013                     NULL
    [email protected]         2014                     NULL
    In this case, Reporting Services will generate 3 reports for one data-driven subscription. Each report for only one year which cannot fit the requirement obviously.
    Currently, there is no a solution to solve this issue. The workaround for it is that create two report, one is used for view report for end users, another one is used for create data-driven subscription.
    On the report that used create data-driven subscription, uncheck “Allow multiple values” option for the parameter, do not specify and available values and default values for this parameter. Then change the Filter
    From
    Expression:[ParameterName]
    Operator   :In
    Value         :[@ParameterName]
    To
    Expression:[ParameterName]
    Operator   :In
    Value         :Split(Parameters!ParameterName.Value,",")
    In this case, we can specify a value like "2012,2013,2014" from database to the data-driven subscription.
    Applies to
    Microsoft SQL Server 2005
    Microsoft SQL Server 2008
    Microsoft SQL Server 2008 R2
    Microsoft SQL Server 2012
    Please click to vote if the post helps you. This can be beneficial to other community members reading the thread.

    For every Auftrag, there are multiple Position entries.
    Rest of the blocks don't seems to have any relation.
    So you can check this code to see how internal table lt_str is built whose first 3 fields have data contained in Auftrag, and next 3 fields have Position data. The structure is flat, assuming that every Position record is related to preceding Auftrag.
    Try out this snippet.
    DATA lt_data TYPE TABLE OF string.
    DATA lv_data TYPE string.
    CALL METHOD cl_gui_frontend_services=>gui_upload
      EXPORTING
        filename = 'C:\temp\test.txt'
      CHANGING
        data_tab = lt_data
      EXCEPTIONS
        OTHERS   = 19.
    CHECK sy-subrc EQ 0.
    TYPES:
    BEGIN OF ty_str,
      a1 TYPE string,
      a2 TYPE string,
      a3 TYPE string,
      p1 TYPE string,
      p2 TYPE string,
      p3 TYPE string,
    END OF ty_str.
    DATA: lt_str TYPE TABLE OF ty_str,
          ls_str TYPE ty_str,
          lv_block TYPE string,
          lv_flag TYPE boolean.
    LOOP AT lt_data INTO lv_data.
      CASE lv_data.
        WHEN '[Version]' OR '[StdSatz]' OR '[Arbeitstag]' OR '[Pecunia]'
             OR '[Mita]' OR '[Kunde]' OR '[Auftrag]' OR '[Position]'.
          lv_block = lv_data.
          lv_flag = abap_false.
        WHEN OTHERS.
          lv_flag = abap_true.
      ENDCASE.
      CHECK lv_flag EQ abap_true.
      CASE lv_block.
        WHEN '[Auftrag]'.
          SPLIT lv_data AT ';' INTO ls_str-a1 ls_str-a2 ls_str-a3.
        WHEN '[Position]'.
          SPLIT lv_data AT ';' INTO ls_str-p1 ls_str-p2 ls_str-p3.
          APPEND ls_str TO lt_str.
      ENDCASE.
    ENDLOOP.

  • SSRS Data Driven Subscription Split Report on Email

    I have a requirement to email an SSRS report to each of the individual emails referenced in the report.
    Think of it is as a mail merge wherein there are 5 persons receiving the report.The Current SSRS Report contains 5 Letters. The Email Subscription dataset is identical to the one upon which the report is based and works as expected. The problem is that currently
    it is sending the ENTIRE report to each email rather than sending only the report that corresponds to the applicable email ( I have heard this referred to as bursting the report).
    Is there some setting that I may be missing? How can this be achieved?
    Again I have Info
    Report A
    (user1 info, User 1 Email
    User2 info---------------BEING EMAILED TO ---------->        User 2 email
    User3 info User 3 email
    User4 info User 4 email
    User5 ) User 5 email
    And I want
    Report A
    (user1 info--------------BEING EMAILED TO ----------> User 1 Email
    User2 info---------------BEING EMAILED TO ----------> User 2 email
    User3 info --------------BEING EMAILED TO ----------> User 3 email
    User4 info --------------BEING EMAILED TO ----------> User 4 email
    User5 info --------------BEING EMAILED TO ----------> User 5 email

    Hi Garrett_ll,
    After testing the issue in my local environment, we can refer to the steps below to achieve your requirement:
    We should add a parameter named User in the report use User field as Available Values.
    Add a filter as below in the corresponding tablix:
    Expression: [User]
    Operator: =
    Value: [@User]
    Deploy the Report to report server.
    During the data-driven subscription, in the step 4 (Specify delivery extension settings for Report Server Email). Below “To” option, select “Get the value from the database”, then select User field.
    In the step 5, we can configure report parameter “Get the value from the database”, then select User field.
    The following article about Create a Data-Driven Subscription, you can refer to it.
    http://technet.microsoft.com/en-us/library/ms169673.aspx
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Data Driven Subscriptions Error - the query processor could not start the necessary thread resources for parallel query execution

    Hi,
    We are getting the following error when certain data driven subscriptions are fired off: "the query processor could not start the necessary thread resources for parallel query execution".  I've read other posts that have the same error, and
    the solution usually involves adjusting MaxDOP to limit the number of queries that are fired off in parallel.  
    Unfortunately, we cannot change this setting on our server for performance reasons (outside of data driven subscriptions, it negatively impacts our ETL processing times).  We tried putting query hints like "OPTION (MAXDOP 2);" in the reports
    that are causing the error, but it did not resolve the problem.
    Are there any settings within Reporting Services that can be adjusted to limit the number of subscriptions that get fired off in parallel?
    Any help is appreciated - thanks!

    Yes, that is correct.  It's a painful problem, because you don't know which specific subscription failed. For example, we have a data driven subscription that sends out about 800 emails. Lately, we've been having a handful of them fail. You don't know
    which ones out of the 800 failed though, even from the RS log files - all it tells you is that "the
    query processor could not start the necessary thread resources for parallel query execution".
    Thanks, I'll try changing <MaxQueueThreads> and will let you know if it works.
    On a side note: I've noticed that it is only reports with cascading parameters (ex. where parameter 2 is dependent on the selection from parameter 1) that get this error message...

  • SSRS 2005 - Data Driven Subscription

    Hi ,
    On my report manager - 2005, I have one report which has only one parameter (Seller) and this is a single select parameter (NOT multiple selects)
    I want to create a data driven subscription which will send automatic Email to specified users on a weekly basis (every Friday morning)
    The only condition while sending excel formatted email is that, it should select some specific values only for this parameter "Seller"
    Example, it should send email to users only for Seller = A, B, and C and it should NOT send data for all other sellers
    Can you pl explain each step to do this ?
    Regards

    Hi UltraDev,
    If I understand correctly, you want to use data-driven subscription to send corresponding report to specific Seller. Please refer to the following steps:
    Click New Data-driven Subscription icon in the Subscriptions dialog box of the report.
    Select E-Mail option of Specify how to recipients are notified, and select “Specify a shared data source”. Next.
    Select the corresponding datasource. Next.
    Add query in the blank. It is related to the recipient. You can refer to the following code:
    Select ‘[email protected]’ as SellerAddress, ’A’ as Seller
    Union
    Select ‘[email protected]’ as SellerAddress, ’B’ as Seller
    Union
    Select ‘[email protected]’ as SellerAddress, ’C’ as Seller
    In the Step4 page, select “Get the value from the database” below “To”.
    Then, we can select the Seller field as the specify value which is only with A, B, C three values.
    In the Step5 page, we can configure the parameter values.
    After that, we can configure the schedule of the subscription.
    There is an article about how to Creating a Data-Driven Subscription, you can refer to it.
    http://technet.microsoft.com/en-us/library/ms169673(v=sql.90).aspx
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • Data driven subscription query returns no data

    We have a data driven subscription on SSRS 2008 R2. The columns in the query are tied to one or more parameters of the report. When we run the subscription and if the query does not return any rows, I was hoping that the subscription will not start; however,
    instead, to my surprise, I got error stating..."Parameter XYZ value can't be null". How to avoid this error and keep subscription from running in this situation? 
    Example: I have a report that required employeeID as a parameter. I have a query (step 3: data driven subscription) that fetches employee ID based on some criteria. If there is no row returned by the query; It throws error on report stating "Parameter
    EmployeeID can't be null."
    Nehal Jain

    Hello Nehal -
    Try adding a UNION ALL to your parameter dataset query like
    UNION ALL SELECT NULL AS EmployeeID , ..
    Just check accordingly. I ll revert again based on this , got a priority now.
    Happy to help! Thanks. Regards and good Wishes, Deepak. http://deepaksqlmsbusinessintelligence.blogspot.com/

  • Special Characters in the file name in Data Driven Subscription via File Share

    Hi,
    I am trying to create a Data Driven Subscription with option to delivery as  windows file share in SQL server 2005. I need to save the report as a pdf with the following file name  '[City] City_Name', but it errors out and it is because of the
    Square Brackets. Is there any way i can save the file using the Square brackets as i mentioned above.
    I am using a query to get the filename and filepath. It works fine as long as i do not have [], but i need to save the file as i mentioned along with the Square Brackets.
    Please help.

    Hello,
    I can reproduce the issue on my test environment: When I create a Data Driven Subscription and specify the report name by get from a subscription delivery table, and the value of the "report name" column contains square brackets. The subscription failed
    with following error in the error log:
    ERROR: Error occurred processing subscription ab9523a6-0256-4607-b818-a7666204d018:
    The file name is not valid. Avoid using special characters such as /\?*:<>|+,[]"& in the file name.
    notification!WindowsService_1!1f24!05/30/2014-15:31:02:: i INFO: Notification 0cf5a356-3172-4108-9d8c-58ea81a0b80a completed.  Success: False, Status: The file name is not valid. Avoid using special characters such as /\?*:<>|+,[]"& in the
    file name., DeliveryExtension: Report Server FileShare, Report: Report6, Attempt 0
    It seems that the behavior is by design. please avoid using square brackets as file name. Maybe you can try to use parentheses () instead.
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • What is correct way to join a start/end date driven dimension to a fact table in data foundation?

    I have a bad universe or a data design issue. 
    Several versions of hierarchies reporting store entities in reporting Fact measures.
    Example of date driven Hierarchy Dimension:   ORG_KEY
                                                                                START_DATE
                                                                                END_DATE
                                                                                STORE_NUMBER
                                                                                ORG_HIERARCHY   
                                                                                CURR_FLG   (Y/N)        
    Fact table  :                                                         ORG_KEY
                                                                                 CALENDAR_KEY
                                                                                 TRANS_DATE
                                                                                 $amount  
    Calendar Dimension:                                            CALENDAR_KEY
                                                                                  DAY_DATE
                                                                                   FY_WEEK          (201452)
                                                                                    FY_PERIOD      (201412)
                                                                                    FY_QUARTER   (201401)
                                                                                     FISCAL_YEAR    (2014)
    Users WISH:
    Wish for store number and org hierarchy to pull as of the last day of each pull without prompt.    The Store(ORG_KEY) as in the fact table; but the ORG_HIERARCHY and other attributes as of the last day they pull.
    Daily (Would be Calendar.Day_Date in Filter) ,
    Week to date (would be Max Calendar.Day_Date for (201452) FY_WEEK  as entered,
    Month to date,
    Year to date, 
    AdHoc queries.  
    My problem is I see how they could manually pull this in Webi.   I have tried everything I know to join to no avail.  I have not gotten @Prompts to work in joins, derived tables, etc.  in the data foundation.  Wonder what is difference between parameter in Data foundation vs. filter in buisness layer.    None of them worked. 
    Please help!   ANY ideas would be appreciated.   .

    {Note that abbrevations in brackets are just for short form further down the answer}
    Join Store Dim (SD) to Transaction Fact (TF) on ORG_KEY=ORG_KEY with 1 to Many cardinality
    Create an alias of Calendar Dim and call it Transaction Date (TD)
    Join TD to TF on TD.CALENDAR_KEY=TF.CALENDAR_KEY with 1 to Many cardinality
    Create a predefined condition in your universe called "Return Yesterday's Transactions" as:
    TD.DAY_DATE = trunc(sysdate-1) <-- That assumes Oracle database; use whatever is correct for yesterday for your RDBMS
    The above predefined condition when added to your data query will return only yesterday's transactions.
    However, if you want to return all the different types of sales, you would need an object for each one. To do that, you'd use a case statement. Again, using Oracle syntax, an example of MTD would be:
    SUM(CASE WHEN trunc(TD.DAY_DATE,'yyyymm') = trunc(sysdate,'yyyymm') THEN TF.amount END)
    If you have any more questions about how this approach would work please shout.
    As an alternative, you could create a time hierarchy and add scope of analysis to your report for it and enable drilling at report level.

  • Help With Date driven report

    I am trying to generate a list of the programs on all channels for a specific day showing the channel number, supplier, package, program name, rating code, and show time. This will be similar to a program guide, only not package specific. This is a date-driven report, therefore it should only display programs for a single date specified.
    [code/]SELECT DISTINCT
    S.PROGTIME AS "SHOWTIME",
    S.PROGNAME AS "PROGRAM TITLE",
    C.CHNUM AS "CHANNEL #",
    SU.SUPNAME AS "SUPPLIER",
    R.RATINGDESCRIPT AS "RATING"
    FROM SCHEDULE S
    CROSS JOIN CHANNELS C
    CROSS JOIN SUPPLIERS SU
    INNER JOIN PROGRAM P ON P.PROGNAME = S.PROGNAME
    INNER JOIN CHANNEL_PACKAGE CP ON CP.CHID = S.CHID
    INNER JOIN RATING R ON R.RATINGID = P.RATINGID
    WHERE S.PROGTIME='18-DEC-10'
    ORDER BY C.CHNUM
    Which gives me an undesired resulT containg rows that put names of all channels with each channel number and ends up outputting 3016 rows which there should be only 29.
    I don't know how to add my script file here since there is no option for an attachment.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Ok here is my syntax I have been working on
    SELECT DISTINCT
    S.PROGTIME AS "SHOWTIME",
    S.PROGNAME AS "PROGRAM TITLE",
    C.CHNUM AS "CHANNEL #",
    SU.SUPNAME AS "SUPPLIER",
    R.RATINGCODE AS "RATING"
    FROM SCHEDULE S
    CROSS JOIN CHANNELS C
    CROSS JOIN SUPPLIERS SU
    INNER JOIN PROGRAM P ON P.PROGNAME = S.PROGNAME
    INNER JOIN CHANNEL_PACKAGE CP ON CP.CHID = S.CHID
    INNER JOIN RATING R ON R.RATINGID = P.RATINGID
    WHERE C.CHID=S.CHID
    ORDER BY C.CHNUM;
    Here are the tables and data
    CREATE TABLE CHANNEL_TYPES(
    CHANTYPEID CHAR(10) NOT NULL,
    CHANTYPEDESC VARCHAR2(15) NOT NULL,
    PRIMARY KEY(CHANTYPEID));
    CREATE TABLE SUPPLIERS(
    SUPID NUMBER(4) NOT NULL,
    SUPNAME CHAR(4) NOT NULL,
    SUPSTADD VARCHAR2(30) NOT NULL,
    SUPCITY VARCHAR2(30),
    SUPSTATE CHAR(2),
    SUPZIP NUMBER(9),
    CONTNAME VARCHAR2(30) NOT NULL,
    CONTPHNUM VARCHAR2(15),
    CONTEMAIL CHAR(50),
    PRIMARY KEY(SUPID));
    CREATE TABLE RATING(
    RATINGID NUMBER(4),
    RATINGDESCRIPT VARCHAR(30),
    RATINGCODE VARCHAR(10),
    PRIMARY KEY(RATINGID));
    CREATE TABLE PACKAGE(
    PKGID NUMBER(6) NOT NULL,
    PKGDESC VARCHAR2(40) NOT NULL,
    PKGNAME VARCHAR2(15),
    PKGPRICE NUMBER (8,2),
    PRIMARY KEY(PKGID));
    CREATE TABLE CHANNELS(
    CHID NUMBER(5) NOT NULL,
    CHNUM NUMBER(3) NOT NULL,
    CHNAME VARCHAR2(20) NOT NULL,
    CHANTYPEID CHAR(10) NOT NULL,
    PRIMARY KEY(CHID),
    FOREIGN KEY(CHANTYPEID) REFERENCES CHANNEL_TYPES(CHANTYPEID));
    CREATE TABLE PROGRAM(
    SUPID NUMBER(4) NOT NULL,
    PROGNAME VARCHAR2(20),
    PROGDESC VARCHAR2(30) NOT NULL,
    PROGLGTH NUMBER(4),
    CHANTYPEID CHAR(10),
    RATINGID NUMBER(4),
    PRIMARY KEY(PROGNAME),
    FOREIGN KEY(SUPID) REFERENCES SUPPLIERS(SUPID),
    FOREIGN KEY(CHANTYPEID) REFERENCES CHANNEL_TYPES(CHANTYPEID),
    FOREIGN KEY(RATINGID) REFERENCES RATING(RATINGID));
    CREATE TABLE SCHEDULE(
    SCHEDID CHAR(6) NOT NULL,
    CHID NUMBER(4) NOT NULL,
    PROGNAME VARCHAR(20) NOT NULL,
    PROGTIME DATE NOT NULL,
    PRIMARY KEY(SCHEDID),
    FOREIGN KEY(PROGNAME) REFERENCES PROGRAM(PROGNAME));
    CREATE TABLE CHANNEL_PACKAGE(
    CHID NUMBER(5) NOT NULL,
    PKGID NUMBER(6) NOT NULL,
    FOREIGN KEY(CHID) REFERENCES CHANNELS(CHID),
    FOREIGN KEY(PKGID) REFERENCES PACKAGE(PKGID));
    --INSERT STATEMENTS
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES ( 4578, 'NBC', '10880 WILSHIRE BLVD #1200', 'LOS ANGELES','CA','90213','JEFF KING','310-369-5231','[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES ( 5267, 'ABC', '26547 STARS BLVD #5699', 'LOS ANGELES','CA', '90212', 'JACK CAVERISI', '310-840-9966', '[email protected]');
    INSERT INTO SUPPLIERS
    (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES ( 7137, 'FOX', '10960 WILSHIRE BLVD', 'LOS ANGELES','CA', '90213', 'JANIS CARMIKEL', '310-235-5233', '[email protected]');
    INSERT INTO SUPPLIERS
    (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES ( 3549, 'WB', '3701 W. OAK ST', 'BURBANK', 'CA','91125', 'SIMON PHILIPS', '310-532-6588', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES ( 6389, 'STAR', '3291 GOLDEN LN.', 'BURBANK', 'CA', '91124', 'SOPHIA SLERPY', '310-677-9511', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES (5729, 'CNN', '579 WALNUT ST. #7893', 'LOS ANGELES', 'CA', '90215', 'MILDRED FOLLEY', '310-729-5568', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES (5376, 'CBS', '3499 SURVIVOR CR.', 'BURBANK', 'CA', '91125', 'SHANNON MYERS', '310-648-1064', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES (7763, 'TBS', '95 TURNER BLVD.', 'ATLANTA', 'GA', '26478', 'ALEXIS COUPE', '443-752-7335', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES (3675, 'LIFE', '9945 SAILOR LN.', 'NEW YORK', 'NY', '36984', 'KRISTIAN HART', '646-985-8998', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES (2599, 'CW', '55890 TERRANCE DR', 'NEW YORK', 'NY', '36983', 'NANCY BOTWIND', '646-736-7349', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES (8771, 'MTV', '7721 TIMES SQ. #98654', 'NEW YORK', 'NY', '36983', 'KID ROCK', '646-992-1257', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES (7700, 'G4', '87264 GEEK LN.', 'NEW YORK', 'NY', '36983', 'OLIVIA MUNN', '646-753-7312', '[email protected]');
    INSERT INTO SUPPLIERS (SupID, SupName, SupStAdd, SupCity, SupState, Supzip, ContName, ContPhNum, ContEmail)
    VALUES (6666, 'FEAR', '666 ELM ST.', 'SLEEPY HOLLOW', 'NY', '36907', 'FREDDY KRUGER', '646-568-9666', '[email protected]');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES ( 0001, 'GENERAL AUDIENCE', 'G');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES ( 0002, 'PARENTAL GUIDENCE', 'PG');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES ( 0003, 'PARENTAL GUIDENCE 13', 'PG13');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES ( 0004, 'RATED', 'R');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES ( 0005, 'NO ONE 17 AND UNDER ADMITTED', 'NC17');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES (0006, 'MATURE', 'M');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES (0007, 'NUDITY', 'N');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES (0008, 'LANGUAGE', 'L');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES (0009, 'MILD VIOLENCE', 'MV');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES (0010, 'VIOLENCE', 'V');
    INSERT INTO RATING (RatingID, RatingDescript, RatingCode)
    VALUES (0011, 'SEXUAL CONTENT', 'SC');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('M', 'Movie');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('N', 'News');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('L', 'Lifestyle');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('D', 'Documentary');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('S', 'Sports');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('R', 'REALITY');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('C', 'CHILDREN');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('F', 'FAMILY');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('H', 'HORROR');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('I', 'INSTRUCTIONAL');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('MU','MUSIC');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('MYST', 'MYSTERY');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('NA', 'NATURE');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('RE', 'RELIGOUS');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('ROM', 'ROMANCE');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('SCIFI', 'SCIENCE FICTION');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('SO', 'SOAP OPERAS');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('TS', 'TALK SHOW');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('W', 'WESTERN');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('AD', 'ADULT');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('BIO', 'BIOGRAPHY');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('CART', 'CARTOONS');
    INSERT INTO CHANNEL_TYPES (ChanTypeID, ChanTypeDesc)
    VALUES ('SHOP', 'SHOPPING');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1001, 1, 'Movie Channel 1', 'M');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1002, 2, 'StarZ', 'M');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1003, 3, 'FOX News', 'N');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1004, 4, 'Real News', 'N');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1005, 5, 'Lyfetiem', 'L');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1006, 6, 'FIT TV', 'L');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1007, 7, 'Gumshoe', 'D');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1008, 8, 'Reality Everything', 'D');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1009, 9, 'Pure Gridiron', 'S');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES(1010, 10, 'NESN', 'S');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1011, 11, 'GAMESHOW NETWORK', 'L');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES ( 1012, 12, 'HSN', 'SHOP');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1013, 13, 'CARTOON NETWORK', 'CART');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1014, 14, 'ONE LIFE', 'BIO');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1015, 15, 'MY MUSIC', 'MU');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1016, 16, 'HEAVENLY TV', 'RE');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1017, 17, 'GUNSLINGER', 'W');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1018, 18, '24-7 TALK SHOWS', 'TS');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1019, 19, 'SOAPNET', 'SO');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1020, 20, 'WBFF20', 'MYST');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1021, 21, 'ABC FAMILY', 'F');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1022, 22, 'LOVETV', 'ROM');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1023, 23, 'SYFY', 'SCIFI');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1024, 24, 'OUTDOORS', 'NA');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1025, 25, 'DIY', 'I');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1026, 26, 'CHILLER', 'H');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1027, 27, 'REALTV', 'R');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1028, 28, 'ESPN', 'S');
    INSERT INTO CHANNELS (ChID, ChNum, ChName, ChanTypeID)
    VALUES (1029, 29, '5STAR', 'M');
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES(4578, 'N', 'NBC Tonight', 'News from around the world', 360, 0002);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES(7137, 'L', 'Sale of the Year', 'Game Show Lifestyle', 24, 0001);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES(3549, 'M', 'Fly Killers are Back', 'Flies attack the city once', 175, 0004);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES (5267, 'N', 'FOX ACTION NEWS', 'LOCAL NEWS', 60, 0002);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES (6389, 'M', 'MR. NICE GUY', 'MR.NICE GUY SAVES THE DAY', 120, 0003);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 3675, 'L', 'COOKING WITH FOOD', 'PREPARING A HOLIDAY FEAST', 180, 0001);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 5267, 'S', 'STEELERS VS RAVENS', 'FOOTBALL', 240, 0009);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 5376, 'S', 'US OPEN', 'CHAMPIONSHIP TENNIS', 360, 0002);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 7700, 'D', 'HISTORY VIDEO GAMES', 'THEN AND NOW', 120, 0003);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 7763, 'D', 'A WORLD AT WAR', 'WWII DOCUMENTARY', 120, 0010);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 6666, 'L', 'WHEEL O TERROR', 'GAMESHOW', 60, 0004);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 3675, 'SHOP', 'DEAL OF THE CENTURY', 'SHOPPING', 240, 0001);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 7763, 'C', 'SCOOBY DOO', 'SCOOBY AND GANG', 60, 0001);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 3675, 'BIO', 'MS13 GANG', 'INSIDE THE MS13 GANG', 120, 0010);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 8771, 'MU', '#1 VIDEOS', 'TODAYS HOTTEST VIDEOS', 300, 0011);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 6666, 'RE', 'SCRIPTURE READING', 'REV.DEAK READS ',120, 0002);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES (7700, 'W', 'GUNSLINGER', 'SHOOTOUT IN THE OLD WEST', 60, 0009);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 5729, 'TS', 'JERRY SPRINGER', 'RELATIONSHIP BREAKUPS', 60, 0011);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 4578, 'SO', 'GENERAL HOSPITAL', 'SOAP OPERA', 120, 0006);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 7137, 'MYST', '48 HOURS', 'WHO KILLED JIMMY HOFFA', 60, 0003);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 5267, 'F', 'FULL HOUSE REUNION', 'STARS FROM FULL HOUSE REUNITE', 120, 0002);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 8771, 'ROM', 'CUPIDS ARROW', 'LOVERS IN LOVE', 30, 0011);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 6666, 'SCIFI', 'WAREHOUSE 13', 'NONE AVAILIBLE', 60, 0005);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 3675, 'NA', 'DEER HUNTER EXTREME', 'HUNTING', 120, 0009);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 5729, 'I', 'FIXING THE SINK', 'HOW TO FIX LEAKY SINK', 60, 0008);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES (6666, 'H', 'SAW XX', 'RELENTLESS PSYCO KILLS AGAIN', 300, 0010);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 6389, 'AD', 'VICTORA FASHION SHOW', 'MODELS', 60, 0007);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 5267, 'S', 'UFC 300', 'PRO MMA', 300, 0010);
    INSERT INTO PROGRAM (SupID, ChanTypeID, ProgName, ProgDesc, ProgLgth, RatingID)
    VALUES ( 6389, 'M', 'NOT HOME ALONE', 'NONE AVAILABLE', 120, 0002);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1001, 1);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1001, 2);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1001, 3);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1001, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1002, 1);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1002, 3);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1002, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1003, 1);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1003, 2);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1003, 3);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1003, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1004, 2);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1004, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1005, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1006, 1);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1006, 2);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1006, 3);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1006, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1007, 1);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1007, 2);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1007, 3);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1007, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1008, 3);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1008, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1009, 1);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1009, 2);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1009, 3);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1009, 4);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1010, 3);
    INSERT INTO CHANNEL_PACKAGE(ChID,PkgID)
    VALUES (1010, 4);
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1101', 1001, 'NBC Tonight',TO_DATE('18-DEC-10 18:00', 'DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES (1102, 1002, 'Sale of the Year',TO_DATE('18-DEC-10 20:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1103', 1003, 'Fly Killers are Back',TO_DATE('18-DEC-10 20:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1104', 1004, 'FOX ACTION NEWS',TO_DATE('18-DEC-10 18:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1105', 1005, 'MR. NICE GUY',TO_DATE('18-DEC-10 11:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1106', 1006, 'COOKING WITH FOOD',TO_DATE('18-DEC-10 12:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1107', 1007, 'STEELERS VS RAVENS',TO_DATE('18-DEC-10 15:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES('1108', 1008, 'US OPEN',TO_DATE('18-DEC-10 14:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1109', 1009, 'HISTORY VIDEO GAMES',TO_DATE('18-DEC-10 13:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1110', 1010, 'A WORLD AT WAR',TO_DATE('18-DEC-10 17:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1111', 1011, 'WHEEL O TERROR',TO_DATE('18-DEC-10 17:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1112', 1012, 'DEAL OF THE CENTURY',TO_DATE('18-DEC-10 13:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1113', 1013, 'SCOOBY DOO',TO_DATE('18-DEC-10 14:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1114', 1014, 'MS13 GANG',TO_DATE('18-DEC-10 15:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1115', 1015, '#1 VIDEOS',TO_DATE('18-DEC-10 12:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1116', 1016, 'SCRIPTURE READING',TO_DATE('18-DEC-10 11:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1117', 1017, 'GUNSLINGER',TO_DATE('18-DEC-10 18:00', 'DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1118', 1018, 'JERRY SPRINGER',TO_DATE('18-DEC-10 20:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1119', 1019, 'GENERAL HOSPITAL',TO_DATE('18-DEC-10 11:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ( '1120', 1020, '48 HOURS',TO_DATE('18-DEC-10 12:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ( '1121', 1021, 'FULL HOUSE REUNION',TO_DATE('18-DEC-10 15:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1122', 1022, 'CUPIDS ARROW',TO_DATE('18-DEC-10 14:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1123', 1023, 'WAREHOUSE 13',TO_DATE('18-DEC-10 13:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1124', 1024, 'DEER HUNTER EXTREME',TO_DATE('18-DEC-10 15:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1125', 1025, 'FIXING THE SINK',TO_DATE('18-DEC-10 11:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1126', 1026, 'SAW XX',TO_DATE('18-DEC-10 12:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1127', 1027, 'VICTORA FASHION SHOW',TO_DATE('18-DEC-10 13:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1128', 1028, 'UFC 300',TO_DATE('18-DEC-10 12:00','DD-MON-YY HH24:MI'));
    INSERT INTO SCHEDULE (SchedID, ChID, ProgName, ProgTime)
    VALUES ('1129', 1029, 'NOT HOME ALONE',TO_DATE('18-DEC-10 11:00','DD-MON-YY HH24:MI'));

  • Data driven subscription

    I am getting the following error "System.Web.Services.Protocols.SoapException: The required field Field is missing from the input structure. ---> Microsoft.ReportingServices.Diagnostics.Utilities.MissingElementException: The required field Field
    is missing from the input structure.
       at Microsoft.ReportingServices.WebServer.ReportingService2005Impl.CreateSubscription(String Report, ExtensionSettings ExtensionSettings, Boolean isDataDriven, DataRetrievalPlan DataRetrievalPlan, String Description, String EventType, String MatchData,
    ParameterValueOrFieldReference[] Parameters, String& SubscriptionID)
       at Microsoft.ReportingServices.WebServer.ReportingService2005.CreateDataDrivenSubscription(String Report, ExtensionSettings ExtensionSettings, DataRetrievalPlan DataRetrievalPlan, String Description, String EventType, String MatchData, ParameterValueOrFieldReference[]
    Parameters, String& SubscriptionID)".
    Below is the code i used .
           ReportingService2005 rs = new ReportingService2005();
                rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
                //the name of the report for which the DDS is to be created
                string report = "/testDataDriven/Report1";
                string description = "Programmatic Data Driven Subscription for Windows File Share";
                //set extension as Windows File Share
                ExtensionSettings settings = new ExtensionSettings();
                settings.Extension = "Report Server Email";
                // Set the extension parameter values.
                ParameterValueOrFieldReference[] extensionParams =
                   new ParameterValueOrFieldReference[8];
                ParameterFieldReference to = new ParameterFieldReference(); // Data-driven.
                to.ParameterName = "TO";
                to.FieldAlias = "EmailAddress";
                extensionParams[0] = to;
                ParameterValue replyTo = new ParameterValue();
                replyTo.Name = "ReplyTo";
                replyTo.Value = "[email protected]";
                extensionParams[1] = replyTo;
                ParameterValue includeReport = new ParameterValue();
                includeReport.Name = "IncludeReport";
                includeReport.Value = "False";
                extensionParams[2] = includeReport;
                ParameterValue renderFormat = new ParameterValue();
                renderFormat.Name = "RenderFormat";
                renderFormat.Value = "HTML4.0";
                extensionParams[3] = renderFormat;
                ParameterValue priority = new ParameterValue();
                priority.Name = "Priority";
                priority.Value = "NORMAL";
                extensionParams[4] = priority;
                ParameterValue subject = new ParameterValue();
                subject.Name = "Subject";
                subject.Value = "Your sales report";
                extensionParams[5] = subject;
                ParameterValue comment = new ParameterValue();
                comment.Name = "Comment";
                comment.Value = "Here is the link to your report.";
                extensionParams[6] = comment;
                ParameterValue includeLink = new ParameterValue();
                includeLink.Name = "IncludeLink";
                includeLink.Value = "True";
                extensionParams[7] = includeLink;
                settings.ParameterValues = extensionParams;
                DataSource delivery = new DataSource();
                delivery.Name = "";
                DataSourceDefinition dataSourceDef = new DataSourceDefinition();
                dataSourceDef.ConnectString = "my credentials";
                dataSourceDef.CredentialRetrieval = CredentialRetrievalEnum.Store;
                dataSourceDef.Enabled = true;
                dataSourceDef.EnabledSpecified = true;
                dataSourceDef.Extension = "ORACLE";
                dataSourceDef.WindowsCredentials = false;
                dataSourceDef.ImpersonateUser = false;
                dataSourceDef.UserName = "";
                dataSourceDef.Password = "";
                delivery.Item = dataSourceDef;
                //we will have to declare the list of parameter(s) the report requires
                //in this report there is only one parameter named “Sales Order Number”
                //create fields list which is comprising of only one field in this report
                Field[] fieldlist = new Field[2];
                fieldlist[0] = new Field();
                fieldlist[0].Name = "REF_MONTH";
                fieldlist[0].Alias = "REF_MONTH";
                fieldlist[1] = new Field();
                fieldlist[1].Name = "MTSO_ID";
                fieldlist[1].Alias = "MTSO_ID";
                //create data set
                DataSetDefinition dataSetDefinition = new DataSetDefinition();
                dataSetDefinition.AccentSensitivitySpecified = false;
                dataSetDefinition.CaseSensitivitySpecified = false;
                dataSetDefinition.KanatypeSensitivitySpecified = false;
                dataSetDefinition.WidthSensitivitySpecified = false;
                dataSetDefinition.Fields = fieldlist;
                QueryDefinition queryDefition = new QueryDefinition();
                queryDefition.CommandText = "SELECT  REF_MONTH FROM  REFERRAL_TRN_DETAILS1";
                queryDefition.CommandType = "Text";
                queryDefition.Timeout = 1000;
                queryDefition.TimeoutSpecified = true;
                dataSetDefinition.Query = queryDefition;
                DataSetDefinition results = new DataSetDefinition();
                bool changed;
                string[] paramNames;
                results = rs.PrepareQuery(delivery, dataSetDefinition, out changed, out paramNames);
                DataRetrievalPlan dataRetrieval = new DataRetrievalPlan();
                dataRetrieval.DataSet = results;
                dataRetrieval.Item = dataSourceDef;
                // Set the event type and match data for the delivery.
                string eventType = "TimedSubscription";
                string matchData = @"<ScheduleDefinition>";
                matchData += @"<StartDateTime>2003-04-14T19:15:00-07:00</StartDateTime><WeeklyRecurrence><WeeksInterval>1</WeeksInterval>";
                matchData += @"<DaysOfWeek>";
                matchData += @"<Monday>True</Monday><Tuesday>True</Tuesday><Wednesday>True</Wednesday><Thursday>True</Thursday><Friday>True</Friday>";
                matchData += @"</DaysOfWeek></WeeklyRecurrence></ScheduleDefinition>";
                // Set the report parameter values.
                ParameterValueOrFieldReference[] parameters = new ParameterValueOrFieldReference[2];
                ParameterFieldReference empID = new ParameterFieldReference(); // Data-driven.
                empID.ParameterName = "val";
                empID.FieldAlias = "REF_MONTH";
                parameters[0] = empID;
                ParameterValue reportYear = new ParameterValue();
                reportYear.Name = "val";
                reportYear.Value = "112013";
                parameters[1] = reportYear;
                string subscriptionID = rs.CreateDataDrivenSubscription
                (report, settings, dataRetrieval, description, eventType, matchData, parameters);
    i have one report parameter val, ineed to pass value from the query result.

    Hi Santosh,
    According to your code, you are trying to create a data driven subscription with the code. As per my understanding, the issue can be caused by the FieldAlias does not exactly match a field in the dataset that is a part of the data retrieval plan, then the
    error is thrown. Note that exactly match includes case and leading/trailing whitespace.
    So please make sure the fields name are exactly matched in the code. The following blog posted by Gouri Sohoni is for your reference:
    http://www.sqlservercurry.com/2009/07/programmatically-create-data-driven.html
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Data driven subscription using c#

    I am getting the following error "System.Web.Services.Protocols.SoapException: The required field Field is missing from the input structure. ---> Microsoft.ReportingServices.Diagnostics.Utilities.MissingElementException: The required field Field
    is missing from the input structure.
       at Microsoft.ReportingServices.WebServer.ReportingService2005Impl.CreateSubscription(String Report, ExtensionSettings ExtensionSettings, Boolean isDataDriven, DataRetrievalPlan DataRetrievalPlan, String Description, String EventType, String MatchData,
    ParameterValueOrFieldReference[] Parameters, String& SubscriptionID)
       at Microsoft.ReportingServices.WebServer.ReportingService2005.CreateDataDrivenSubscription(String Report, ExtensionSettings ExtensionSettings, DataRetrievalPlan DataRetrievalPlan, String Description, String EventType, String MatchData, ParameterValueOrFieldReference[]
    Parameters, String& SubscriptionID)".
    Below is the code i used .
           ReportingService2005 rs = new ReportingService2005();
                rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
                //the name of the report for which the DDS is to be created
                string report = "/testDataDriven/Report1";
                string description = "Programmatic Data Driven Subscription for Windows File Share";
                //set extension as Windows File Share
                ExtensionSettings settings = new ExtensionSettings();
                settings.Extension = "Report Server Email";
                // Set the extension parameter values.
                ParameterValueOrFieldReference[] extensionParams =
                   new ParameterValueOrFieldReference[8];
                ParameterFieldReference to = new ParameterFieldReference(); // Data-driven.
                to.ParameterName = "TO";
                to.FieldAlias = "EmailAddress";
                extensionParams[0] = to;
                ParameterValue replyTo = new ParameterValue();
                replyTo.Name = "ReplyTo";
                replyTo.Value = "[email protected]";
                extensionParams[1] = replyTo;
                ParameterValue includeReport = new ParameterValue();
                includeReport.Name = "IncludeReport";
                includeReport.Value = "False";
                extensionParams[2] = includeReport;
                ParameterValue renderFormat = new ParameterValue();
                renderFormat.Name = "RenderFormat";
                renderFormat.Value = "HTML4.0";
                extensionParams[3] = renderFormat;
                ParameterValue priority = new ParameterValue();
                priority.Name = "Priority";
                priority.Value = "NORMAL";
                extensionParams[4] = priority;
                ParameterValue subject = new ParameterValue();
                subject.Name = "Subject";
                subject.Value = "Your sales report";
                extensionParams[5] = subject;
                ParameterValue comment = new ParameterValue();
                comment.Name = "Comment";
                comment.Value = "Here is the link to your report.";
                extensionParams[6] = comment;
                ParameterValue includeLink = new ParameterValue();
                includeLink.Name = "IncludeLink";
                includeLink.Value = "True";
                extensionParams[7] = includeLink;
                settings.ParameterValues = extensionParams;
                DataSource delivery = new DataSource();
                delivery.Name = "";
                DataSourceDefinition dataSourceDef = new DataSourceDefinition();
                dataSourceDef.ConnectString = "my credentials";
                dataSourceDef.CredentialRetrieval = CredentialRetrievalEnum.Store;
                dataSourceDef.Enabled = true;
                dataSourceDef.EnabledSpecified = true;
                dataSourceDef.Extension = "ORACLE";
                dataSourceDef.WindowsCredentials = false;
                dataSourceDef.ImpersonateUser = false;
                dataSourceDef.UserName = "";
                dataSourceDef.Password = "";
                delivery.Item = dataSourceDef;
                //we will have to declare the list of parameter(s) the report requires
                //in this report there is only one parameter named “Sales Order Number”
                //create fields list which is comprising of only one field in this report
                Field[] fieldlist = new Field[2];
                fieldlist[0] = new Field();
                fieldlist[0].Name = "REF_MONTH";
                fieldlist[0].Alias = "REF_MONTH";
                fieldlist[1] = new Field();
                fieldlist[1].Name = "MTSO_ID";
                fieldlist[1].Alias = "MTSO_ID";
                //create data set
                DataSetDefinition dataSetDefinition = new DataSetDefinition();
                dataSetDefinition.AccentSensitivitySpecified = false;
                dataSetDefinition.CaseSensitivitySpecified = false;
                dataSetDefinition.KanatypeSensitivitySpecified = false;
                dataSetDefinition.WidthSensitivitySpecified = false;
                dataSetDefinition.Fields = fieldlist;
                QueryDefinition queryDefition = new QueryDefinition();
                queryDefition.CommandText = "SELECT  REF_MONTH FROM  REFERRAL_TRN_DETAILS1";
                queryDefition.CommandType = "Text";
                queryDefition.Timeout = 1000;
                queryDefition.TimeoutSpecified = true;
                dataSetDefinition.Query = queryDefition;
                DataSetDefinition results = new DataSetDefinition();
                bool changed;
                string[] paramNames;
                results = rs.PrepareQuery(delivery, dataSetDefinition, out changed, out paramNames);
                DataRetrievalPlan dataRetrieval = new DataRetrievalPlan();
                dataRetrieval.DataSet = results;
                dataRetrieval.Item = dataSourceDef;
                // Set the event type and match data for the delivery.
                string eventType = "TimedSubscription";
                string matchData = @"<ScheduleDefinition>";
                matchData += @"<StartDateTime>2003-04-14T19:15:00-07:00</StartDateTime><WeeklyRecurrence><WeeksInterval>1</WeeksInterval>";
                matchData += @"<DaysOfWeek>";
                matchData += @"<Monday>True</Monday><Tuesday>True</Tuesday><Wednesday>True</Wednesday><Thursday>True</Thursday><Friday>True</Friday>";
                matchData += @"</DaysOfWeek></WeeklyRecurrence></ScheduleDefinition>";
                // Set the report parameter values.
                ParameterValueOrFieldReference[] parameters = new ParameterValueOrFieldReference[2];
                ParameterFieldReference empID = new ParameterFieldReference(); // Data-driven.
                empID.ParameterName = "val";
                empID.FieldAlias = "REF_MONTH";
                parameters[0] = empID;
                ParameterValue reportYear = new ParameterValue();
                reportYear.Name = "val";
                reportYear.Value = "112013";
                parameters[1] = reportYear;
                string subscriptionID = rs.CreateDataDrivenSubscription
                (report, settings, dataRetrieval, description, eventType, matchData, parameters);
    i have one report parameter val, ineed to pass value from the query result.
    santosh

    Hi Santosh,
    Based on your error message, it's has issue in the parameters arguments when you call the createDataDrivenSubscription() function. we suggest you to check your parameters argument to createDataDrivenSubscriptio() function. Mostly it's the issue of the
    Parameters. You are passing a ParameterFieldReference array object called parameters. The web service is very strict with the FieldAlias property. It need the fieldAlias have to EXACTLY MATCH a field in the data set that
    is part of the data retrieval plan, otherwise it will throw the exception above. So please pay attention to the white space or lower/higher cap issue. Also we suggest you use functions like Trim() to make fieldAlias fit the field in dataset.
    Reference:
    The required field Field is
    missing from the input structure.
    Best Regards,
    Simon Hou

  • Optional date range parameters

    Hi All,
    I have a 2 parameters from date and to date.When I didn't selected anything in parameters list then it should show all dates data.
    Please suggest how to create a optional parameter for date range parameters.

    Hi Sastry,
    For getting optional date parameter we are using formula like this  in record selection
    Not(hasvalue({?Date})) OR ({employee.Date} = {?Date})
    But the solution you provided doesn't contain not .Can you please suggest what is the difference.

Maybe you are looking for

  • How to use jsp:plugin action with type = bean

    Hi everybody, I'm new to JSP so it could be a stupid question but I'm wondering how can I use a jsp:plugin action with a type equal to "bean". Everyone is talking about type equal to applet so the browser can display this applet but if the type will

  • Is the Galaxy S4 compatible with IOS 6?

    is the Galaxy S4 compatible with IOS 6 or any apple software?

  • OGG media player for 6288

    Hello i am looking for a media player for my 6288 which supports .ogg files. anybody have any ideas? thanks Joe

  • Can't `cat /dev/video`

    I've been trying to do this, but I can't find anything to help. 16:24:48 cha0s6983@localhost:/usr/bin$ ls -l /dev/vide* lrwxrwxrwx 1 root root      6 2009-09-14 23:29 /dev/video -> video0 crw-rw---- 1 root video 81, 0 2009-09-14 23:29 /dev/video0 16:

  • Initializing Adobe Setup Setup

    i installed dreamweaver it created the dreamweaver cs3 file, when i check run dreamweaver when it finish it starts something up saying Initializing Adobe Setup Setup when it finishes nothing happen dreamweaver doesn't seem to be on my computer(xp)