BIRT Exchange Forum: Pass Optional parameter in Report - BIRT Exchange Forum

Jump to content


 

No Latest Open Poll.

  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

Pass Optional parameter in Report Rate Topic: -----

#21 User is offline   mwilliams Icon

  • BIRT Guru
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 13103
  • Joined: 16-May 08


Posted 09 May 2012 - 12:58 PM

There were some major changes between 2.3 and 2.5, I believe, so some reports will not open when created in 2.3 and opened in a newer version. That's probably the reason you're unable to open the design. I'll just make a new one. So, you've got a start date and an end date and you want the user to be able to either select to enter a date or select to pass a null value, which will return all dates? Is this correct? Let me know and I'll make an example.
Regards,

Michael

Twitter
Facebook
Blog
Yahoo: mwilliams_actuate@yahoo.com
Google: mwilliams.actuate@gmail.com
0

#22 User is offline   ocremedios Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 8
  • Joined: 03-May 12


Posted 09 May 2012 - 02:19 PM

Michael,
Thanks for the reply and you are correct about the date parameter thing. Appreciate your help
0

#23 User is offline   mwilliams Icon

  • BIRT Guru
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 13103
  • Joined: 16-May 08


Posted 10 May 2012 - 11:47 AM

Ok. Take a look at this report. If you run it in the web viewer, be sure to add the URL parameter &__parameterpage=true.

Attached File(s)


Regards,

Michael

Twitter
Facebook
Blog
Yahoo: mwilliams_actuate@yahoo.com
Google: mwilliams.actuate@gmail.com
0

#24 User is offline   ocremedios Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 8
  • Joined: 03-May 12


Posted 16 May 2012 - 05:12 AM

I am getting an error on the report i have attached the report would really appreciate your help.
Oscar

Attached File(s)


0

#25 User is offline   mwilliams Icon

  • BIRT Guru
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 13103
  • Joined: 16-May 08


Posted 17 May 2012 - 06:13 AM

What is the error? Can you post the error stack in here? Thanks!
Regards,

Michael

Twitter
Facebook
Blog
Yahoo: mwilliams_actuate@yahoo.com
Google: mwilliams.actuate@gmail.com
0

#26 User is offline   ocremedios Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 8
  • Joined: 03-May 12


Posted 17 May 2012 - 06:44 AM

The error is
"The following items have errors:


Table (id = 11):
+ Can not load the report query: 11. Errors occurred when generating the report document for the report element with ID 11. "


Thanks
0

#27 User is offline   mwilliams Icon

  • BIRT Guru
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 13103
  • Joined: 16-May 08


Posted 18 May 2012 - 07:10 AM

Can you click the '+' sign and post the entire error stack? Thanks!
Regards,

Michael

Twitter
Facebook
Blog
Yahoo: mwilliams_actuate@yahoo.com
Google: mwilliams.actuate@gmail.com
0

#28 User is offline   mwilliams Icon

  • BIRT Guru
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 13103
  • Joined: 16-May 08


Posted 18 May 2012 - 07:16 AM

Do your query results show up under preview results in the dataSet editor? Also, what is the scenario in which you receive that error? With the date parameters empty, with parameters entered, or both?
Regards,

Michael

Twitter
Facebook
Blog
Yahoo: mwilliams_actuate@yahoo.com
Google: mwilliams.actuate@gmail.com
0

#29 User is offline   ocremedios Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 8
  • Joined: 03-May 12


Posted 22 May 2012 - 04:49 AM

My results show up under the preview results dataSet editor. I receive the error in both scenarios with parameters entered and with data set empty.
No idea what i am doing wrong here, done exactly what you have in your example.
0

#30 User is offline   mwilliams Icon

  • BIRT Guru
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 13103
  • Joined: 16-May 08


Posted 23 May 2012 - 10:09 AM

Can you expand the error by clicking on the '+' and post the error stack in here? Thanks!
Regards,

Michael

Twitter
Facebook
Blog
Yahoo: mwilliams_actuate@yahoo.com
Google: mwilliams.actuate@gmail.com
0

#31 User is offline   ocremedios Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 8
  • Joined: 03-May 12


Posted 24 May 2012 - 11:56 AM

I got it working something to do with the BIRT version i use. When you make changes to the data set it throws thar error no idea why had to re do the report.

Thank you,
Oscar
0

#32 User is offline   mwilliams Icon

  • BIRT Guru
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 13103
  • Joined: 16-May 08


Posted 25 May 2012 - 08:58 AM

Hmm. Well, glad you got it working! Let us know whenever you have issues! :)
Regards,

Michael

Twitter
Facebook
Blog
Yahoo: mwilliams_actuate@yahoo.com
Google: mwilliams.actuate@gmail.com
0

#33 User is offline   ocremedios Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 8
  • Joined: 03-May 12


Posted 25 May 2012 - 09:03 AM

Now since you have asked i have a question, i want to know how do i get a calendar to pop up on date parameters so customers can select the date instead of typing/writing it in.
Is it something simple or involves a lot of javascript?
0

#34 User is offline   mwilliams Icon

  • BIRT Guru
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 13103
  • Joined: 16-May 08


Posted 01 June 2012 - 08:07 AM

Sorry for the delay. Take a look at this devShare post:

http://www.birt-exch...get-to-reports/

Hope this helps.
Regards,

Michael

Twitter
Facebook
Blog
Yahoo: mwilliams_actuate@yahoo.com
Google: mwilliams.actuate@gmail.com
0

#35 User is offline   AnnibalS Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 13-September 12


Posted 13 September 2012 - 05:08 AM

View Postmwilliams, on 01 June 2012 - 08:07 AM, said:

Sorry for the delay. Take a look at this devShare post:

http://www.birt-exch...get-to-reports/

Hope this helps.


Good morning, mwilliams.

I'm trying to use the datatime param but the following error occours:

The following items have errors:


Table (id = 10):
+ Cannot execute the statement.
SQL statement does not return a ResultSet object.
SQL error #1: The syntax of the string representation of a datetime value is incorrect.


My script used is:
if (params["PARAMDATETIME"].value!=null){
this.queryText = " select XXX.PRODUCT.ID_PRODUCT, XXX.PRODUCT.NAME, XXX.PRODUCT.MARCA, XXX.PRODUCT.DATE_VALIDADE"+
" from XXX.PRODUCT" +
" where XXX.PRODUCT.DATE_EXPIRED<='"+params["PARAMDATETIME"].value+"'";
} else {
	this.queryText = " select XXX.PRODUCT.ID_PRODUCT, XXX.PRODUCT.NAME, XXX.PRODUCT.MARCA, XXX.PRODUCT.DATE_EXPIRED "+
" from XXX.PRODUCT";
}



I inserted the following values for it, but occours error above:
- 13-09-2012 09:22:49.001-0300
- 2012-11-10 00:00:00.000
- 2012-11-10 00:00:00
- 2012-11-10 00:00
- 12-11-10 00:00
- 11-10-2012 00:00
- 11-10-12 00:00
- 10-11-2012 00:00
- 10-11-12 00:00

Could you help me, please?

Thanks.
0

#36 User is offline   mwilliams Icon

  • BIRT Guru
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 13103
  • Joined: 16-May 08


Posted 13 September 2012 - 01:46 PM

What format is PRODUCT.DATE_EXPIRED, in your dataSet?
Regards,

Michael

Twitter
Facebook
Blog
Yahoo: mwilliams_actuate@yahoo.com
Google: mwilliams.actuate@gmail.com
0

#37 User is offline   Rajesh Kakawat Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 20
  • Joined: 17-July 10


Posted 13 September 2012 - 08:08 PM

Use same format in which your date is stored in database
0

#38 User is offline   AnnibalS Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 13-September 12


Posted 14 September 2012 - 07:17 AM

View Postmwilliams, on 13 September 2012 - 01:46 PM, said:

What format is PRODUCT.DATE_EXPIRED, in your dataSet?


I add into "Report Parameters" how "Date Time" format.

In may database the column is Timestamp.
0

#39 User is offline   AnnibalS Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 4
  • Joined: 13-September 12


Posted 17 September 2012 - 10:14 AM

View PostAnnibalS, on 14 September 2012 - 07:17 AM, said:

I add into "Report Parameters" how "Date Time" format.

In may database the column is Timestamp.


I no longer need the datetime parameter.

Thanks for help.
0

#40 User is offline   mwilliams Icon

  • BIRT Guru
  • Icon
  • View blog
  • Group: Administrators
  • Posts: 13103
  • Joined: 16-May 08


Posted 17 September 2012 - 01:09 PM

Ok. Let us know whenever you have questions!

:)
Regards,

Michael

Twitter
Facebook
Blog
Yahoo: mwilliams_actuate@yahoo.com
Google: mwilliams.actuate@gmail.com
0

  • (3 Pages)
  • +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users