Jump to content
We've recently updated our Privacy Statement, available here ×

murad357

Members
  • Posts

    7
  • Joined

  • Last visited

murad357's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hi Clark, Thank you for your response. I was thinking the same way you did. But the problem is with the DB name. This report can be tested in different environment (Dev, UNIT, SYSTEM) with different database name in each environment ... so I can't really hard code the DB name like <DB_NAME>.dbo.<table_name> Wondering if there is any other way to access without referencing the DB name ...
  2. In the report i need to display something similar to below Where Name, Age, Salary coming from one table and Phone is coming from another table (tables are in different database) Name Age Salary Phone AAA 23 50000 1234567890 BBB 34 70000 4445556666 Query may look like this: SELECT x.name AS Name, x.age AS Age, x.salary AS Salary (SELECT y.phone FROM Contact y WHERE y.id = x.id) AS Phone FROM Person x Contact and Person table resides in two different Database. How do I achive this ?
  3. This has been resolved ... Code:java.sql.DriverManager.getConnection("<jdbc URL>", "<username>", "<password>") Post Edited by murad357 at 06/22/2012 20:31
  4. Hello All, I need to call a Java Static method which return type is void (this method basically do some other stuff and throws error if condition doesn't met). How do I access this Method from Jasper? I have added the jar (with the class) in the Jasper report class path and I have all the access to the class. I tried to call the method as one of the parameter default value, but I get an error "Type mismatch: cannot convert from void to String" (I would not be able to change the return type of the method...) Any help would be appreciated ... Thank you in advance.
  5. Helo mdahlman , This might be little old thread, but I need something very similar. However, when I implemented the variable similar to you, it was asking to give "Reset Group" value. In your comments you mentioned to set 'Reset type: Group'. Would you please let me know what would be the "Reset Group"? The value also get repeating twice ... If I do not give any group, it shows something similar to this: test1,test1 test1,test1,test2,test2 test1,test1,test2,test2,test3,test3 Post Edited by murad357 at 05/31/2012 19:00
  6. Hello, This is my very first post in this forum. I am trying to generate a report where data depends on from two different databases. Consider : 1) Database1 with Table 'Customer' field 'CustomerId' and 'Customer Name' 2) Database2 with Table 'NewCustomer' field 'CusId' and 'City' 'NewCustomer' table can have 'CusId' which can also be available in 'Customer' table 'CustomerId'. I need to find out whcih 'CusId' is not present in 'CustomerId' list So basically the sample query would look like this (if from same DB) SELECT CusId, City from NewCustomer WHERE CusId NOT IN (SELECT CustomerId FROM Customer) GROUP BY City My problem is two tables are from two different Database. So I created one Subreport to do the following SELECT CusId, City from NewCustomer WHERE CusId NOT IN ($P{CUSTOMER_ID}) GROUP BY City Where I would populate the $P{CUSTOMER_ID} from the Base report. Base report will use the Subreport (with different dataset) to generate the actual report. Report will display All the new CusId group by City Sample Report New York c123 c134 c234 c222 c666 c710 Toronto c101 c102 Barcelona c100 c222 c221 c 011 c300 Everything is working. Only one thing I couldn't figure out is how do I inject the value for $P{CUSTOMER_ID} of the subreport from the base report query result as a comma seperated 'CustomerId'
  7. Hello, This is my very first post in this forum. I am trying to generate a report where data depends on from two different databases. Consider : 1) Database1 with Table 'Customer' field 'CustomerId' and 'Customer Name' 2) Database2 with Table 'NewCustomer' field 'CusId' and 'City' 'NewCustomer' table can have 'CusId' which can also be available in 'Customer' table 'CustomerId'. I need to find out whcih 'CusId' is not present in 'CustomerId' list So basically the sample query would look like this (if from same DB) SELECT CusId, City from NewCustomer WHERE CusId NOT IN (SELECT CustomerId FROM Customer) GROUP BY City My problem is two tables are from two different Database. So I created one Subreport to do the following SELECT CusId, City from NewCustomer WHERE CusId NOT IN ($P{CUSTOMER_ID}) GROUP BY City Where I would populate the $P{CUSTOMER_ID} from the Base report. Base report will use the Subreport (with different dataset) to generate the actual report. Report will display All the new CusId group by City Sample Report New York c123 c134 c234 c222 c666 c710 Toronto c101 c102 Barcelona c100 c222 c221 c 011 c300 Everything is working. Only one thing I couldn't figure out is how do I inject the value for $P{CUSTOMER_ID} of the subreport from the base report query result as a comma seperated 'CustomerId' Post Edited by murad357 at 05/30/2012 19:28
×
×
  • Create New...