Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7587713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:44:33+00:00 2026-05-30T19:44:33+00:00

Having some trouble getting BIRT to allow me to create a Data Set with

  • 0

Having some trouble getting BIRT to allow me to create a Data Set with Parameters that are set at run time.

The SQL that is giving me the error is:

...
FROM SPRIDEN, SPBPERS P, POSNCTL.NBRJOBS X, NHRDIST d1
where D1.NHRDIST_PAYNO between '@PAYNO_BEGIN' and '@PAYNO_BEGIN'
AND D1.NHRDIST_YEAR = '@YEAR'
...

I have my Report Parameters defined as PaynoBegin, PaynoEnd, Year

I also have a Data Set script set for beforeOpen as follows:

queryText = String (queryText).replace ("@PAYNO_END", Number(params["PaynoEnd"]));
queryText = String (queryText).replace ("@PAYNO_BEGIN", Number(params["PaynoBegin"]));
queryText = String (queryText).replace ("@YEAR", Number(params["Year"]));

The problem seems to be that the JDBC can’t get the ResultSet from this, however I have 10 other reports that work the same way. I have commented out the where clause and it will generate the data set. I also tried breaking the where clause out into two and clauses with <= and >=, but it still throws a ORA-01722 invalid number error on the line.

Any thoughts on this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T19:44:34+00:00Added an answer on May 30, 2026 at 7:44 pm

    Two quite separate thoughts:

    1) You have single quotes around each of your parameters in the query, yet it appears as though each one is a numeric – try removing the single quotes, so that the where clause looks like this:

    where D1.NHRDIST_PAYNO between @PAYNO_BEGIN and @PAYNO_BEGIN
    AND D1.NHRDIST_YEAR = @YEAR
    

    Don’t forget that all three parameters should be required. If the query still returns an error, try replacing @PAYNO_BEGIN, @PAYNO_BEGIN and @YEAR with hardcoded numeric values in the query string, and see whether you still get an error.

    2) You are currently using dynamic SQL – amending query strings to replace specified markers with the text of the entered parameters. This makes you vulnerable to SQL Injection attacks – if you are unfamiliar with the term, you can find a simple example here.

    If you are familiar with the concept, you may be under the impression that SQL Injection attacks cannot be implemented with numeric parameters – Tom Kite has recently posted a few articles on his blog about SQL Injection, including one that deals with a SQL Injection flaw using NLS settings with numbers.

    Instead, you should use bind parameters. To do so with your report, amend your query to include:

    ...
    FROM SPRIDEN, SPBPERS P, POSNCTL.NBRJOBS X, NHRDIST d1
    where D1.NHRDIST_PAYNO between ? and ?
    AND D1.NHRDIST_YEAR = ?
    ...
    

    instead of the existing code, remove the queryText replacement code from the beforeOpen script and map the three dataset parameters to the PaynoBegin, PaynoEnd and Year report parameters respectively in the Dataset Editor. (You should also change any other replaced text in your query text to bind parameter markers (?) and map dataset parameters to them as required.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having some trouble getting a test to run that uses TestNg's @DataProvider
I'm having some trouble getting my Core Data entities to play nice and order
I am having some trouble getting Python IO redirected to a console that I've
I'm having some trouble getting an object to follow a path that is drawn
I writing a query within ms sql server 2005 and having some trouble getting
I'm having some trouble getting jquery to post some json data to a rest
I'm having some trouble getting an SVG file set as a background of an
I am having some trouble getting a List of one of my classes that
Im having some trouble getting the syntax right. I have a movie clip that
I'm having some trouble getting log4net to work from ASP.NET 3.5. This is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.