Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Zucker Date Parameter

  1. #1
    JeanetteRoss is offline Sugar Community Member
    Join Date
    Apr 2007
    Posts
    61

    Default Zucker Date Parameter

    Hi
    I am trying to write a Zucker report with mySQL and parameters

    I have done this report in iReports but can get a good excel document - as it has loads of lines inserted.

    So
    Here is my basic query....

    Select * from tasks
    WHERE
    tasks.deleted <> 0
    AND
    `tasks`.`date_due` > $datestart
    AND
    `tasks`.`date_due` < $dateend

    I have two parameters that I have bound called
    datestart and dateend - in put type is date.

    When I hard code the date it works but as soon as I use the parameter nothing outputs.
    I have date format of 2007-06-30 in the data base but the date parameter is in UK date format -
    30-06-2007.

    Any ideas
    Cheers

  2. #2
    JeanetteRoss is offline Sugar Community Member
    Join Date
    Apr 2007
    Posts
    61

    Default Re: Zucker Date Parameter

    Solved it
    "$datestart"

  3. #3
    sidh211 is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    126

    Default Re: Zucker Date Parameter

    Hii

    can you plss let me kno how you have achieved this date range requitrements as we need to generate reports for certain date range..plss help me out


    regds
    sid

  4. #4
    asbaeza is offline Sugar Community Member
    Join Date
    Feb 2006
    Location
    Mexico
    Posts
    16

    Default Re: Zucker Date Parameter

    You should write your query in iReports using the proper name of your parameter. That is, if your parameter in ZuckerReports is Date, you should use it as $Date, as in this sample:

    select x,y,x from sometable where x.date = "$Date" ...

    Regards

  5. #5
    sidh211 is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    126

    Default Re: Zucker Date Parameter

    Hii asbaeza

    actually we have the requirement where, when you run the report at that time the application should promt you two fields where you can enter the dates and then at the back end query should take these two date fields and search in the database for the records which are created between these two dates

    can you plss help me out

    thanks

    regds
    sid

  6. #6
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,467

    Default Re: Zucker Date Parameter

    Quote Originally Posted by sidh211
    Hii asbaeza

    actually we have the requirement where, when you run the report at that time the application should promt you two fields where you can enter the dates and then at the back end query should take these two date fields and search in the database for the records which are created between these two dates

    can you plss help me out

    thanks

    regds
    sid

    create a start & end date parameter in zucker reports & with the same name in ireport

    then use them in the ireport report query:

    AND DATE(t.`date_start`) BETWEEN $P{1date_start} AND $P{2date_end}

    where 1date_start & 2date_end are the parameter names

    Then in zucker reports bind the parameters to the report

  7. #7
    sidh211 is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    126

    Default Re: Zucker Date Parameter

    hii thanks for the quick reply

    but canyou tell how can i create these two parameters in zucker reports do i have to add code in vardefs
    and how to bind these parameters to the module

    plss help

    thanks

    regds
    sid

  8. #8
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,467

    Default Re: Zucker Date Parameter

    Quote Originally Posted by sidh211
    hii thanks for the quick reply

    but canyou tell how can i create these two parameters in zucker reports do i have to add code in vardefs
    and how to bind these parameters to the module

    plss help

    thanks

    regds
    sid
    you create them using the 'Report & Query Parameters' option in zucker reports - this should be in the left hand panel

    Once you have created the report click on it and near the bottom of the page you can select a parameter and bind it to the report

  9. #9
    sidh211 is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    126

    Default Re: Zucker Date Parameter

    hi mike

    I have written this query in iReports but its giviing me an error

    SQL Problems: [Microsoft][ODBC SQL Server Driver] Syntax Error Or Access Violation{2}

    select * from leads
    where date_entered between
    $P{zucker_reportparameters.startdate} AND $P{zucker_reportparameters.enddate}

    I have created startdate and enddate these two parameters in zucker report and query parameters

    Can you suggest something

    Thanks & Regds

    Sid

  10. #10
    mikesolomon is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    UK
    Posts
    1,467

    Default Re: Zucker Date Parameter

    Quote Originally Posted by sidh211
    hi mike

    I have written this query in iReports but its giviing me an error

    SQL Problems: [Microsoft][ODBC SQL Server Driver] Syntax Error Or Access Violation{2}

    select * from leads
    where date_entered between
    $P{zucker_reportparameters.startdate} AND $P{zucker_reportparameters.enddate}

    I have created startdate and enddate these two parameters in zucker report and query parameters

    Can you suggest something

    Thanks & Regds

    Sid
    If you go to Connections/Datasources & click on your connection then click on the test button does it work

    It sounds like a connection issue rather than a sql problem

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. ZuckerDocs date Parameter
    By Barakanooz in forum Help
    Replies: 2
    Last Post: 2007-01-16, 05:12 PM
  2. Report writer - date parameter question?
    By zonar in forum General Discussion
    Replies: 0
    Last Post: 2006-01-09, 04:38 AM
  3. Problem with Date format
    By nicolas in forum Help
    Replies: 1
    Last Post: 2005-05-19, 02:16 PM
  4. Multiple errors
    By amoslmeditabcom693427 in forum Help
    Replies: 0
    Last Post: 2004-11-11, 05:02 PM
  5. Errors when importing
    By amoslmeditabcom693427 in forum Help
    Replies: 0
    Last Post: 2004-11-09, 05:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •