الانتقال إلى المحتوى
View in the app

A better way to browse. Learn more.

مجموعة مستخدمي أوراكل العربية

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

تشغيل التقرير بعد الdeployment

Featured Replies

بتاريخ:

التقرير شغال تمام في run

لكن

مش شغال  التقرير بعد الdeployment

هل المكان اللي فيه الbean  والتقرير والصفحة

بيحصل فيه تغير بعد الdeployment

واللي أحط كله في نفس المكان ؟؟؟؟؟؟

بتاريخ:

تأكد أن المسار الموجود فيه التقرير صحيح Servlet

بتاريخ:

تأكد من المسارات التي تقرأ منها التقرير

بتاريخ:
  • كاتب الموضوع

 

طب معليش انا عندي مشكلة في فهم المسارات

وبحاول أهرب من المشكلة بوضع

jsp page and report in

\ViewController\public_html

and the bean that call report in

ViewController\classes

when i call report

by

runReport("rep.jasper", m);

use this code

 

 

public String runReport() {

 

String rd1 =it1.getValue().toString();

String rd2 =it2.getValue().toString();

Map m = new HashMap();

 

m.put("pmonq_date1", rd1);

m.put("pmonq_date2", rd2);

try

{

runreportaction2("rmota.jasper", null);

}

catch (Exception e)

{

}

return null;

}

public ServletContext getContext()

{

return (ServletContext)getFacesContext().getExternalContext().getContext();

}

public HttpServletResponse getResponse()

{

return (HttpServletResponse)getFacesContext().getExternalContext().getResponse();

}

public static FacesContext getFacesContext()

{

return FacesContext.getCurrentInstance();

}

public void runreportaction2(String repPath, java.util.Map param) throws Exception

{

Connection conn = null;

try

{

HttpServletResponse response = getResponse();

ServletOutputStream out = response.getOutputStream();

response.setHeader("Cache-Control", "max-age=0");

response.setContentType("application/pdf");

ServletContext context = getContext();

String mypath =("/rmota.jrxml");

File f = new File(mypath);

InputStream fs = context.getResourceAsStream("/rmota.jrxml");

String root =context.getRealPath("/");

JasperDesign design = JRXmlLoader.load(fs);

JasperReport report = JasperCompileManager.compileReport(design);

 

report.setWhenNoDataType(WhenNoDataTypeEnum.ALL_SECTIONS_NO_DETAIL);

Context ctx = new InitialContext();

DataSource ds =

(DataSource)ctx.lookup("java:comp/env/jdbc/motaDS");

Connection conn1 = ds.getConnection();

JasperPrint print = JasperFillManager.fillReport(report, param,conn1);

ByteArrayOutputStream baos = new ByteArrayOutputStream();

JasperExportManager.exportReportToPdfStream(print, baos);

out.write(baos.toByteArray());

out.flush();

out.close();

FacesContext.getCurrentInstance().responseComplete();

}

catch (Exception jex)

{

jex.printStackTrace();

 

}

finally

{

close(conn);

}

}

 

public void close(Connection con)

{

if (con != null)

{

try

{

con.close();

}

catch (Exception e)

{

}

}

}

فين المسار اللي بيادي على التقرير في الكود ده

بينادي علية jasper

ولا jrxml

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية

Account

Navigation

البحث

إعداد إشعارات المتصفح الفورية

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.